goztl

package module
v0.1.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: BSD-3-Clause, MIT Imports: 12 Imported by: 0

README

Goztl

Go Reference

Goztl is a Go client library for accessing the Zentral API.

Documentation

Index

Constants

View Source
const TaxonomyBasePath = "inventory/taxonomies/"

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored. If the API error response does not include the request ID in its body, the one from its header will be used.

func DoRequestWithClient

func DoRequestWithClient(
	ctx context.Context,
	client *http.Client,
	req *http.Request) (*http.Response, error)

DoRequestWithClient submits an HTTP request using the specified client.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int value to store v and returns a pointer to it.

func String added in v0.1.13

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

func Stringify

func Stringify(message interface{}) string

Stringify attempts to create a string representation of DigitalOcean types

Types

type ArgError

type ArgError struct {
	// contains filtered or unexported fields
}

ArgError is an error that represents an error with an input to goztl. It identifies the argument and the cause (if possible).

func NewArgError

func NewArgError(arg, reason string) *ArgError

NewArgError creates an InputError.

func (*ArgError) Error

func (e *ArgError) Error() string

type Client

type Client struct {

	// Base URL for API requests.
	BaseURL *url.URL

	// User agent for client
	UserAgent string

	// Services used for communicating with the API
	// Inventory
	JMESPathChecks    JMESPathChecksService
	MetaBusinessUnits MetaBusinessUnitsService
	Tags              TagsService
	Taxonomies        TaxonomiesService
	// MDM
	MDMArtifacts                  MDMArtifactsService
	MDMBlueprints                 MDMBlueprintsService
	MDMBlueprintArtifacts         MDMBlueprintArtifactsService
	MDMEnterpriseApps             MDMEnterpriseAppsService
	MDMFileVaultConfigs           MDMFileVaultConfigsService
	MDMProfiles                   MDMProfilesService
	MDMRecoveryPasswordConfigs    MDMRecoveryPasswordConfigsService
	MDMSoftwareUpdateEnforcements MDMSoftwareUpdateEnforcementsService
	// Monolith
	MonolithCatalogs             MonolithCatalogsService
	MonolithConditions           MonolithConditionsService
	MonolithEnrollments          MonolithEnrollmentsService
	MonolithManifests            MonolithManifestsService
	MonolithManifestCatalogs     MonolithManifestCatalogsService
	MonolithManifestSubManifests MonolithManifestSubManifestsService
	MonolithRepositories         MonolithRepositoriesService
	MonolithSubManifests         MonolithSubManifestsService
	MonolithSubManifestPkgInfos  MonolithSubManifestPkgInfosService
	// Munki
	MunkiConfigurations MunkiConfigurationsService
	MunkiEnrollments    MunkiEnrollmentsService
	MunkiScriptChecks   MunkiScriptChecksService
	// Osquery
	OsqueryATC                OsqueryATCService
	OsqueryConfigurations     OsqueryConfigurationsService
	OsqueryConfigurationPacks OsqueryConfigurationPacksService
	OsqueryEnrollments        OsqueryEnrollmentsService
	OsqueryFileCategories     OsqueryFileCategoriesService
	OsqueryPacks              OsqueryPacksService
	OsqueryQueries            OsqueryQueriesService
	// Santa
	SantaConfigurations SantaConfigurationsService
	SantaEnrollments    SantaEnrollmentsService
	SantaRules          SantaRulesService
	// contains filtered or unexported fields
}

Client manages communication with Zentral API.

func NewClient

func NewClient(httpClient *http.Client, bu string, token string, opts ...ClientOpt) (*Client, error)

NewClient returns a new Zentral API client with the given base URL and API token.

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)

Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)

NewRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included in as the request body.

type ClientOpt

type ClientOpt func(*Client) error

ClientOpt are options for New.

func SetRequestHeaders

func SetRequestHeaders(headers map[string]string) ClientOpt

SetRequestHeaders sets optional HTTP headers on the client that are sent on each HTTP request.

func SetUserAgent

func SetUserAgent(ua string) ClientOpt

SetUserAgent is a client option for setting the user agent.

type EnrollmentSecret added in v0.1.7

type EnrollmentSecret struct {
	ID                 int      `json:"id"`
	Secret             string   `json:"secret"`
	MetaBusinessUnitID int      `json:"meta_business_unit"`
	TagIDs             []int    `json:"tags"`
	SerialNumbers      []string `json:"serial_numbers"`
	UDIDs              []string `json:"udids"`
	Quota              *int     `json:"quota"`
	RequestCount       int      `json:"request_count"`
}

type EnrollmentSecretRequest added in v0.1.7

type EnrollmentSecretRequest struct {
	MetaBusinessUnitID int      `json:"meta_business_unit"`
	TagIDs             []int    `json:"tags"`
	SerialNumbers      []string `json:"serial_numbers"`
	UDIDs              []string `json:"udids"`
	Quota              *int     `json:"quota"`
}

type ErrorResponse

type ErrorResponse struct {
	// HTTP response that caused this error
	Response *http.Response

	// Error message
	Message string `json:"message"`
}

An ErrorResponse reports the error caused by an API request

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

type JMESPathCheck added in v0.1.3

type JMESPathCheck struct {
	ID                 int       `json:"id"`
	Name               string    `json:"name"`
	Description        string    `json:"description"`
	SourceName         string    `json:"source_name"`
	Platforms          []string  `json:"platforms"`
	TagIDs             []int     `json:"tags"`
	JMESPathExpression string    `json:"jmespath_expression"`
	Version            int       `json:"version"`
	Created            Timestamp `json:"created_at"`
	Updated            Timestamp `json:"updated_at"`
}

JMESPathCheck represents a Zentral JMESPath check.

func (JMESPathCheck) String added in v0.1.3

func (jmespath_check JMESPathCheck) String() string

type JMESPathCheckCreateRequest added in v0.1.3

type JMESPathCheckCreateRequest struct {
	Name               string   `json:"name"`
	Description        string   `json:"description"`
	SourceName         string   `json:"source_name"`
	Platforms          []string `json:"platforms"`
	TagIDs             []int    `json:"tags"`
	JMESPathExpression string   `json:"jmespath_expression"`
}

JMESPathCheckCreateRequest represents a request to create a JMESPath check.

type JMESPathCheckUpdateRequest added in v0.1.3

type JMESPathCheckUpdateRequest struct {
	Name               string   `json:"name"`
	Description        string   `json:"description"`
	SourceName         string   `json:"source_name"`
	Platforms          []string `json:"platforms"`
	TagIDs             []int    `json:"tags"`
	JMESPathExpression string   `json:"jmespath_expression"`
}

JMESPathCheckUpdateRequest represents a request to update a JMESPath check.

type JMESPathChecksService added in v0.1.3

JMESPathChecksService is an interface for interfacing with the JMESPath checks endpoints of the Zentral API.

type JMESPathChecksServiceOp added in v0.1.3

type JMESPathChecksServiceOp struct {
	// contains filtered or unexported fields
}

JMESPathChecksServiceOp handles communication with the jmespath_checks related methods of the Zentral API.

func (*JMESPathChecksServiceOp) Create added in v0.1.3

Create a new jmespath_check.

func (*JMESPathChecksServiceOp) Delete added in v0.1.3

func (s *JMESPathChecksServiceOp) Delete(ctx context.Context, jmespathCheckID int) (*Response, error)

Delete a jmespath_check.

func (*JMESPathChecksServiceOp) GetByID added in v0.1.3

func (s *JMESPathChecksServiceOp) GetByID(ctx context.Context, jmespathCheckID int) (*JMESPathCheck, *Response, error)

GetByID retrieves a jmespath_check by id.

func (*JMESPathChecksServiceOp) GetByName added in v0.1.3

GetByName retrieves a jmespath_check by name.

func (*JMESPathChecksServiceOp) List added in v0.1.3

List lists all the jmespath_checks.

func (*JMESPathChecksServiceOp) Update added in v0.1.3

func (s *JMESPathChecksServiceOp) Update(ctx context.Context, jmespathCheckID int, updateRequest *JMESPathCheckUpdateRequest) (*JMESPathCheck, *Response, error)

Update a jmespath_check.

type ListOptions

type ListOptions struct {
	// For paginated result sets, maximum number of items to return
	Limit int `url:"limit,omitempty"`

	// For paginated result sets, starting position of the query in relation
	// to the complete set of unpaginated items
	Offset int `url:"offset,omitempty"`
}

ListOptions specifies the optional parameters to various List methods that support pagination.

type MDMArtifact added in v0.1.33

type MDMArtifact struct {
	ID                          string    `json:"id"`
	Name                        string    `json:"name"`
	Type                        string    `json:"type"`
	Channel                     string    `json:"channel"`
	Platforms                   []string  `json:"platforms"`
	InstallDuringSetupAssistant bool      `json:"install_during_setup_assistant"`
	AutoUpdate                  bool      `json:"auto_update"`
	ReinstallInterval           int       `json:"reinstall_interval"`
	ReinstallOnOSUpdate         string    `json:"reinstall_on_os_update"`
	Requires                    []string  `json:"requires"`
	Created                     Timestamp `json:"created_at,omitempty"`
	Updated                     Timestamp `json:"updated_at,omitempty"`
}

MDMArtifact represents a Zentral MDM artifact

func (MDMArtifact) String added in v0.1.33

func (ma MDMArtifact) String() string

type MDMArtifactRequest added in v0.1.33

type MDMArtifactRequest struct {
	Name                        string   `json:"name"`
	Type                        string   `json:"type"`
	Channel                     string   `json:"channel"`
	Platforms                   []string `json:"platforms"`
	InstallDuringSetupAssistant bool     `json:"install_during_setup_assistant"`
	AutoUpdate                  bool     `json:"auto_update"`
	ReinstallInterval           int      `json:"reinstall_interval"`
	ReinstallOnOSUpdate         string   `json:"reinstall_on_os_update"`
	Requires                    []string `json:"requires"`
}

MDMArtifactRequest represents a request to create or update a MDM artifact

type MDMArtifactVersion added in v0.1.38

type MDMArtifactVersion struct {
	ArtifactID       string     `json:"artifact"`
	IOS              bool       `json:"ios"`
	IOSMaxVersion    string     `json:"ios_max_version"`
	IOSMinVersion    string     `json:"ios_min_version"`
	IPadOS           bool       `json:"ipados"`
	IPadOSMaxVersion string     `json:"ipados_max_version"`
	IPadOSMinVersion string     `json:"ipados_min_version"`
	MacOS            bool       `json:"macos"`
	MacOSMaxVersion  string     `json:"macos_max_version"`
	MacOSMinVersion  string     `json:"macos_min_version"`
	TVOS             bool       `json:"tvos"`
	TVOSMaxVersion   string     `json:"tvos_max_version"`
	TVOSMinVersion   string     `json:"tvos_min_version"`
	DefaultShard     int        `json:"default_shard"`
	ShardModulo      int        `json:"shard_modulo"`
	ExcludedTagIDs   []int      `json:"excluded_tags"`
	TagShards        []TagShard `json:"tag_shards"`
	Version          int        `json:"version"`
	Created          Timestamp  `json:"created_at"`
	Updated          Timestamp  `json:"updated_at"`
}

MDMArtifactVersion represents a Zentral MDM artifact version

type MDMArtifactVersionRequest added in v0.1.38

type MDMArtifactVersionRequest struct {
	ArtifactID       string     `json:"artifact"`
	IOS              bool       `json:"ios"`
	IOSMaxVersion    string     `json:"ios_max_version"`
	IOSMinVersion    string     `json:"ios_min_version"`
	IPadOS           bool       `json:"ipados"`
	IPadOSMaxVersion string     `json:"ipados_max_version"`
	IPadOSMinVersion string     `json:"ipados_min_version"`
	MacOS            bool       `json:"macos"`
	MacOSMaxVersion  string     `json:"macos_max_version"`
	MacOSMinVersion  string     `json:"macos_min_version"`
	TVOS             bool       `json:"tvos"`
	TVOSMaxVersion   string     `json:"tvos_max_version"`
	TVOSMinVersion   string     `json:"tvos_min_version"`
	DefaultShard     int        `json:"default_shard"`
	ShardModulo      int        `json:"shard_modulo"`
	ExcludedTagIDs   []int      `json:"excluded_tags"`
	TagShards        []TagShard `json:"tag_shards"`
	Version          int        `json:"version"`
}

MDMArtifactVersionRequest represents a request to create or update a MDM artifact version

type MDMArtifactsService added in v0.1.33

MDMArtifactsService is an interface for interfacing with the MDM artifact endpoints of the Zentral API

type MDMArtifactsServiceOp added in v0.1.33

type MDMArtifactsServiceOp struct {
	// contains filtered or unexported fields
}

