diff --git a/goztl.go b/goztl.go index 2cb9f9c..76939a7 100644 --- a/goztl.go +++ b/goztl.go @@ -15,7 +15,7 @@ import ( ) const ( - libraryVersion = "0.1.16" + libraryVersion = "0.1.17" userAgent = "goztl/" + libraryVersion mediaType = "application/json" ) diff --git a/osquery_configurations.go b/osquery_configurations.go index ee9bc8c..957754b 100644 --- a/osquery_configurations.go +++ b/osquery_configurations.go @@ -37,8 +37,8 @@ type OsqueryConfiguration struct { InventoryEC2 bool `json:"inventory_ec2"` InventoryInterval int `json:"inventory_interval"` Options map[string]interface{} `json:"options"` - ATCs []int `json:"automatic_table_constructions"` - FileCategories []int `json:"file_categories"` + ATCIDs []int `json:"automatic_table_constructions"` + FileCategoryIDs []int `json:"file_categories"` Created Timestamp `json:"created_at,omitempty"` Updated Timestamp `json:"updated_at,omitempty"` } @@ -56,8 +56,8 @@ type OsqueryConfigurationRequest struct { InventoryEC2 bool `json:"inventory_ec2"` InventoryInterval int `json:"inventory_interval"` Options map[string]interface{} `json:"options"` - FileCategories []int `json:"file_categories"` - ATCs []int `json:"automatic_table_constructions"` + ATCIDs []int `json:"automatic_table_constructions"` + FileCategoryIDs []int `json:"file_categories"` } type listOCOptions struct { diff --git a/osquery_configurations_test.go b/osquery_configurations_test.go index 35a15f6..d3024c5 100644 --- a/osquery_configurations_test.go +++ b/osquery_configurations_test.go @@ -107,8 +107,8 @@ func TestOsqueryConfigurationsService_List(t *testing.T) { InventoryEC2: false, InventoryInterval: 600, Options: map[string]interface{}{"config_refresh": 120.0}, - ATCs: []int{}, - FileCategories: []int{}, + ATCIDs: []int{}, + FileCategoryIDs: []int{}, Created: Timestamp{referenceTime}, Updated: Timestamp{referenceTime}, }, @@ -143,8 +143,8 @@ func TestOsqueryConfigurationsService_GetByID(t *testing.T) { InventoryEC2: false, InventoryInterval: 600, Options: map[string]interface{}{"config_refresh": 120.0}, - ATCs: []int{1}, - FileCategories: []int{1}, + ATCIDs: []int{1}, + FileCategoryIDs: []int{1}, Created: Timestamp{referenceTime}, Updated: Timestamp{referenceTime}, } @@ -179,8 +179,8 @@ func TestOsqueryConfigurationsService_GetByName(t *testing.T) { InventoryEC2: false, InventoryInterval: 600, Options: map[string]interface{}{"config_refresh": 120.0}, - ATCs: []int{}, - FileCategories: []int{}, + ATCIDs: []int{}, + FileCategoryIDs: []int{}, Created: Timestamp{referenceTime}, Updated: Timestamp{referenceTime}, } @@ -201,8 +201,8 @@ func TestOsqueryConfigurationsService_Create(t *testing.T) { InventoryEC2: false, InventoryInterval: 600, Options: map[string]interface{}{"config_refresh": 120.0}, - ATCs: []int{1, 2}, - FileCategories: []int{1, 2}, + ATCIDs: []int{1, 2}, + FileCategoryIDs: []int{1, 2}, } mux.HandleFunc("/osquery/configurations/", func(w http.ResponseWriter, r *http.Request) { @@ -234,8 +234,8 @@ func TestOsqueryConfigurationsService_Create(t *testing.T) { InventoryEC2: false, InventoryInterval: 600, Options: map[string]interface{}{"config_refresh": 120.0}, - ATCs: []int{1, 2}, - FileCategories: []int{1, 2}, + ATCIDs: []int{1, 2}, + FileCategoryIDs: []int{1, 2}, Created: Timestamp{referenceTime}, Updated: Timestamp{referenceTime}, } @@ -255,8 +255,8 @@ func TestOsqueryConfigurationsService_Update(t *testing.T) { InventoryApps: true, InventoryEC2: false, InventoryInterval: 600, - ATCs: []int{1, 2, 3}, - FileCategories: []int{1, 2, 3}, + ATCIDs: []int{1, 2, 3}, + FileCategoryIDs: []int{1, 2, 3}, Options: map[string]interface{}{"config_refresh": 120.0}, } @@ -288,8 +288,8 @@ func TestOsqueryConfigurationsService_Update(t *testing.T) { InventoryEC2: false, InventoryInterval: 600, Options: map[string]interface{}{"config_refresh": 120.0}, - ATCs: []int{1, 2, 3}, - FileCategories: []int{1, 2, 3}, + ATCIDs: []int{1, 2, 3}, + FileCategoryIDs: []int{1, 2, 3}, Created: Timestamp{referenceTime}, Updated: Timestamp{referenceTime}, }