MDMArtifactsServiceOp handles communication with the MDM artifacts related methods of the Zentral API.

func (*MDMArtifactsServiceOp) Create added in v0.1.33

func (s *MDMArtifactsServiceOp) Create(ctx context.Context, createRequest *MDMArtifactRequest) (*MDMArtifact, *Response, error)

Create a new MDM artifact.

func (*MDMArtifactsServiceOp) Delete added in v0.1.33

func (s *MDMArtifactsServiceOp) Delete(ctx context.Context, maID string) (*Response, error)

Delete a MDM artifact.

func (*MDMArtifactsServiceOp) GetByID added in v0.1.33

GetByID retrieves a MDM artifact by id.

func (*MDMArtifactsServiceOp) GetByName added in v0.1.33

func (s *MDMArtifactsServiceOp) GetByName(ctx context.Context, name string) (*MDMArtifact, *Response, error)

GetByName retrieves a MDM artifact by name.

func (*MDMArtifactsServiceOp) List added in v0.1.33

List lists all the MDM artifacts.

func (*MDMArtifactsServiceOp) Update added in v0.1.33

func (s *MDMArtifactsServiceOp) Update(ctx context.Context, maID string, updateRequest *MDMArtifactRequest) (*MDMArtifact, *Response, error)

Update a MDM artifact.

type MDMBlueprint added in v0.1.31

type MDMBlueprint struct {
	ID                           int       `json:"id,omitempty"`
	Name                         string    `json:"name"`
	InventoryInterval            int       `json:"inventory_interval"`
	CollectApps                  int       `json:"collect_apps"`
	CollectCertificates          int       `json:"collect_certificates"`
	CollectProfiles              int       `json:"collect_profiles"`
	FileVaultConfigID            *int      `json:"filevault_config"`
	RecoveryPasswordConfigID     *int      `json:"recovery_password_config"`
	SoftwareUpdateEnforcementIDs []int     `json:"software_update_enforcements"`
	Created                      Timestamp `json:"created_at,omitempty"`
	Updated                      Timestamp `json:"updated_at,omitempty"`
}

MDMBlueprint represents a Zentral MDM blueprint

func (MDMBlueprint) String added in v0.1.31

func (mb MDMBlueprint) String() string

type MDMBlueprintArtifact added in v0.1.35

type MDMBlueprintArtifact struct {
	ID               int        `json:"id"`
	BlueprintID      int        `json:"blueprint"`
	ArtifactID       string     `json:"artifact"`
	IOS              bool       `json:"ios"`
	IOSMaxVersion    string     `json:"ios_max_version"`
	IOSMinVersion    string     `json:"ios_min_version"`
	IPadOS           bool       `json:"ipados"`
	IPadOSMaxVersion string     `json:"ipados_max_version"`
	IPadOSMinVersion string     `json:"ipados_min_version"`
	MacOS            bool       `json:"macos"`
	MacOSMaxVersion  string     `json:"macos_max_version"`
	MacOSMinVersion  string     `json:"macos_min_version"`
	TVOS             bool       `json:"tvos"`
	TVOSMaxVersion   string     `json:"tvos_max_version"`
	TVOSMinVersion   string     `json:"tvos_min_version"`
	DefaultShard     int        `json:"default_shard"`
	ShardModulo      int        `json:"shard_modulo"`
	ExcludedTagIDs   []int      `json:"excluded_tags"`
	TagShards        []TagShard `json:"tag_shards"`
	Created          Timestamp  `json:"created_at"`
	Updated          Timestamp  `json:"updated_at"`
}

MDMBlueprintArtifact represents a Zentral MDM blueprint artifact

func (MDMBlueprintArtifact) String added in v0.1.35

func (mba MDMBlueprintArtifact) String() string

type MDMBlueprintArtifactRequest added in v0.1.35

type MDMBlueprintArtifactRequest struct {
	BlueprintID      int        `json:"blueprint"`
	ArtifactID       string     `json:"artifact"`
	IOS              bool       `json:"ios"`
	IOSMaxVersion    string     `json:"ios_max_version"`
	IOSMinVersion    string     `json:"ios_min_version"`
	IPadOS           bool       `json:"ipados"`
	IPadOSMaxVersion string     `json:"ipados_max_version"`
	IPadOSMinVersion string     `json:"ipados_min_version"`
	MacOS            bool       `json:"macos"`
	MacOSMaxVersion  string     `json:"macos_max_version"`
	MacOSMinVersion  string     `json:"macos_min_version"`
	TVOS             bool       `json:"tvos"`
	TVOSMaxVersion   string     `json:"tvos_max_version"`
	TVOSMinVersion   string     `json:"tvos_min_version"`
	DefaultShard     int        `json:"default_shard"`
	ShardModulo      int        `json:"shard_modulo"`
	ExcludedTagIDs   []int      `json:"excluded_tags"`
	TagShards        []TagShard `json:"tag_shards"`
}

MDMBlueprintArtifactRequest represents a request to create or update a MDM blueprint artifact

type MDMBlueprintArtifactsService added in v0.1.35

MDMBlueprintArtifactsService is an interface for interfacing with the MDM blueprint artifact endpoints of the Zentral API

type MDMBlueprintArtifactsServiceOp added in v0.1.35

type MDMBlueprintArtifactsServiceOp struct {
	// contains filtered or unexported fields
}

MDMBlueprintArtifactsServiceOp handles communication with the MDM blueprint artifacts related methods of the Zentral API.

func (*MDMBlueprintArtifactsServiceOp) Create added in v0.1.35

Create a new MDM blueprint artifact.

func (*MDMBlueprintArtifactsServiceOp) Delete added in v0.1.35

func (s *MDMBlueprintArtifactsServiceOp) Delete(ctx context.Context, mbaID int) (*Response, error)

Delete a MDM blueprint artifact.

func (*MDMBlueprintArtifactsServiceOp) GetByID added in v0.1.35

GetByID retrieves a MDM blueprint artifact by id.

func (*MDMBlueprintArtifactsServiceOp) List added in v0.1.35

List lists all the MDM blueprint artifacts.

func (*MDMBlueprintArtifactsServiceOp) Update added in v0.1.35

Update a MDM blueprint artifact.

type MDMBlueprintRequest added in v0.1.31

type MDMBlueprintRequest struct {
	Name                         string `json:"name"`
	InventoryInterval            int    `json:"inventory_interval"`
	CollectApps                  int    `json:"collect_apps"`
	CollectCertificates          int    `json:"collect_certificates"`
	CollectProfiles              int    `json:"collect_profiles"`
	FileVaultConfigID            *int   `json:"filevault_config"`
	RecoveryPasswordConfigID     *int   `json:"recovery_password_config"`
	SoftwareUpdateEnforcementIDs []int  `json:"software_update_enforcements"`
}

MDMBlueprintRequest represents a request to create or update a MDM blueprint

type MDMBlueprintsService added in v0.1.31

MDMBlueprintsService is an interface for interfacing with the MDM blueprint endpoints of the Zentral API

type MDMBlueprintsServiceOp added in v0.1.31

type MDMBlueprintsServiceOp struct {
	// contains filtered or unexported fields
}

MDMBlueprintsServiceOp handles communication with the MDM blueprints related methods of the Zentral API.

func (*MDMBlueprintsServiceOp) Create added in v0.1.31

Create a new MDM blueprint.

func (*MDMBlueprintsServiceOp) Delete added in v0.1.31

func (s *MDMBlueprintsServiceOp) Delete(ctx context.Context, mbID int) (*Response, error)

Delete a MDM blueprint.

func (*MDMBlueprintsServiceOp) GetByID added in v0.1.31

func (s *MDMBlueprintsServiceOp) GetByID(ctx context.Context, mbID int) (*MDMBlueprint, *Response, error)

GetByID retrieves a MDM blueprint by id.

func (*MDMBlueprintsServiceOp) GetByName added in v0.1.31

func (s *MDMBlueprintsServiceOp) GetByName(ctx context.Context, name string) (*MDMBlueprint, *Response, error)

GetByName retrieves a MDM blueprint by name.

func (*MDMBlueprintsServiceOp) List added in v0.1.31

List lists all the MDM blueprints.

func (*MDMBlueprintsServiceOp) Update added in v0.1.31

func (s *MDMBlueprintsServiceOp) Update(ctx context.Context, mbID int, updateRequest *MDMBlueprintRequest) (*MDMBlueprint, *Response, error)

Update a MDM blueprint.

type MDMEnterpriseApp added in v0.1.38

type MDMEnterpriseApp struct {
	ID               string  `json:"id"`
	PackageURI       string  `json:"package_uri"`
	PackageSHA256    string  `json:"package_sha256"`
	PackageSize      int64   `json:"package_size"`
	Filename         string  `json:"filename"`
	ProductID        string  `json:"product_id"`
	ProductVersion   string  `json:"product_version"`
	IOSApp           bool    `json:"ios_app"`
	Configuration    *string `json:"configuration"`
	InstallAsManaged bool    `json:"install_as_managed"`
	RemoveOnUnenroll bool    `json:"remove_on_unenroll"`
	MDMArtifactVersion
}

MDMEnterpriseApp represents a Zentral MDM enterprise app

func (MDMEnterpriseApp) String added in v0.1.38

func (mea MDMEnterpriseApp) String() string

type MDMEnterpriseAppRequest added in v0.1.38

type MDMEnterpriseAppRequest struct {
	PackageURI       string  `json:"package_uri"`
	PackageSHA256    string  `json:"package_sha256"`
	IOSApp           bool    `json:"ios_app"`
	Configuration    *string `json:"configuration"`
	InstallAsManaged bool    `json:"installed_as_managed"`
	RemoveOnUnenroll bool    `json:"remove_on_unenroll"`
	MDMArtifactVersionRequest
}

MDMEnterpriseAppRequest represents a request to create or update a MDM enterprise app

type MDMEnterpriseAppsService added in v0.1.38

MDMEnterpriseAppsService is an interface for interfacing with the MDM enterprise app endpoints of the Zentral API

type MDMEnterpriseAppsServiceOp added in v0.1.38

type MDMEnterpriseAppsServiceOp struct {
	// contains filtered or unexported fields
}

MDMEnterpriseAppsServiceOp handles communication with the MDM enterprise apps related methods of the Zentral API.

func (*MDMEnterpriseAppsServiceOp) Create added in v0.1.38

Create a new MDM enterprise app.

func (*MDMEnterpriseAppsServiceOp) Delete added in v0.1.38

func (s *MDMEnterpriseAppsServiceOp) Delete(ctx context.Context, meaID string) (*Response, error)

Delete a MDM enterprise app.

func (*MDMEnterpriseAppsServiceOp) GetByID added in v0.1.38

GetByID retrieves a MDM enterprise app by id.

func (*MDMEnterpriseAppsServiceOp) List added in v0.1.38

List lists all the MDM enterprise apps.

func (*MDMEnterpriseAppsServiceOp) Update added in v0.1.38

Update a MDM enterprise app.

type MDMFileVaultConfig added in v0.1.36

type MDMFileVaultConfig struct {
	ID                        int       `json:"id,omitempty"`
	Name                      string    `json:"name"`
	EscrowLocationDisplayName string    `json:"escrow_location_display_name"`
	AtLoginOnly               bool      `json:"at_login_only"`
	BypassAttempts            int       `json:"bypass_attempts"`
	ShowRecoveryKey           bool      `json:"show_recovery_key"`
	DestroyKeyOnStandby       bool      `json:"destroy_key_on_standby"`
	PRKRotationIntervalDays   int       `json:"prk_rotation_interval_days"`
	Created                   Timestamp `json:"created_at,omitempty"`
	Updated                   Timestamp `json:"updated_at,omitempty"`
}

MDMFileVaultConfig represents a Zentral MDM FileVault configuration

func (MDMFileVaultConfig) String added in v0.1.36

func (mfc MDMFileVaultConfig) String() string

type MDMFileVaultConfigRequest added in v0.1.36

type MDMFileVaultConfigRequest struct {
	Name                      string `json:"name"`
	EscrowLocationDisplayName string `json:"escrow_location_display_name"`
	AtLoginOnly               bool   `json:"at_login_only"`
	BypassAttempts            int    `json:"bypass_attempts"`
	ShowRecoveryKey           bool   `json:"show_recovery_key"`
	DestroyKeyOnStandby       bool   `json:"destroy_key_on_standby"`
	PRKRotationIntervalDays   int    `json:"prk_rotation_interval_days"`
}

MDMFileVaultConfigRequest represents a request to create or update a MDM FileVault configuration

type MDMFileVaultConfigsService added in v0.1.36

MDMFileVaultConfigsService is an interface for interfacing with the MDM FileVault configuration endpoints of the Zentral API

type MDMFileVaultConfigsServiceOp added in v0.1.36

type MDMFileVaultConfigsServiceOp struct {
	// contains filtered or unexported fields
}

MDMFileVaultConfigsServiceOp handles communication with the MDM FileVault configurations related methods of the Zentral API.

func (*MDMFileVaultConfigsServiceOp) Create added in v0.1.36

Create a new MDM FileVault configuration.

func (*MDMFileVaultConfigsServiceOp) Delete added in v0.1.36

func (s *MDMFileVaultConfigsServiceOp) Delete(ctx context.Context, mfcID int) (*Response, error)

Delete a MDM FileVault configuration.

func (*MDMFileVaultConfigsServiceOp) GetByID added in v0.1.36

GetByID retrieves a MDM FileVault configuration by id.

func (*MDMFileVaultConfigsServiceOp) GetByName added in v0.1.36

GetByName retrieves a MDM FileVault configuration by name.

func (*MDMFileVaultConfigsServiceOp) List added in v0.1.36

List lists all the MDM FileVault configurations.

func (*MDMFileVaultConfigsServiceOp) Update added in v0.1.36

Update a MDM FileVault configuration.

type MDMProfile added in v0.1.34

type MDMProfile struct {
	ID     string `json:"id"`
	Source string `json:"source"`
	MDMArtifactVersion
}

MDMProfile represents a Zentral MDM profile

func (MDMProfile) String added in v0.1.34

func (mp MDMProfile) String() string

type MDMProfileRequest added in v0.1.34

type MDMProfileRequest struct {
	Source string `json:"source"`
	MDMArtifactVersionRequest
}

MDMProfileRequest represents a request to create or update a MDM profile

type MDMProfilesService added in v0.1.34

MDMProfilesService is an interface for interfacing with the MDM profile endpoints of the Zentral API

type MDMProfilesServiceOp added in v0.1.34

type MDMProfilesServiceOp struct {
	// contains filtered or unexported fields
}

MDMProfilesServiceOp handles communication with the MDM profiles related methods of the Zentral API.

func (*MDMProfilesServiceOp) Create added in v0.1.34

func (s *MDMProfilesServiceOp) Create(ctx context.Context, createRequest *MDMProfileRequest) (*MDMProfile, *Response, error)

Create a new MDM profile.

func (*MDMProfilesServiceOp) Delete added in v0.1.34

func (s *MDMProfilesServiceOp) Delete(ctx context.Context, mpID string) (*Response, error)

Delete a MDM profile.

func (*MDMProfilesServiceOp) GetByID added in v0.1.34

func (s *MDMProfilesServiceOp) GetByID(ctx context.Context, mpID string) (*MDMProfile, *Response, error)

GetByID retrieves a MDM profile by id.

func (*MDMProfilesServiceOp) List added in v0.1.34

List lists all the MDM profiles.

func (*MDMProfilesServiceOp) Update added in v0.1.34

func (s *MDMProfilesServiceOp) Update(ctx context.Context, mpID string, updateRequest *MDMProfileRequest) (*MDMProfile, *Response, error)

Update a MDM profile.

type MDMRecoveryPasswordConfig added in v0.1.37

type MDMRecoveryPasswordConfig struct {
	ID                     int       `json:"id"`
	Name                   string    `json:"name"`
	DynamicPassword        bool      `json:"dynamic_password"`
	StaticPassword         *string   `json:"static_password"`
	RotationIntervalDays   int       `json:"rotation_interval_days"`
	RotateFirmwarePassword bool      `json:"rotate_firmware_password"`
	Created                Timestamp `json:"created_at,omitempty"`
	Updated                Timestamp `json:"updated_at,omitempty"`
}

MDMRecoveryPasswordConfig represents a Zentral MDM recovery password configuration

func (MDMRecoveryPasswordConfig) String added in v0.1.37

func (mrpc MDMRecoveryPasswordConfig) String() string

type MDMRecoveryPasswordConfigRequest added in v0.1.37

type MDMRecoveryPasswordConfigRequest struct {
	Name                   string  `json:"name"`
	DynamicPassword        bool    `json:"dynamic_password"`
	StaticPassword         *string `json:"static_password"`
	RotationIntervalDays   int     `json:"rotation_interval_days"`
	RotateFirmwarePassword bool    `json:"rotate_firmware_password"`
}

MDMRecoveryPasswordConfigRequest represents a request to create or update a MDM recovery password configuration

type MDMRecoveryPasswordConfigsService added in v0.1.37

MDMRecoveryPasswordConfigsService is an interface for interfacing with the MDM recovery password configuration endpoints of the Zentral API

type MDMRecoveryPasswordConfigsServiceOp added in v0.1.37

type MDMRecoveryPasswordConfigsServiceOp struct {
	// contains filtered or unexported fields
}

MDMRecoveryPasswordConfigsServiceOp handles communication with the MDM recovery password configurations related methods of the Zentral API.

func (*MDMRecoveryPasswordConfigsServiceOp) Create added in v0.1.37

Create a new MDM recovery password configuration.

func (*MDMRecoveryPasswordConfigsServiceOp) Delete added in v0.1.37

Delete a MDM recovery password configuration.

func (*MDMRecoveryPasswordConfigsServiceOp) GetByID added in v0.1.37

GetByID retrieves a MDM recovery password configuration by id.

func (*MDMRecoveryPasswordConfigsServiceOp) GetByName added in v0.1.37

GetByName retrieves a MDM recovery password configuration by name.

func (*MDMRecoveryPasswordConfigsServiceOp) List added in v0.1.37

List lists all the MDM recovery password configurations.

func (*MDMRecoveryPasswordConfigsServiceOp) Update added in v0.1.37

Update a MDM recovery password configuration.

type MDMSoftwareUpdateEnforcement added in v0.1.43

type MDMSoftwareUpdateEnforcement struct {
	ID            int       `json:"id"`
	Name          string    `json:"name"`
	DetailsURL    string    `json:"details_url"`
	Platforms     []string  `json:"platforms"`
	TagIDs        []int     `json:"tags"`
	OSVersion     string    `json:"os_version"`
	BuildVersion  string    `json:"build_version"`
	LocalDateTime *string   `json:"local_datetime"`
	MaxOSVersion  string    `json:"max_os_version"`
	DelayDays     *int      `json:"delay_days"`
	LocalTime     *string   `json:"local_time"`
	Created       Timestamp `json:"created_at,omitempty"`
	Updated       Timestamp `json:"updated_at,omitempty"`
}

MDMSoftwareUpdateEnforcement represents a Zentral MDM software update enforcement

func (MDMSoftwareUpdateEnforcement) String added in v0.1.43

func (msue MDMSoftwareUpdateEnforcement) String() string

type MDMSoftwareUpdateEnforcementRequest added in v0.1.43

type MDMSoftwareUpdateEnforcementRequest struct {
	Name          string   `json:"name"`
	DetailsURL    string   `json:"details_url"`
	Platforms     []string `json:"platforms"`
	TagIDs        []int    `json:"tags"`
	OSVersion     string   `json:"os_version"`
	BuildVersion  string   `json:"build_version"`
	LocalDateTime *string  `json:"local_datetime"`
	MaxOSVersion  string   `json:"max_os_version"`
	DelayDays     *int     `json:"delay_days"`
	LocalTime     *string  `json:"local_time"`
}

MDMSoftwareUpdateEnforcementRequest represents a request to create or update a MDM software update enforcement

type MDMSoftwareUpdateEnforcementsService added in v0.1.43

MDMSoftwareUpdateEnforcementsService is an interface for interfacing with the MDM software update enforcement endpoints of the Zentral API

type MDMSoftwareUpdateEnforcementsServiceOp added in v0.1.43

type MDMSoftwareUpdateEnforcementsServiceOp struct {
	// contains filtered or unexported fields
}

MDMSoftwareUpdateEnforcementsServiceOp handles communication with the MDM software update enforcements related methods of the Zentral API.

func (*MDMSoftwareUpdateEnforcementsServiceOp) Create added in v0.1.43

Create a new MDM software update enforcement.

func (*MDMSoftwareUpdateEnforcementsServiceOp) Delete added in v0.1.43

Delete a MDM software update enforcement.

func (*MDMSoftwareUpdateEnforcementsServiceOp) GetByID added in v0.1.43

GetByID retrieves a MDM software update enforcement by id.

func (*MDMSoftwareUpdateEnforcementsServiceOp) GetByName added in v0.1.43

GetByName retrieves a MDM software update enforcement by name.

func (*MDMSoftwareUpdateEnforcementsServiceOp) List added in v0.1.43

List lists all the MDM software update enforcements.

func (*MDMSoftwareUpdateEnforcementsServiceOp) Update added in v0.1.43

Update a MDM software update enforcement.

type MetaBusinessUnit

type MetaBusinessUnit struct {
	ID                   int       `json:"id,omitempty"`
	Name                 string    `json:"name,omitempty"`
	APIEnrollmentEnabled bool      `json:"api_enrollment_enabled"`
	Created              Timestamp `json:"created_at,omitempty"`
	Updated              Timestamp `json:"updated_at,omitempty"`
}

MetaBusinessUnit represents a Zentral MetaBusinessUnit

func (MetaBusinessUnit) String

func (mbu MetaBusinessUnit) String() string

type MetaBusinessUnitCreateRequest

type MetaBusinessUnitCreateRequest struct {
	Name string `json:"name"`

	// Boolean to enable API enrollments.
	APIEnrollmentEnabled bool `json:"api_enrollment_enabled"`
}

MetaBusinessUnitCreateRequest represents a request to create a meta business unit.

type MetaBusinessUnitUpdateRequest

type MetaBusinessUnitUpdateRequest struct {
	Name string `json:"name"`

	// Boolean to enable API enrollments.
	// If set, it cannot be unset.
	APIEnrollmentEnabled bool `json:"api_enrollment_enabled"`
}

MetaBusinessUnitUpdateRequest represents a request to update a meta business unit.

type MetaBusinessUnitsService

MetaBusinessUnitsService is an interface for interfacing with the meta business units endpoints of the Zentral API

type MetaBusinessUnitsServiceOp

type MetaBusinessUnitsServiceOp struct {
	// contains filtered or unexported fields
}

MetaBusinessUnitsServiceOp handles communication with the meta business units related methods of the Zentral API.

func (*MetaBusinessUnitsServiceOp) Create

Create a new meta business unit.

func (*MetaBusinessUnitsServiceOp) Delete

func (s *MetaBusinessUnitsServiceOp) Delete(ctx context.Context, mbuID int) (*Response, error)

Delete a meta business unit.

func (*MetaBusinessUnitsServiceOp) GetByID

GetByID retrieves a meta business unit by id.

func (*MetaBusinessUnitsServiceOp) GetByName

GetByName retrieves a meta business unit by name.

func (*MetaBusinessUnitsServiceOp) List

List lists all the meta business units.

func (*MetaBusinessUnitsServiceOp) Update

Update a meta business unit.

type MonolithCatalog added in v0.1.21

type MonolithCatalog struct {
	ID           int        `json:"id"`
	RepositoryID int        `json:"repository"`
	Name         string     `json:"name"`
	Created      Timestamp  `json:"created_at"`
	Updated      Timestamp  `json:"updated_at"`
	ArchivedAt   *Timestamp `json:"archived_at"`
}

MonolithCatalog represents a Zentral MonolithCatalog

func (MonolithCatalog) String added in v0.1.21

func (se MonolithCatalog) String() string

type MonolithCatalogRequest added in v0.1.21

type MonolithCatalogRequest struct {
	Name         string `json:"name"`
	RepositoryID int    `json:"repository"`
}

MonolithCatalogRequest represents a request to create or update a Monolith catalog

type MonolithCatalogsService added in v0.1.21

MonolithCatalogsService is an interface for interfacing with the Monolith catalogs endpoints of the Zentral API

type MonolithCatalogsServiceOp added in v0.1.21

type MonolithCatalogsServiceOp struct {
	// contains filtered or unexported fields
}

MonolithCatalogsServiceOp handles comcunication with the Monolith catalogs related methods of the Zentral API.

func (*MonolithCatalogsServiceOp) Create added in v0.1.21

Create a new Monolith catalog.

func (*MonolithCatalogsServiceOp) Delete added in v0.1.21

func (s *MonolithCatalogsServiceOp) Delete(ctx context.Context, mcID int) (*Response, error)

Delete a Monolith catalog.

func (*MonolithCatalogsServiceOp) GetByID added in v0.1.21

GetByID retrieves a Monolith catalog by id.

func (*MonolithCatalogsServiceOp) GetByName added in v0.1.21

GetByName retrieves a Monolith catalog by name.

func (*MonolithCatalogsServiceOp) List added in v0.1.21

List lists all the Monolith catalogs.

func (*MonolithCatalogsServiceOp) Update added in v0.1.21

Update a Monolith catalog.

type MonolithCondition added in v0.1.26

type MonolithCondition struct {
	ID        int       `json:"id"`
	Name      string    `json:"name"`
	Predicate string    `json:"predicate"`
	Created   Timestamp `json:"created_at"`
	Updated   Timestamp `json:"updated_at"`
}

MonolithCondition represents a Zentral MonolithCondition

func (MonolithCondition) String added in v0.1.26

func (se MonolithCondition) String() string

type MonolithConditionRequest added in v0.1.26

type MonolithConditionRequest struct {
	Name      string `json:"name"`
	Predicate string `json:"predicate"`
}

MonolithConditionRequest represents a request to create or update a Monolith condition

type MonolithConditionsService added in v0.1.26

MonolithConditionsService is an interface for interfacing with the Monolith conditions endpoints of the Zentral API

type MonolithConditionsServiceOp added in v0.1.26

type MonolithConditionsServiceOp struct {
	// contains filtered or unexported fields
}

MonolithConditionsServiceOp handles comcunication with the Monolith conditions related methods of the Zentral API.

func (*MonolithConditionsServiceOp) Create added in v0.1.26

Create a new Monolith condition.

func (*MonolithConditionsServiceOp) Delete added in v0.1.26

func (s *MonolithConditionsServiceOp) Delete(ctx context.Context, mcID int) (*Response, error)

Delete a Monolith condition.

func (*MonolithConditionsServiceOp) GetByID added in v0.1.26

GetByID retrieves a Monolith condition by id.

func (*MonolithConditionsServiceOp) GetByName added in v0.1.26

GetByName retrieves a Monolith condition by name.

func (*MonolithConditionsServiceOp) List added in v0.1.26

List lists all the Monolith conditions.

func (*MonolithConditionsServiceOp) Update added in v0.1.26

Update a Monolith condition.

type MonolithEnrollment added in v0.1.27

type MonolithEnrollment struct {
	ID                    int              `json:"id"`
	ManifestID            int              `json:"manifest"`
	EnrolledMachinesCount int              `json:"enrolled_machines_count"`
	Secret                EnrollmentSecret `json:"secret"`
	Version               int              `json:"version"`
	ConfigProfileURL      string           `json:"configuration_profile_download_url"`
	PlistURL              string           `json:"plist_download_url"`
	Created               Timestamp        `json:"created_at,omitempty"`
	Updated               Timestamp        `json:"updated_at,omitempty"`
}

MonolithEnrollment represents a Zentral MonolithEnrollment

func (MonolithEnrollment) String added in v0.1.27

func (se MonolithEnrollment) String() string

type MonolithEnrollmentRequest added in v0.1.27

type MonolithEnrollmentRequest struct {
	ManifestID int                     `json:"manifest"`
	Secret     EnrollmentSecretRequest `json:"secret"`
}

MonolithEnrollmentRequest represents a request to create or update a Monolith enrollment

type MonolithEnrollmentsService added in v0.1.27

MonolithEnrollmentsService is an interface for interfacing with the Monolith enrollments endpoints of the Zentral API

type MonolithEnrollmentsServiceOp added in v0.1.27

type MonolithEnrollmentsServiceOp struct {
	// contains filtered or unexported fields
}

MonolithEnrollmentsServiceOp handles communication with the Monolith enrollments related methods of the Zentral API.

func (*MonolithEnrollmentsServiceOp) Create added in v0.1.27

Create a new Monolith enrollment.

func (*MonolithEnrollmentsServiceOp) Delete added in v0.1.27

func (s *MonolithEnrollmentsServiceOp) Delete(ctx context.Context, meID int) (*Response, error)

Delete a Monolith enrollment.

func (*MonolithEnrollmentsServiceOp) GetByID added in v0.1.27

GetByID retrieves a Monolith enrollment by id.

func (*MonolithEnrollmentsServiceOp) GetByManifestID added in v0.1.27

func (s *MonolithEnrollmentsServiceOp) GetByManifestID(ctx context.Context, mID int) ([]MonolithEnrollment, *Response, error)

GetByManifestID retrieves the Monolith enrollments for a given manifest.

func (*MonolithEnrollmentsServiceOp) List added in v0.1.27

List lists all the Monolith enrollments.

func (*MonolithEnrollmentsServiceOp) Update added in v0.1.27

Update a Monolith enrollment.

type MonolithManifest added in v0.1.20

type MonolithManifest struct {
	ID                 int       `json:"id"`
	Name               string    `json:"name"`
	MetaBusinessUnitID int       `json:"meta_business_unit"`
	Version            int       `json:"version"`
	Created            Timestamp `json:"created_at,omitempty"`
	Updated            Timestamp `json:"updated_at,omitempty"`
}

MonolithManifest represents a Zentral MonolithManifest

func (MonolithManifest) String added in v0.1.20

func (se MonolithManifest) String() string

type MonolithManifestCatalog added in v0.1.22

type MonolithManifestCatalog struct {
	ID         int   `json:"id"`
	ManifestID int   `json:"manifest"`
	CatalogID  int   `json:"catalog"`
	TagIDs     []int `json:"tags"`
}

MonolithManifestCatalog represents a Zentral manifest catalog.

func (MonolithManifestCatalog) String added in v0.1.22

func (se MonolithManifestCatalog) String() string

type MonolithManifestCatalogRequest added in v0.1.22

type MonolithManifestCatalogRequest struct {
	ManifestID int   `json:"manifest"`
	CatalogID  int   `json:"catalog"`
	TagIDs     []int `json:"tags"`
}

MonolithManifestCatalogRequest represents a request to create or update a Monolith manifest catalog.

type MonolithManifestCatalogsService added in v0.1.22

MonolithManifestCatalogsService is an interface for interfacing with the Monolith manifest catalogs endpoints of the Zentral API

type MonolithManifestCatalogsServiceOp added in v0.1.22

type MonolithManifestCatalogsServiceOp struct {
	// contains filtered or unexported fields
}

MonolithManifestCatalogsServiceOp handles commcunication with the Monolith manifest catalogs related methods of the Zentral API.

func (*MonolithManifestCatalogsServiceOp) Create added in v0.1.22

Create a new Monolith manifest catalog.

func (*MonolithManifestCatalogsServiceOp) Delete added in v0.1.22

Delete a Monolith manifest catalog.

func (*MonolithManifestCatalogsServiceOp) GetByCatalogID added in v0.1.22

GetByCatalogID retrieves Monolith manifest catalogs by catalog ID.

func (*MonolithManifestCatalogsServiceOp) GetByID added in v0.1.22

GetByID retrieves a Monolith manifest catalog by id.

func (*MonolithManifestCatalogsServiceOp) GetByManifestID added in v0.1.22

GetByManifestID retrieves Monolith manifest catalogs by manifest ID.

func (*MonolithManifestCatalogsServiceOp) List added in v0.1.22

List lists all the Monolith manifest catalogs.

func (*MonolithManifestCatalogsServiceOp) Update added in v0.1.22

Update a Monolith manifest catalog.

type MonolithManifestRequest added in v0.1.20

type MonolithManifestRequest struct {
	Name               string `json:"name"`
	MetaBusinessUnitID int    `json:"meta_business_unit"`
}

MonolithManifestRequest represents a request to create or update a Monolith manifest

type MonolithManifestSubManifest added in v0.1.24

type MonolithManifestSubManifest struct {
	ID            int   `json:"id"`
	ManifestID    int   `json:"manifest"`
	SubManifestID int   `json:"sub_manifest"`
	TagIDs        []int `json:"tags"`
}

MonolithManifestSubManifest represents a Zentral manifest sub manifest.

func (MonolithManifestSubManifest) String added in v0.1.24

func (se MonolithManifestSubManifest) String() string

type MonolithManifestSubManifestRequest added in v0.1.24

type MonolithManifestSubManifestRequest struct {
	ManifestID    int   `json:"manifest"`
	SubManifestID int   `json:"sub_manifest"`
	TagIDs        []int `json:"tags"`
}

MonolithManifestSubManifestRequest represents a request to create or update a Monolith manifest sub manifest.

type MonolithManifestSubManifestsService added in v0.1.24

MonolithManifestSubManifestsService is an interface for interfacing with the Monolith manifest sub manifests endpoints of the Zentral API

type MonolithManifestSubManifestsServiceOp added in v0.1.24

type MonolithManifestSubManifestsServiceOp struct {
	// contains filtered or unexported fields
}

MonolithManifestSubManifestsServiceOp handles comsmunication with the Monolith manifest sub manifests related methods of the Zentral API.

func (*MonolithManifestSubManifestsServiceOp) Create added in v0.1.24

Create a new Monolith manifest sub manifest.

func (*MonolithManifestSubManifestsServiceOp) Delete added in v0.1.24

Delete a Monolith manifest sub manifest.

func (*MonolithManifestSubManifestsServiceOp) GetByID added in v0.1.24

GetByID retrieves a Monolith manifest sub manifest by id.

func (*MonolithManifestSubManifestsServiceOp) GetByManifestID added in v0.1.24

GetByManifestID retrieves Monolith manifest sub manifests by manifest ID.

func (*MonolithManifestSubManifestsServiceOp) GetBySubManifestID added in v0.1.24

GetBySubManifestID retrieves Monolith manifest sub manifests by sub manifest ID.

func (*MonolithManifestSubManifestsServiceOp) List added in v0.1.24

List lists all the Monolith manifest sub manifests.

func (*MonolithManifestSubManifestsServiceOp) Update added in v0.1.24

Update a Monolith manifest sub manifest.

type MonolithManifestsService added in v0.1.20

MonolithManifestsService is an interface for interfacing with the Monolith manifests endpoints of the Zentral API

type MonolithManifestsServiceOp added in v0.1.20

type MonolithManifestsServiceOp struct {
	// contains filtered or unexported fields
}

MonolithManifestsServiceOp handles communication with the Monolith manifests related methods of the Zentral API.

func (*MonolithManifestsServiceOp) Create added in v0.1.20

Create a new Monolith manifest.

func (*MonolithManifestsServiceOp) Delete added in v0.1.20

func (s *MonolithManifestsServiceOp) Delete(ctx context.Context, mmID int) (*Response, error)

Delete a Monolith manifest.

func (*MonolithManifestsServiceOp) GetByID added in v0.1.20

GetByID retrieves a Monolith manifest by id.

func (*MonolithManifestsServiceOp) GetByName added in v0.1.20

GetByName retrieves a Monolith manifest by name.

func (*MonolithManifestsServiceOp) List added in v0.1.20

List lists all the Monolith manifests.

func (*MonolithManifestsServiceOp) Update added in v0.1.20

Update a Monolith manifest.

type MonolithRepositoriesService added in v0.1.46

MonolithRepositoriesService is an interface for interfacing with the Monolith manifests endpoints of the Zentral API

type MonolithRepositoriesServiceOp added in v0.1.46

type MonolithRepositoriesServiceOp struct {
	// contains filtered or unexported fields
}

MonolithRepositoriesServiceOp handles comrunication with the Monolith manifests related methods of the Zentral API.

func (*MonolithRepositoriesServiceOp) Create added in v0.1.46

Create a new Monolith manifest.

func (*MonolithRepositoriesServiceOp) Delete added in v0.1.46

Delete a Monolith manifest.

func (*MonolithRepositoriesServiceOp) GetByID added in v0.1.46

GetByID retrieves a Monolith manifest by id.

func (*MonolithRepositoriesServiceOp) GetByName added in v0.1.46

GetByName retrieves a Monolith manifest by name.

func (*MonolithRepositoriesServiceOp) List added in v0.1.46

List lists all the Monolith manifests.

func (*MonolithRepositoriesServiceOp) Update added in v0.1.46

Update a Monolith manifest.

type MonolithRepository added in v0.1.46

type MonolithRepository struct {
	ID                 int                `json:"id"`
	Name               string             `json:"name"`
	MetaBusinessUnitID *int               `json:"meta_business_unit"`
	Backend            string             `json:"backend"`
	S3                 *MonolithS3Backend `json:"s3_kwargs"`
	Created            Timestamp          `json:"created_at"`
	Updated            Timestamp          `json:"updated_at"`
}

func (MonolithRepository) String added in v0.1.46

func (mr MonolithRepository) String() string

type MonolithRepositoryRequest added in v0.1.46

type MonolithRepositoryRequest struct {
	Name               string             `json:"name"`
	MetaBusinessUnitID *int               `json:"meta_business_unit"`
	Backend            string             `json:"backend"`
	S3                 *MonolithS3Backend `json:"s3_kwargs,omitempty"`
}

MonolithRepositoryRequest represents a request to create or update a Monolith manifest

type MonolithS3Backend added in v0.1.46

type MonolithS3Backend struct {
	Bucket               string `json:"bucket"`
	RegionName           string `json:"region_name"`
	Prefix               string `json:"prefix"`
	AccessKeyID          string `json:"access_key_id"`
	SecretAccessKey      string `json:"secret_access_key"`
	AssumeRoleARN        string `json:"assume_role_arn"`
	SignatureVersion     string `json:"signature_version"`
	EndpointURL          string `json:"endpoint_url"`
	CloudfrontDomain     string `json:"cloudfront_domain"`
	CloudfrontKeyID      string `json:"cloudfront_key_id"`
	CloudfrontPrivkeyPEM string `json:"cloudfront_privkey_pem"`
}

type MonolithSubManifest added in v0.1.23

type MonolithSubManifest struct {
	ID                 int       `json:"id"`
	Name               string    `json:"name"`
	Description        string    `json:"description"`
	MetaBusinessUnitID *int      `json:"meta_business_unit"`
	Created            Timestamp `json:"created_at,omitempty"`
	Updated            Timestamp `json:"updated_at,omitempty"`
}

MonolithSubManifest represents a Zentral MonolithSubManifest

func (MonolithSubManifest) String added in v0.1.23

func (se MonolithSubManifest) String() string

type MonolithSubManifestPkgInfo added in v0.1.25

type MonolithSubManifestPkgInfo struct {
	ID             int        `json:"id"`
	SubManifestID  int        `json:"sub_manifest"`
	Key            string     `json:"key"`
	PkgInfoName    string     `json:"pkg_info_name"`
	FeaturedItem   bool       `json:"featured_item"`
	ConditionID    *int       `json:"condition"`
	ShardModulo    int        `json:"shard_modulo"`
	DefaultShard   int        `json:"default_shard"`
	ExcludedTagIDs []int      `json:"excluded_tags"`
	TagShards      []TagShard `json:"tag_shards"`
	Created        Timestamp  `json:"created_at,omitempty"`
	Updated        Timestamp  `json:"updated_at,omitempty"`
}

MonolithSubManifestPkgInfo represents a Zentral MonolithSubManifestPkgInfo

func (MonolithSubManifestPkgInfo) String added in v0.1.25

func (se MonolithSubManifestPkgInfo) String() string

type MonolithSubManifestPkgInfoRequest added in v0.1.25

type MonolithSubManifestPkgInfoRequest struct {
	SubManifestID  int        `json:"sub_manifest"`
	Key            string     `json:"key"`
	PkgInfoName    string     `json:"pkg_info_name"`
	FeaturedItem   bool       `json:"featured_item"`
	ConditionID    *int       `json:"condition"`
	ShardModulo    int        `json:"shard_modulo"`
	DefaultShard   int        `json:"default_shard"`
	ExcludedTagIDs []int      `json:"excluded_tags"`
	TagShards      []TagShard `json:"tag_shards"`
}

MonolithSubManifestPkgInfoRequest represents a request to create or update a Monolith sub manifest pkg info

type MonolithSubManifestPkgInfosService added in v0.1.25

MonolithSubManifestPkgInfosService is an interface for interfacing with the Monolith sub manifest pkg infos endpoints of the Zentral API

type MonolithSubManifestPkgInfosServiceOp added in v0.1.25

type MonolithSubManifestPkgInfosServiceOp struct {
	// contains filtered or unexported fields
}

MonolithSubManifestPkgInfosServiceOp handles cosmpiunication with the Monolith sub manifest pkg infos related methods of the Zentral API.

func (*MonolithSubManifestPkgInfosServiceOp) Create added in v0.1.25

Create a new Monolith sub manifest pkg info.

func (*MonolithSubManifestPkgInfosServiceOp) Delete added in v0.1.25

Delete a Monolith sub manifest pkg info.

func (*MonolithSubManifestPkgInfosServiceOp) GetByID added in v0.1.25

GetByID retrieves a Monolith sub manifest pkg info by id.

func (*MonolithSubManifestPkgInfosServiceOp) GetBySubManifestID added in v0.1.25

GetBySubManifestID retrieves Monolith sub manifest pkg infos by sub manifest ID.

func (*MonolithSubManifestPkgInfosServiceOp) List added in v0.1.25

List lists all the Monolith sub manifest pkg infos.

func (*MonolithSubManifestPkgInfosServiceOp) Update added in v0.1.25

Update a Monolith sub manifest pkg info.

type MonolithSubManifestRequest added in v0.1.23

type MonolithSubManifestRequest struct {
	Name               string `json:"name"`
	Description        string `json:"description"`
	MetaBusinessUnitID *int   `json:"meta_business_unit"`
}

MonolithSubManifestRequest represents a request to create or update a Monolith sub manifest

type MonolithSubManifestsService added in v0.1.23

MonolithSubManifestsService is an interface for interfacing with the Monolith sub manifests endpoints of the Zentral API

type MonolithSubManifestsServiceOp added in v0.1.23

type MonolithSubManifestsServiceOp struct {
	// contains filtered or unexported fields
}

MonolithSubManifestsServiceOp handles comsmunication with the Monolith sub manifests related methods of the Zentral API.

func (*MonolithSubManifestsServiceOp) Create added in v0.1.23

Create a new Monolith sub manifest.

func (*MonolithSubManifestsServiceOp) Delete added in v0.1.23

func (s *MonolithSubManifestsServiceOp) Delete(ctx context.Context, msmID int) (*Response, error)

Delete a Monolith sub manifest.

func (*MonolithSubManifestsServiceOp) GetByID added in v0.1.23

GetByID retrieves a Monolith sub manifest by id.

func (*MonolithSubManifestsServiceOp) GetByName added in v0.1.23

GetByName retrieves a Monolith sub manifest by name.

func (*MonolithSubManifestsServiceOp) List added in v0.1.23

List lists all the Monolith sub manifests.

func (*MonolithSubManifestsServiceOp) Update added in v0.1.23

Update a Monolith sub manifest.

type MunkiConfiguration added in v0.1.28

type MunkiConfiguration struct {
	ID                              int       `json:"id,omitempty"`
	Name                            string    `json:"name"`
	Description                     string    `json:"description"`
	InventoryAppsFullInfoShard      int       `json:"inventory_apps_full_info_shard"`
	PrincipalUserDetectionSources   []string  `json:"principal_user_detection_sources"`
	PrincipalUserDetectionDomains   []string  `json:"principal_user_detection_domains"`
	CollectedConditionKeys          []string  `json:"collected_condition_keys"`
	ManagedInstallsSyncIntervalDays int       `json:"managed_installs_sync_interval_days"`
	ScriptChecksRunIntervalSeconds  int       `json:"script_checks_run_interval_seconds"`
	AutoReinstallIncidents          bool      `json:"auto_reinstall_incidents"`
	AutoFailedInstallIncidents      bool      `json:"auto_failed_install_incidents"`
	Version                         int       `json:"version"`
	Created                         Timestamp `json:"created_at,omitempty"`
	Updated                         Timestamp `json:"updated_at,omitempty"`
}

MunkiConfiguration represents a Zentral MunkiConfiguration

func (MunkiConfiguration) String added in v0.1.28

func (mc MunkiConfiguration) String() string

type MunkiConfigurationRequest added in v0.1.28

type MunkiConfigurationRequest struct {
	Name                            string   `json:"name"`
	Description                     string   `json:"description"`
	InventoryAppsFullInfoShard      int      `json:"inventory_apps_full_info_shard"`
	PrincipalUserDetectionSources   []string `json:"principal_user_detection_sources"`
	PrincipalUserDetectionDomains   []string `json:"principal_user_detection_domains"`
	CollectedConditionKeys          []string `json:"collected_condition_keys"`
	ManagedInstallsSyncIntervalDays int      `json:"managed_installs_sync_interval_days"`
	ScriptChecksRunIntervalSeconds  int      `json:"script_checks_run_interval_seconds"`
	AutoReinstallIncidents          bool     `json:"auto_reinstall_incidents"`
	AutoFailedInstallIncidents      bool     `json:"auto_failed_install_incidents"`
}

MunkiConfigurationRequest represents a request to create or update a Munki configuration

type MunkiConfigurationsService added in v0.1.28

MunkiConfigurationsService is an interface for interfacing with the Munki configurations endpoints of the Zentral API

type MunkiConfigurationsServiceOp added in v0.1.28

type MunkiConfigurationsServiceOp struct {
	// contains filtered or unexported fields
}

MunkiConfigurationsServiceOp handles communication with the Munki configurations related methods of the Zentral API.

func (*MunkiConfigurationsServiceOp) Create added in v0.1.28

Create a new Munki configuration.

func (*MunkiConfigurationsServiceOp) Delete added in v0.1.28

func (s *MunkiConfigurationsServiceOp) Delete(ctx context.Context, mcID int) (*Response, error)

Delete a Munki configuration.

func (*MunkiConfigurationsServiceOp) GetByID added in v0.1.28

GetByID retrieves a Munki configuration by id.

func (*MunkiConfigurationsServiceOp) GetByName added in v0.1.28

GetByName retrieves a Munki configuration by name.

func (*MunkiConfigurationsServiceOp) List added in v0.1.28

List lists all the Munki configurations.

func (*MunkiConfigurationsServiceOp) Update added in v0.1.28

Update a Munki configuration.

type MunkiEnrollment added in v0.1.29

type MunkiEnrollment struct {
	ID                    int              `json:"id"`
	ConfigurationID       int              `json:"configuration"`
	EnrolledMachinesCount int              `json:"enrolled_machines_count"`
	Secret                EnrollmentSecret `json:"secret"`
	PackageURL            string           `json:"package_download_url"`
	Version               int              `json:"version"`
	Created               Timestamp        `json:"created_at,omitempty"`
	Updated               Timestamp        `json:"updated_at,omitempty"`
}

MunkiEnrollment represents a Zentral MunkiEnrollment

func (MunkiEnrollment) String added in v0.1.29

func (se MunkiEnrollment) String() string

type MunkiEnrollmentRequest added in v0.1.29

type MunkiEnrollmentRequest struct {
	ConfigurationID int                     `json:"configuration"`
	Secret          EnrollmentSecretRequest `json:"secret"`
}

MunkiEnrollmentRequest represents a request to create or update a Munki enrollment

type MunkiEnrollmentsService added in v0.1.29

MunkiEnrollmentsService is an interface for interfacing with the Munki enrollments endpoints of the Zentral API

type MunkiEnrollmentsServiceOp added in v0.1.29

type MunkiEnrollmentsServiceOp struct {
	// contains filtered or unexported fields
}

MunkiEnrollmentsServiceOp handles communication with the Munki enrollments related methods of the Zentral API.

func (*MunkiEnrollmentsServiceOp) Create added in v0.1.29

Create a new Munki enrollment.

func (*MunkiEnrollmentsServiceOp) Delete added in v0.1.29

func (s *MunkiEnrollmentsServiceOp) Delete(ctx context.Context, meID int) (*Response, error)

Delete a Munki enrollment.

func (*MunkiEnrollmentsServiceOp) GetByConfigurationID added in v0.1.29

func (s *MunkiEnrollmentsServiceOp) GetByConfigurationID(ctx context.Context, configuration_id int) ([]MunkiEnrollment, *Response, error)

GetByConfigurationID retrieves the Munki enrollments for a given configuration.

func (*MunkiEnrollmentsServiceOp) GetByID added in v0.1.29

GetByID retrieves a Munki enrollment by id.

func (*MunkiEnrollmentsServiceOp) List added in v0.1.29

List lists all the Munki enrollments.

func (*MunkiEnrollmentsServiceOp) Update added in v0.1.29

Update a Munki enrollment.

type MunkiScriptCheck added in v0.1.42

type MunkiScriptCheck struct {
	ID             int       `json:"id"`
	Name           string    `json:"name"`
	Description    string    `json:"description"`
	Type           string    `json:"type"`
	Source         string    `json:"source"`
	ExpectedResult string    `json:"expected_result"`
	ArchAMD64      bool      `json:"arch_amd64"`
	ArchARM64      bool      `json:"arch_arm64"`
	MinOSVersion   string    `json:"min_os_version"`
	MaxOSVersion   string    `json:"max_os_version"`
	TagIDs         []int     `json:"tags"`
	ExcludedTagIDs []int     `json:"excluded_tags"`
	Version        int       `json:"version"`
	Created        Timestamp `json:"created_at"`
	Updated        Timestamp `json:"updated_at"`
}

MunkiScriptCheck represents a Zentral Munki script check.

func (MunkiScriptCheck) String added in v0.1.42

func (msc MunkiScriptCheck) String() string

type MunkiScriptCheckRequest added in v0.1.42

type MunkiScriptCheckRequest struct {
	Name           string `json:"name"`
	Description    string `json:"description"`
	Type           string `json:"type"`
	Source         string `json:"source"`
	ExpectedResult string `json:"expected_result"`
	ArchAMD64      bool   `json:"arch_amd64"`
	ArchARM64      bool   `json:"arch_arm64"`
	MinOSVersion   string `json:"min_os_version"`
	MaxOSVersion   string `json:"max_os_version"`
	TagIDs         []int  `json:"tags"`
	ExcludedTagIDs []int  `json:"excluded_tags"`
}

MunkiScriptCheckRequest represents a request to create or update a Munki script check.

type MunkiScriptChecksService added in v0.1.42

MunkiScriptChecksService is an interface for interfacing with the Munki script checks endpoints of the Zentral API.

type MunkiScriptChecksServiceOp added in v0.1.42

type MunkiScriptChecksServiceOp struct {
	// contains filtered or unexported fields
}

MunkiScriptChecksServiceOp handles communication with the Munki script checks related methods of the Zentral API.

func (*MunkiScriptChecksServiceOp) Create added in v0.1.42

Create a new Munki script check.

func (*MunkiScriptChecksServiceOp) Delete added in v0.1.42

func (s *MunkiScriptChecksServiceOp) Delete(ctx context.Context, mscID int) (*Response, error)

Delete a Munki script check.

func (*MunkiScriptChecksServiceOp) GetByID added in v0.1.42

GetByID retrieves a Munki script check by id.

func (*MunkiScriptChecksServiceOp) GetByName added in v0.1.42

GetByName retrieves a Munki script check by name.

func (*MunkiScriptChecksServiceOp) List added in v0.1.42

List lists all the Munki script checks.

func (*MunkiScriptChecksServiceOp) Update added in v0.1.42

Update a Munki script check.

type OsqueryATC added in v0.1.10

type OsqueryATC struct {
	ID          int       `json:"id,omitempty"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	TableName   string    `json:"table_name"`
	Query       string    `json:"query"`
	Path        string    `json:"path"`
	Columns     []string  `json:"columns"`
	Platforms   []string  `json:"platforms"`
	Created     Timestamp `json:"created_at"`
	Updated     Timestamp `json:"updated_at"`
}

OsqueryATC represents a Zentral Osquery ATC

func (OsqueryATC) String added in v0.1.10

func (oa OsqueryATC) String() string

type OsqueryATCRequest added in v0.1.10

type OsqueryATCRequest struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	TableName   string   `json:"table_name"`
	Query       string   `json:"query"`
	Path        string   `json:"path"`
	Columns     []string `json:"columns"`
	Platforms   []string `json:"platforms"`
}

OsqueryATCRequest represents a request to create or update a Osquery ATC

type OsqueryATCService added in v0.1.10

OsqueryATCService is an interface for interfacing with the Osquery automatic table construction endpoints of the Zentral API

type OsqueryATCServiceOp added in v0.1.10

type OsqueryATCServiceOp struct {
	// contains filtered or unexported fields
}

OsqueryATCServiceOp handles communication with the Osquery automatic table construction related methods of the Zentral API.

func (*OsqueryATCServiceOp) Create added in v0.1.10

func (s *OsqueryATCServiceOp) Create(ctx context.Context, createRequest *OsqueryATCRequest) (*OsqueryATC, *Response, error)

Create a new Osquery ATC.

func (*OsqueryATCServiceOp) Delete added in v0.1.10

func (s *OsqueryATCServiceOp) Delete(ctx context.Context, oaID int) (*Response, error)

Delete a Osquery ATC.

func (*OsqueryATCServiceOp) GetByID added in v0.1.10

func (s *OsqueryATCServiceOp) GetByID(ctx context.Context, oaID int) (*OsqueryATC, *Response, error)

GetByID retrieves a Osquery ATC by id.

func (*OsqueryATCServiceOp) GetByName added in v0.1.10

func (s *OsqueryATCServiceOp) GetByName(ctx context.Context, name string) (*OsqueryATC, *Response, error)

GetByName retrieves a Osquery ATC by name.

func (*OsqueryATCServiceOp) List added in v0.1.10

List lists all the Osquery ATC.

func (*OsqueryATCServiceOp) Update added in v0.1.10

func (s *OsqueryATCServiceOp) Update(ctx context.Context, oaID int, updateRequest *OsqueryATCRequest) (*OsqueryATC, *Response, error)

Update a Osquery ATC.

type OsqueryConfiguration added in v0.1.9

type OsqueryConfiguration struct {
	ID                int                    `json:"id,omitempty"`
	Name              string                 `json:"name"`
	Description       string                 `json:"description"`
	Inventory         bool                   `json:"inventory"`
	InventoryApps     bool                   `json:"inventory_apps"`
	InventoryEC2      bool                   `json:"inventory_ec2"`
	InventoryInterval int                    `json:"inventory_interval"`
	Options           map[string]interface{} `json:"options"`
	ATCIDs            []int                  `json:"automatic_table_constructions"`
	FileCategoryIDs   []int                  `json:"file_categories"`
	Created           Timestamp              `json:"created_at,omitempty"`
	Updated           Timestamp              `json:"updated_at,omitempty"`
}

OsqueryConfiguration represents a Zentral Osquery configuration

func (OsqueryConfiguration) String added in v0.1.9

func (oc OsqueryConfiguration) String() string

type OsqueryConfigurationPack added in v0.1.18

type OsqueryConfigurationPack struct {
	ID              int   `json:"id"`
	ConfigurationID int   `json:"configuration"`
	PackID          int   `json:"pack"`
	TagIDs          []int `json:"tags"`
}

OsqueryConfigurationPack represents a Zentral Osquery configuration pack

func (OsqueryConfigurationPack) String added in v0.1.18

func (ocp OsqueryConfigurationPack) String() string

type OsqueryConfigurationPackRequest added in v0.1.18

type OsqueryConfigurationPackRequest struct {
	ConfigurationID int   `json:"configuration"`
	PackID          int   `json:"pack"`
	TagIDs          []int `json:"tags"`
}

OsqueryConfigurationPackRequest represents a request to create or update a Osquery configuration pack

type OsqueryConfigurationPacksService added in v0.1.18

OsqueryConfigurationPacksService is an interface for interfacing with the Osquery configuration packs endpoints of the Zentral API

type OsqueryConfigurationPacksServiceOp added in v0.1.18

type OsqueryConfigurationPacksServiceOp struct {
	// contains filtered or unexported fields
}

OsqueryConfigurationPacksServiceOp handles communication with the Osquery configuration packs related methods of the Zentral API.

func (*OsqueryConfigurationPacksServiceOp) Create added in v0.1.18

Create a new Osquery configuration pack.

func (*OsqueryConfigurationPacksServiceOp) Delete added in v0.1.18

Delete a Osquery configuration pack.

func (*OsqueryConfigurationPacksServiceOp) GetByConfigurationID added in v0.1.18

GetByConfigurationID retrieves Osquery configuration packs by configuration ID.

func (*OsqueryConfigurationPacksServiceOp) GetByID added in v0.1.18

GetByID retrieves a Osquery configuration pack by id.

func (*OsqueryConfigurationPacksServiceOp) GetByPackID added in v0.1.18

GetByPackID retrieves Osquery configuration packs by pack ID.

func (*OsqueryConfigurationPacksServiceOp) List added in v0.1.18

List lists all the Osquery configuration packs.

func (*OsqueryConfigurationPacksServiceOp) Update added in v0.1.18

Update a Osquery configuration pack.

type OsqueryConfigurationRequest added in v0.1.9

type OsqueryConfigurationRequest struct {
	Name              string                 `json:"name"`
	Description       string                 `json:"description"`
	Inventory         bool                   `json:"inventory"`
	InventoryApps     bool                   `json:"inventory_apps"`
	InventoryEC2      bool                   `json:"inventory_ec2"`
	InventoryInterval int                    `json:"inventory_interval"`
	Options           map[string]interface{} `json:"options"`
	ATCIDs            []int                  `json:"automatic_table_constructions"`
	FileCategoryIDs   []int                  `json:"file_categories"`
}

OsqueryConfigurationRequest represents a request to create or update a Osquery configuration

type OsqueryConfigurationsService added in v0.1.9

OsqueryConfigurationsService is an interface for interfacing with the Osquery configurations endpoints of the Zentral API

type OsqueryConfigurationsServiceOp added in v0.1.9

type OsqueryConfigurationsServiceOp struct {
	// contains filtered or unexported fields
}

OsqueryConfigurationsServiceOp handles communication with the Osquery configurations related methods of the Zentral API.

func (*OsqueryConfigurationsServiceOp) Create added in v0.1.9

Create a new Osquery configuration.

func (*OsqueryConfigurationsServiceOp) Delete added in v0.1.9

Delete a Osquery configuration.

func (*OsqueryConfigurationsServiceOp) GetByID added in v0.1.9

GetByID retrieves a Osquery configuration by id.

func (*OsqueryConfigurationsServiceOp) GetByName added in v0.1.9

GetByName retrieves a Osquery configuration by name.

func (*OsqueryConfigurationsServiceOp) List added in v0.1.9

List lists all the Osquery configurations.

func (*OsqueryConfigurationsServiceOp) Update added in v0.1.9

Update a Osquery configuration.

type OsqueryEnrollment added in v0.1.19

type OsqueryEnrollment struct {
	ID                    int              `json:"id"`
	ConfigurationID       int              `json:"configuration"`
	OsqueryRelease        string           `json:"osquery_release"`
	EnrolledMachinesCount int              `json:"enrolled_machines_count"`
	Secret                EnrollmentSecret `json:"secret"`
	PackageURL            string           `json:"package_download_url"`
	ScriptURL             string           `json:"script_download_url"`
	PowershellScriptURL   string           `json:"powershell_script_download_url"`
	Version               int              `json:"version"`
	Created               Timestamp        `json:"created_at,omitempty"`
	Updated               Timestamp        `json:"updated_at,omitempty"`
}

OsqueryEnrollment represents a Zentral OsqueryEnrollment

func (OsqueryEnrollment) String added in v0.1.19

func (se OsqueryEnrollment) String() string

type OsqueryEnrollmentRequest added in v0.1.19

type OsqueryEnrollmentRequest struct {
	ConfigurationID int                     `json:"configuration"`
	OsqueryRelease  string                  `json:"osquery_release"`
	Secret          EnrollmentSecretRequest `json:"secret"`
}

OsqueryEnrollmentRequest represents a request to create or update a Osquery enrollment

type OsqueryEnrollmentsService added in v0.1.19

OsqueryEnrollmentsService is an interface for interfacing with the Osquery enrollments endpoints of the Zentral API

type OsqueryEnrollmentsServiceOp added in v0.1.19

type OsqueryEnrollmentsServiceOp struct {
	// contains filtered or unexported fields
}

OsqueryEnrollmentsServiceOp handles communication with the Osquery enrollments related methods of the Zentral API.

func (*OsqueryEnrollmentsServiceOp) Create added in v0.1.19

Create a new Osquery enrollment.

func (*OsqueryEnrollmentsServiceOp) Delete added in v0.1.19

func (s *OsqueryEnrollmentsServiceOp) Delete(ctx context.Context, oeID int) (*Response, error)

Delete a Osquery enrollment.

func (*OsqueryEnrollmentsServiceOp) GetByConfigurationID added in v0.1.19

func (s *OsqueryEnrollmentsServiceOp) GetByConfigurationID(ctx context.Context, configuration_id int) ([]OsqueryEnrollment, *Response, error)

GetByConfigurationID retrieves the Osquery enrollments for a given configuration.

func (*OsqueryEnrollmentsServiceOp) GetByID added in v0.1.19

GetByID retrieves a Osquery enrollment by id.

func (*OsqueryEnrollmentsServiceOp) List added in v0.1.19

List lists all the Osquery enrollments.

func (*OsqueryEnrollmentsServiceOp) Update added in v0.1.19

Update a Osquery enrollment.

type OsqueryFileCategoriesService added in v0.1.11

OsqueryFileCategoriesService is an interface for interfacing with the Osquery file categories endpoints of the Zentral API

type OsqueryFileCategoriesServiceOp added in v0.1.11

type OsqueryFileCategoriesServiceOp struct {
	// contains filtered or unexported fields
}

OsqueryFileCategoriesServiceOp handles communication with the Osquery file categories related methods of the Zentral API.

func (*OsqueryFileCategoriesServiceOp) Create added in v0.1.11

Create a new Osquery file category.

func (*OsqueryFileCategoriesServiceOp) Delete added in v0.1.11

func (s *OsqueryFileCategoriesServiceOp) Delete(ctx context.Context, ofcID int) (*Response, error)

Delete a Osquery file category.

func (*OsqueryFileCategoriesServiceOp) GetByID added in v0.1.11

GetByID retrieves a Osquery file category by id.

func (*OsqueryFileCategoriesServiceOp) GetByName added in v0.1.11

GetByName retrieves a Osquery file category by name.

func (*OsqueryFileCategoriesServiceOp) List added in v0.1.11

List lists all the Osquery file categories.

func (*OsqueryFileCategoriesServiceOp) Update added in v0.1.11

Update a Osquery file category.

type OsqueryFileCategory added in v0.1.11

type OsqueryFileCategory struct {
	ID               int       `json:"id,omitempty"`
	Name             string    `json:"name"`
	Slug             string    `json:"slug"`
	Description      string    `json:"description"`
	FilePaths        []string  `json:"file_paths"`
	ExcludePaths     []string  `json:"exclude_paths"`
	FilePathsQueries []string  `json:"file_paths_queries"`
	AccessMonitoring bool      `json:"access_monitoring"`
	Created          Timestamp `json:"created_at"`
	Updated          Timestamp `json:"updated_at"`
}

OsqueryFileCategory represents a Zentral Osquery file category

func (OsqueryFileCategory) String added in v0.1.11

func (ofc OsqueryFileCategory) String() string

type OsqueryFileCategoryRequest added in v0.1.11

type OsqueryFileCategoryRequest struct {
	Name             string   `json:"name"`
	Description      string   `json:"description"`
	FilePaths        []string `json:"file_paths"`
	ExcludePaths     []string `json:"exclude_paths"`
	FilePathsQueries []string `json:"file_paths_queries"`
	AccessMonitoring bool     `json:"access_monitoring"`
}

OsqueryFileCategoryRequest represents a request to create or update a Osquery file category

type OsqueryPack added in v0.1.14

type OsqueryPack struct {
	ID               int       `json:"id"`
	Name             string    `json:"name"`
	Slug             string    `json:"slug"`
	Description      string    `json:"description"`
	DiscoveryQueries []string  `json:"discovery_queries"`
	Shard            *int      `json:"shard"`
	EventRoutingKey  string    `json:"event_routing_key"`
	Created          Timestamp `json:"created_at"`
	Updated          Timestamp `json:"updated_at"`
}

OsqueryPack represents a Zentral Osquery pack

func (OsqueryPack) String added in v0.1.14

func (op OsqueryPack) String() string

type OsqueryPackRequest added in v0.1.14

type OsqueryPackRequest struct {
	Name             string   `json:"name"`
	Description      string   `json:"description"`
	DiscoveryQueries []string `json:"discovery_queries"`
	Shard            *int     `json:"shard"`
	EventRoutingKey  string   `json:"event_routing_key"`
}

OsqueryPackRequest represents a request to create or update a Osquery pack

type OsqueryPacksService added in v0.1.14

OsqueryPacksService is an interface for interfacing with the Osquery packs endpoints of the Zentral API

type OsqueryPacksServiceOp added in v0.1.14

type OsqueryPacksServiceOp struct {
	// contains filtered or unexported fields
}

OsqueryPacksServiceOp handles communication with the Osquery packs related methods of the Zentral API.

func (*OsqueryPacksServiceOp) Create added in v0.1.14

func (s *OsqueryPacksServiceOp) Create(ctx context.Context, createRequest *OsqueryPackRequest) (*OsqueryPack, *Response, error)

Create a new Osquery pack.

func (*OsqueryPacksServiceOp) Delete added in v0.1.14

func (s *OsqueryPacksServiceOp) Delete(ctx context.Context, opID int) (*Response, error)

Delete a Osquery pack.

func (*OsqueryPacksServiceOp) GetByID added in v0.1.14

func (s *OsqueryPacksServiceOp) GetByID(ctx context.Context, opID int) (*OsqueryPack, *Response, error)

GetByID retrieves a Osquery pack by id.

func (*OsqueryPacksServiceOp) GetByName added in v0.1.14

func (s *OsqueryPacksServiceOp) GetByName(ctx context.Context, name string) (*OsqueryPack, *Response, error)

GetByName retrieves a Osquery pack by name.

func (*OsqueryPacksServiceOp) List added in v0.1.14

List lists all the Osquery packs.

func (*OsqueryPacksServiceOp) Update added in v0.1.14

func (s *OsqueryPacksServiceOp) Update(ctx context.Context, opID int, updateRequest *OsqueryPackRequest) (*OsqueryPack, *Response, error)

Update a Osquery pack.

type OsqueryQueriesService added in v0.1.13

OsqueryQueriesService is an interface for interfacing with the Osquery queries endpoints of the Zentral API

type OsqueryQueriesServiceOp added in v0.1.13

type OsqueryQueriesServiceOp struct {
	// contains filtered or unexported fields
}

OsqueryQueriesServiceOp handles communication with the Osquery queries related methods of the Zentral API.

func (*OsqueryQueriesServiceOp) Create added in v0.1.13

Create a new Osquery query.

func (*OsqueryQueriesServiceOp) Delete added in v0.1.13

func (s *OsqueryQueriesServiceOp) Delete(ctx context.Context, oqID int) (*Response, error)

Delete a Osquery query.

func (*OsqueryQueriesServiceOp) GetByID added in v0.1.13

GetByID retrieves a Osquery query by id.

func (*OsqueryQueriesServiceOp) GetByName added in v0.1.13

GetByName retrieves a Osquery query by name.

func (*OsqueryQueriesServiceOp) GetByPackID added in v0.1.30

func (s *OsqueryQueriesServiceOp) GetByPackID(ctx context.Context, packID int) ([]OsqueryQuery, *Response, error)

GetByPackID retrieves Osquery queries by pack ID.

func (*OsqueryQueriesServiceOp) List added in v0.1.13

List lists all the Osquery queries.

func (*OsqueryQueriesServiceOp) Update added in v0.1.13

func (s *OsqueryQueriesServiceOp) Update(ctx context.Context, oqID int, updateRequest *OsqueryQueryRequest) (*OsqueryQuery, *Response, error)

Update a Osquery query.

type OsqueryQuery added in v0.1.13

type OsqueryQuery struct {
	ID                     int                     `json:"id,omitempty"`
	Name                   string                  `json:"name"`
	SQL                    string                  `json:"sql"`
	Platforms              []string                `json:"platforms"`
	MinOsqueryVersion      *string                 `json:"minimum_osquery_version"`
	Description            string                  `json:"description"`
	Value                  string                  `json:"value"`
	Version                int                     `json:"version"`
	ComplianceCheckEnabled bool                    `json:"compliance_check_enabled"`
	TagID                  *int                    `json:"tag"`
	Scheduling             *OsqueryQueryScheduling `json:"scheduling"`
	Created                Timestamp               `json:"created_at"`
	Updated                Timestamp               `json:"updated_at"`
}

OsqueryQuery represents a Zentral Osquery query

func (OsqueryQuery) String added in v0.1.13

func (oq OsqueryQuery) String() string

type OsqueryQueryRequest added in v0.1.13

type OsqueryQueryRequest struct {
	Name                   string                         `json:"name"`
	SQL                    string                         `json:"sql"`
	Platforms              []string                       `json:"platforms"`
	MinOsqueryVersion      *string                        `json:"minimum_osquery_version"`
	Description            string                         `json:"description"`
	Value                  string                         `json:"value"`
	ComplianceCheckEnabled bool                           `json:"compliance_check_enabled"`
	TagID                  *int                           `json:"tag"`
	Scheduling             *OsqueryQuerySchedulingRequest `json:"scheduling"`
}

OsqueryQueryRequest represents a request to create or update a Osquery query

type OsqueryQueryScheduling added in v0.1.30

type OsqueryQueryScheduling struct {
	PackID            int  `json:"pack"`
	Interval          int  `json:"interval"`
	LogRemovedActions bool `json:"log_removed_actions"`
	SnapshotMode      bool `json:"snapshot_mode"`
	Shard             *int `json:"shard"`
	CanBeDenyListed   bool `json:"can_be_denylisted"`
}

OsqueryQueryScheduling represents the scheduling information of a Zentral Osquery query

type OsqueryQuerySchedulingRequest added in v0.1.30

type OsqueryQuerySchedulingRequest struct {
	PackID            int  `json:"pack"`
	Interval          int  `json:"interval"`
	LogRemovedActions bool `json:"log_removed_actions"`
	SnapshotMode      bool `json:"snapshot_mode"`
	Shard             *int `json:"shard"`
	CanBeDenyListed   bool `json:"can_be_denylisted"`
}

OsqueryQuerySchedulingRequest represents a request to create or update a Osquery pack query scheduling

type Response

type Response struct {
	*http.Response
}

Response is a Zentral response. This wraps the standard http.Response returned from Zentral.

type SantaConfiguration added in v0.1.4

type SantaConfiguration struct {
	ID                        int       `json:"id,omitempty"`
	Name                      string    `json:"name"`
	ClientMode                int       `json:"client_mode"`
	ClientCertificateAuth     bool      `json:"client_certificate_auth"`
	BatchSize                 int       `json:"batch_size"`
	FullSyncInterval          int       `json:"full_sync_interval"`
	EnableBundles             bool      `json:"enable_bundles"`
	EnableTransitiveRules     bool      `json:"enable_transitive_rules"`
	AllowedPathRegex          string    `json:"allowed_path_regex"`
	BlockedPathRegex          string    `json:"blocked_path_regex"`
	BlockUSBMount             bool      `json:"block_usb_mount"`
	RemountUSBMode            []string  `json:"remount_usb_mode"`
	AllowUnknownShard         int       `json:"allow_unknown_shard"`
	EnableAllEventUploadShard int       `json:"enable_all_event_upload_shard"`
	SyncIncidentSeverity      int       `json:"sync_incident_severity"`
	Created                   Timestamp `json:"created_at,omitempty"`
	Updated                   Timestamp `json:"updated_at,omitempty"`
}

SantaConfiguration represents a Zentral SantaConfiguration

func (SantaConfiguration) String added in v0.1.4

func (sc SantaConfiguration) String() string

type SantaConfigurationRequest added in v0.1.4

type SantaConfigurationRequest struct {
	Name                      string   `json:"name"`
	ClientMode                int      `json:"client_mode"`
	ClientCertificateAuth     bool     `json:"client_certificate_auth"`
	BatchSize                 int      `json:"batch_size"`
	FullSyncInterval          int      `json:"full_sync_interval"`
	EnableBundles             bool     `json:"enable_bundles"`
	EnableTransitiveRules     bool     `json:"enable_transitive_rules"`
	AllowedPathRegex          string   `json:"allowed_path_regex"`
	BlockedPathRegex          string   `json:"blocked_path_regex"`
	BlockUSBMount             bool     `json:"block_usb_mount"`
	RemountUSBMode            []string `json:"remount_usb_mode"`
	AllowUnknownShard         int      `json:"allow_unknown_shard"`
	EnableAllEventUploadShard int      `json:"enable_all_event_upload_shard"`
	SyncIncidentSeverity      int      `json:"sync_incident_severity"`
}

SantaConfigurationRequest represents a request to create or update a Santa configuration

type SantaConfigurationsService added in v0.1.4

SantaConfigurationsService is an interface for interfacing with the Santa configurations endpoints of the Zentral API

type SantaConfigurationsServiceOp added in v0.1.4

type SantaConfigurationsServiceOp struct {
	// contains filtered or unexported fields
}

SantaConfigurationsServiceOp handles communication with the Santa configurations related methods of the Zentral API.

func (*SantaConfigurationsServiceOp) Create added in v0.1.4

Create a new Santa configuration.

func (*SantaConfigurationsServiceOp) Delete added in v0.1.4

func (s *SantaConfigurationsServiceOp) Delete(ctx context.Context, scID int) (*Response, error)

Delete a Santa configuration.

func (*SantaConfigurationsServiceOp) GetByID added in v0.1.4

GetByID retrieves a Santa configuration by id.

func (*SantaConfigurationsServiceOp) GetByName added in v0.1.4

GetByName retrieves a Santa configuration by name.

func (*SantaConfigurationsServiceOp) List added in v0.1.4

List lists all the Santa configurations.

func (*SantaConfigurationsServiceOp) Update added in v0.1.4

Update a Santa configuration.

type SantaEnrollment added in v0.1.7

type SantaEnrollment struct {
	ID                    int              `json:"id"`
	ConfigurationID       int              `json:"configuration"`
	EnrolledMachinesCount int              `json:"enrolled_machines_count"`
	Secret                EnrollmentSecret `json:"secret"`
	ConfigProfileURL      string           `json:"configuration_profile_download_url"`
	PlistURL              string           `json:"plist_download_url"`
	Version               int              `json:"version"`
	Created               Timestamp        `json:"created_at,omitempty"`
	Updated               Timestamp        `json:"updated_at,omitempty"`
}

SantaEnrollment represents a Zentral SantaEnrollment

func (SantaEnrollment) String added in v0.1.7

func (se SantaEnrollment) String() string

type SantaEnrollmentRequest added in v0.1.7

type SantaEnrollmentRequest struct {
	ConfigurationID int                     `json:"configuration"`
	Secret          EnrollmentSecretRequest `json:"secret"`
}

SantaEnrollmentRequest represents a request to create or update a Santa enrollment

type SantaEnrollmentsService added in v0.1.7

SantaEnrollmentsService is an interface for interfacing with the Santa enrollments endpoints of the Zentral API

type SantaEnrollmentsServiceOp added in v0.1.7

type SantaEnrollmentsServiceOp struct {
	// contains filtered or unexported fields
}

SantaEnrollmentsServiceOp handles communication with the Santa enrollments related methods of the Zentral API.

func (*SantaEnrollmentsServiceOp) Create added in v0.1.7

Create a new Santa enrollment.

func (*SantaEnrollmentsServiceOp) Delete added in v0.1.7

func (s *SantaEnrollmentsServiceOp) Delete(ctx context.Context, seID int) (*Response, error)

Delete a Santa enrollment.

func (*SantaEnrollmentsServiceOp) GetByConfigurationID added in v0.1.7

func (s *SantaEnrollmentsServiceOp) GetByConfigurationID(ctx context.Context, configuration_id int) ([]SantaEnrollment, *Response, error)

GetByConfigurationID retrieves the Santa enrollments for a given configuration.

func (*SantaEnrollmentsServiceOp) GetByID added in v0.1.7

GetByID retrieves a Santa enrollment by id.

func (*SantaEnrollmentsServiceOp) List added in v0.1.7

List lists all the Santa enrollments.

func (*SantaEnrollmentsServiceOp) Update added in v0.1.7

Update a Santa enrollment.

type SantaRule added in v0.1.8

type SantaRule struct {
	ID                    int       `json:"id"`
	ConfigurationID       int       `json:"configuration"`
	Policy                int       `json:"policy"`
	TargetType            string    `json:"target_type"`
	TargetIdentifier      string    `json:"target_identifier"`
	Description           string    `json:"description"`
	CustomMessage         string    `json:"custom_msg"`
	RulesetID             *int      `json:"ruleset"`
	PrimaryUsers          []string  `json:"primary_users"`
	ExcludedPrimaryUsers  []string  `json:"excluded_primary_users"`
	SerialNumbers         []string  `json:"serial_numbers"`
	ExcludedSerialNumbers []string  `json:"excluded_serial_numbers"`
	TagIDs                []int     `json:"tags"`
	ExcludedTagIDs        []int     `json:"excluded_tags"`
	Version               int       `json:"version"`
	Created               Timestamp `json:"created_at"`
	Updated               Timestamp `json:"updated_at"`
}

SantaRule represents a Zentral SantaRule

func (SantaRule) String added in v0.1.8

func (sr SantaRule) String() string

type SantaRuleRequest added in v0.1.8

type SantaRuleRequest struct {
	ConfigurationID       int      `json:"configuration"`
	Policy                int      `json:"policy"`
	TargetType            string   `json:"target_type"`
	TargetIdentifier      string   `json:"target_identifier"`
	Description           string   `json:"description"`
	CustomMessage         string   `json:"custom_msg"`
	PrimaryUsers          []string `json:"primary_users"`
	ExcludedPrimaryUsers  []string `json:"excluded_primary_users"`
	SerialNumbers         []string `json:"serial_numbers"`
	ExcludedSerialNumbers []string `json:"excluded_serial_numbers"`
	TagIDs                []int    `json:"tags"`
	ExcludedTagIDs        []int    `json:"excluded_tags"`
}

SantaRuleRequest represents a request to create or update a Santa rule

type SantaRulesService added in v0.1.8

type SantaRulesService interface {
	List(context.Context, *ListOptions) ([]SantaRule, *Response, error)
	GetByID(context.Context, int) (*SantaRule, *Response, error)
	GetByConfigurationID(context.Context, int) ([]SantaRule, *Response, error)
	GetByTargetIdentifier(context.Context, string) ([]SantaRule, *Response, error)
	GetByTargetType(context.Context, string) ([]SantaRule, *Response, error)
	Create(context.Context, *SantaRuleRequest) (*SantaRule, *Response, error)
	Update(context.Context, int, *SantaRuleRequest) (*SantaRule, *Response, error)
	Delete(context.Context, int) (*Response, error)
}

SantaRulesService is an interface for interfacing with the Santa rules endpoints of the Zentral API

type SantaRulesServiceOp added in v0.1.8

type SantaRulesServiceOp struct {
	// contains filtered or unexported fields
}

SantaRulesServiceOp handles communication with the Santa enrollments related methods of the Zentral API.

func (*SantaRulesServiceOp) Create added in v0.1.8

func (s *SantaRulesServiceOp) Create(ctx context.Context, createRequest *SantaRuleRequest) (*SantaRule, *Response, error)

Create a new Santa rule

func (*SantaRulesServiceOp) Delete added in v0.1.8

func (s *SantaRulesServiceOp) Delete(ctx context.Context, srID int) (*Response, error)

Delete a Santa rule

func (*SantaRulesServiceOp) GetByConfigurationID added in v0.1.8

func (s *SantaRulesServiceOp) GetByConfigurationID(ctx context.Context, configuration_id int) ([]SantaRule, *Response, error)

GetByConfigurationID retrieves the Santa rules for a given configuration.

func (*SantaRulesServiceOp) GetByID added in v0.1.8

func (s *SantaRulesServiceOp) GetByID(ctx context.Context, srID int) (*SantaRule, *Response, error)

GetByID retrieves a Santa rule by id.

func (*SantaRulesServiceOp) GetByTargetIdentifier added in v0.1.8

func (s *SantaRulesServiceOp) GetByTargetIdentifier(ctx context.Context, target_identifier string) ([]SantaRule, *Response, error)

GetByTargetIdentifier retrieves the Santa rules for a given target identifier

func (*SantaRulesServiceOp) GetByTargetType added in v0.1.8

func (s *SantaRulesServiceOp) GetByTargetType(ctx context.Context, target_type string) ([]SantaRule, *Response, error)

GetByTargetType retrieves the Santa rules for a given target type

func (*SantaRulesServiceOp) List added in v0.1.8

List lists all the Santa rules.

func (*SantaRulesServiceOp) Update added in v0.1.8

func (s *SantaRulesServiceOp) Update(ctx context.Context, srID int, updateRequest *SantaRuleRequest) (*SantaRule, *Response, error)

Update a Santa rule

type Tag

type Tag struct {
	ID                 int    `json:"id"`
	TaxonomyID         *int   `json:"taxonomy,omitempty"`
	MetaBusinessUnitID *int   `json:"meta_business_unit,omitempty"`
	Name               string `json:"name"`
	Slug               string `json:"slug"`
	Color              string `json:"color"`
}

Tag represents a Zentral Tag

func (Tag) String

func (tag Tag) String() string

type TagCreateRequest

type TagCreateRequest struct {
	Name               string `json:"name"`
	TaxonomyID         *int   `json:"taxonomy"`
	MetaBusinessUnitID *int   `json:"meta_business_unit"`
	Color              string `json:"color,omitempty"`
}

TagCreateRequest represents a request to create a tag.

type TagShard added in v0.1.25

type TagShard struct {
	TagID int `json:"tag"`
	Shard int `json:"shard"`
}

TagShard represents a Zentral tag shard.

type TagUpdateRequest

type TagUpdateRequest struct {
	Name               string `json:"name"`
	TaxonomyID         *int   `json:"taxonomy"`
	MetaBusinessUnitID *int   `json:"meta_business_unit"`
	Color              string `json:"color,omitempty"`
}

TagUpdateRequest represents a request to update a tag.

type TagsService

type TagsService interface {
	List(context.Context, *ListOptions) ([]Tag, *Response, error)
	GetByID(context.Context, int) (*Tag, *Response, error)
	GetByName(context.Context, string) (*Tag, *Response, error)
	Create(context.Context, *TagCreateRequest) (*Tag, *Response, error)
	Update(context.Context, int, *TagUpdateRequest) (*Tag, *Response, error)
	Delete(context.Context, int) (*Response, error)
}

TagsService is an interface for interfacing with the tags endpoints of the Zentral API

type TagsServiceOp

type TagsServiceOp struct {
	// contains filtered or unexported fields
}

TagsServiceOp handles communication with the tags related methods of the Zentral API.

func (*TagsServiceOp) Create

func (s *TagsServiceOp) Create(ctx context.Context, createRequest *TagCreateRequest) (*Tag, *Response, error)

Create a new tag.

func (*TagsServiceOp) Delete

func (s *TagsServiceOp) Delete(ctx context.Context, tagID int) (*Response, error)

Delete a tag.

func (*TagsServiceOp) GetByID

func (s *TagsServiceOp) GetByID(ctx context.Context, tagID int) (*Tag, *Response, error)

GetByID retrieves a tag by id.

func (*TagsServiceOp) GetByName

func (s *TagsServiceOp) GetByName(ctx context.Context, name string) (*Tag, *Response, error)

GetByName retrieves a tag by name.

func (*TagsServiceOp) List

func (s *TagsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Tag, *Response, error)

List lists all the tags.

func (*TagsServiceOp) Update

func (s *TagsServiceOp) Update(ctx context.Context, tagID int, updateRequest *TagUpdateRequest) (*Tag, *Response, error)

Update a tag.

type TaxonomiesService

TaxonomiesService is an interface for interfacing with the Taxonomies endpoints of the Zentral API

type TaxonomiesServiceOp

type TaxonomiesServiceOp struct {
	// contains filtered or unexported fields
}

TaxonomiesServiceOp handles communication with the Taxonomies related methods of the Zentral API.

func (*TaxonomiesServiceOp) Create

func (s *TaxonomiesServiceOp) Create(ctx context.Context, createRequest *TaxonomyCreateRequest) (*Taxonomy, *Response, error)

Create a new Taxonomy.

func (*TaxonomiesServiceOp) Delete

func (s *TaxonomiesServiceOp) Delete(ctx context.Context, TaxonomyID int) (*Response, error)

Delete a Taxonomy.

func (*TaxonomiesServiceOp) GetByID

func (s *TaxonomiesServiceOp) GetByID(ctx context.Context, TaxonomyID int) (*Taxonomy, *Response, error)

GetByID retrieves a Taxonomy by id.

func (*TaxonomiesServiceOp) GetByName

func (s *TaxonomiesServiceOp) GetByName(ctx context.Context, name string) (*Taxonomy, *Response, error)

GetByName retrieves a Taxonomy by name.

func (*TaxonomiesServiceOp) List

List lists all the Taxonomies.

func (*TaxonomiesServiceOp) Update

func (s *TaxonomiesServiceOp) Update(ctx context.Context, TaxonomyID int, updateRequest *TaxonomyUpdateRequest) (*Taxonomy, *Response, error)

Update a Taxonomy.

type Taxonomy

type Taxonomy struct {
	ID                 int       `json:"id"`
	MetaBusinessUnitID *int      `json:"meta_business_unit,omitempty"`
	Name               string    `json:"name"`
	Created            Timestamp `json:"created_at"`
	Updated            Timestamp `json:"updated_at"`
}

Taxonomy represents a Zentral Taxonomy

func (Taxonomy) String

func (Taxonomy Taxonomy) String() string

type TaxonomyCreateRequest

type TaxonomyCreateRequest struct {
	Name               string `json:"name"`
	MetaBusinessUnitID *int   `json:"meta_business_unit"`
}

TaxonomyCreateRequest represents a request to create a Taxonomy.

type TaxonomyUpdateRequest

type TaxonomyUpdateRequest struct {
	Name               string `json:"name"`
	MetaBusinessUnitID *int   `json:"meta_business_unit"`
}

TaxonomyUpdateRequest represents a request to update a Taxonomy.

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp represents a time that can be unmarshalled from a JSON string formatted as either an ISO8601 or Unix timestamp. All exported methods of time.Time can be called on Timestamp.

func (Timestamp) Equal

func (t Timestamp) Equal(u Timestamp) bool

Equal reports whether t and u are equal based on time.Equal

func (Timestamp) String

func (t Timestamp) String() string

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. Time is expected in ISO8611 or Unix format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL