kolide_client

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPaging int32 = 25
	MaxPaging     int32 = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminUser

type AdminUser struct {
	Id           string    `json:"id"`
	FirstName    string    `json:"first_name"`
	LastName     string    `json:"last_name"`
	Email        string    `json:"email"`
	CreatedAt    time.Time `json:"created_at"`
	Access       string    `json:"access"`
	Restrictions []string  `json:"restrictions,omitempty"`
}

type AdminUserListResponse

type AdminUserListResponse struct {
	AdminUsers []AdminUser `json:"data"`
	Pagination Pagination  `json:"pagination"`
}

type ApiError

type ApiError struct {
	Message string `json:"error"`
}

func (*ApiError) Error

func (e *ApiError) Error() string

type AuditLog

type AuditLog struct {
	Id          string    `json:"id"`
	Timestamp   time.Time `json:"timestamp"`
	ActorName   string    `json:"actor_name"`
	Description string    `json:"description"`
}

type AuditLogListResponse

type AuditLogListResponse struct {
	AuditLogs  []AuditLog `json:"data"`
	Pagination Pagination `json:"pagination"`
}

type AuthConfiguration

type AuthConfiguration struct {
	DeviceId           string        `json:"id,omitempty"`
	AuthenticationMode string        `json:"authentication_mode,omitempty"`
	PersonGroups       []PersonGroup `json:"person_groups,omitempty"`
}

type BlocksAuthConfiguration added in v0.2.0

type BlocksAuthConfiguration struct {
	BlockingEnabled          bool     `json:"blocking_enabled"`
	GracePeriodDays          int      `json:"grace_period_days"`
	BlockingGroupNames       []string `json:"blocking_group_names,omitempty"`
	BlockingExemptGroupNames []string `json:"blocking_exempt_group_names,omitempty"`
}

type Check added in v0.2.0

type Check struct {
	Id                      string                  `json:"id"`
	Name                    string                  `json:"name"`
	CompatiblePlatforms     []string                `json:"compatible_platforms"`
	Description             string                  `json:"description,omitempty"`
	Topics                  []string                `json:"topics,omitempty"`
	CheckTags               []CheckTag              `json:"check_tags,omitempty"`
	BlocksAuthConfiguration BlocksAuthConfiguration `json:"blocks_auth_configuration"`
	TargetingConfiguration  TargetingConfiguration  `json:"targeting_configuration"`
}

type CheckInformation added in v0.2.0

type CheckInformation struct {
	// Whilst the Kolide API readme entry references this as a "string", the returned value encountered during implementation is an "int"
	Identifier int32 `json:"identifier,omitempty"`
}

type CheckListResponse added in v0.2.0

type CheckListResponse struct {
	Checks     []Check    `json:"data"`
	Pagination Pagination `json:"pagination"`
}

type CheckTag added in v0.2.0

type CheckTag struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Color       string `json:"color"`
}

type Client

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

func New

func New(options ...ClientOption) *Client

func (*Client) GetAdminUserById

func (c *Client) GetAdminUserById(id string) (interface{}, error)

func (*Client) GetAdminUsers

func (c *Client) GetAdminUsers(cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetAuditLogById

func (c *Client) GetAuditLogById(id string) (interface{}, error)

func (*Client) GetAuditLogs

func (c *Client) GetAuditLogs(cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetCheckById added in v0.2.0

func (c *Client) GetCheckById(id string) (interface{}, error)

func (*Client) GetChecks added in v0.2.0

func (c *Client) GetChecks(cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetDeprovisionedPeople

func (c *Client) GetDeprovisionedPeople(cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetDeviceById

func (c *Client) GetDeviceById(id string) (interface{}, error)

func (*Client) GetDeviceGroupById added in v0.3.0

func (c *Client) GetDeviceGroupById(id string) (interface{}, error)

func (*Client) GetDeviceGroups added in v0.3.0

func (c *Client) GetDeviceGroups(cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetDevices

func (c *Client) GetDevices(cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetDevicesByDeviceGroup added in v0.3.0

func (c *Client) GetDevicesByDeviceGroup(id string, cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetDevicesByPerson added in v0.3.0

func (c *Client) GetDevicesByPerson(id string, cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetIssueById added in v0.2.0

func (c *Client) GetIssueById(id string) (interface{}, error)

func (*Client) GetIssues added in v0.2.0

func (c *Client) GetIssues(cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetIssuesByDevice added in v0.2.0

func (c *Client) GetIssuesByDevice(id string, cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetIssuesByPerson added in v0.3.0

func (c *Client) GetIssuesByPerson(id string, cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetPackageById added in v0.2.0

func (c *Client) GetPackageById(id string) (interface{}, error)

func (*Client) GetPackages added in v0.2.0

func (c *Client) GetPackages(cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetPeople added in v0.3.0

func (c *Client) GetPeople(cursor string, limit int32, searches ...Search) (interface{}, error)

func (*Client) GetPersonById added in v0.3.0

func (c *Client) GetPersonById(id string) (interface{}, error)

func (*Client) GetPersonGroupById added in v0.3.0

func (c *Client) GetPersonGroupById(id string) (interface{}, error)

func (*Client) GetPersonGroups added in v0.3.0

func (c *Client) GetPersonGroups(cursor string, limit int32, searches ...Search) (interface{}, error)

type ClientOption

type ClientOption func(c *Client)

func WithAuth

func WithAuth(apiToken string) ClientOption

type DeprovisionedPeopleListResponse

type DeprovisionedPeopleListResponse struct {
	DeprovisionedPeople []DeprovisionedPerson `json:"data"`
	Pagination          Pagination            `json:"pagination"`
}

type DeprovisionedPerson

type DeprovisionedPerson struct {
	Id                  string    `json:"id"`
	Name                string    `json:"name"`
	Email               string    `json:"email,omitempty"`
	CreatedAt           time.Time `json:"registered_at,omitempty"`
	LastAuthenticatedAt time.Time `json:"last_authenticated_at,omitempty"`
	HasRegisteredDevice bool      `json:"has_registered_device"`
}

type Device

type Device struct {
	Id                  string            `json:"id"`
	Name                string            `json:"name"`
	RegisteredAt        time.Time         `json:"registered_at,omitempty"`
	LastAuthenticatedAt time.Time         `json:"last_authenticated_at,omitempty"`
	RegisteredOwnerInfo RegisteredOwner   `json:"registered_owner_info,omitempty"`
	AuthConfiguration   AuthConfiguration `json:"auth_configuration,omitempty"`
	OperatingSystem     string            `json:"operating_system"`
	HardwareModel       string            `json:"hardware_model"`
	Serial              string            `json:"serial,omitempty"`
	HardwareUuid        string            `json:"hardware_uuid,omitempty"`
	Note                string            `json:"note,omitempty"`
	AuthState           string            `json:"auth_state"`
	WillBlockAt         time.Time         `json:"will_block_at,omitempty"`
	ProductImageUrl     string            `json:"product_image_url"`
	DeviceType          string            `json:"device_type"`
	FormFactor          string            `json:"form_factor"`
}

type DeviceGroup added in v0.3.0

type DeviceGroup struct {
	Id           string    `json:"id"`
	Name         string    `json:"name"`
	CreatedAt    time.Time `json:"created_at,omitempty"`
	Description  string    `json:"description,omitempty"`
	MembersCount int       `json:"members_count"`
}

type DeviceGroupListResponse added in v0.3.0

type DeviceGroupListResponse struct {
	DeviceGroups []DeviceGroup `json:"data"`
	Pagination   Pagination    `json:"pagination"`
}

type DeviceInformation added in v0.2.0

type DeviceInformation struct {
	// Whilst the Kolide API readme entry references this as a "string", the returned value encountered during implementation is an "int"
	Identifier int32 `json:"identifier,omitempty"`
}

type DeviceListResponse

type DeviceListResponse struct {
	Devices    []Device   `json:"data"`
	Pagination Pagination `json:"pagination"`
}

type Issue added in v0.2.0

type Issue struct {
	Id                string            `json:"id"`
	IssueKey          string            `json:"issue_key,omitempty"`
	IssueValue        string            `json:"issue_value,omitempty"`
	Title             string            `json:"title"`
	Value             json.RawMessage   `json:"value,omitempty"`
	Exempted          bool              `json:"exempted"`
	ResolvedAt        time.Time         `json:"resolved_at,omitempty"`
	DetectedAt        time.Time         `json:"detected_at"`
	BlocksDeviceAt    time.Time         `json:"blocks_device_at,omitempty"`
	DeviceInformation DeviceInformation `json:"device_information,omitempty"`
	CheckInformation  CheckInformation  `json:"check_information,omitempty"`
	LastRecheckedAt   time.Time         `json:"last_rechecked_at,omitempty"`
}

type IssueListResponse added in v0.2.0

type IssueListResponse struct {
	Issues     []Issue    `json:"data"`
	Pagination Pagination `json:"pagination"`
}

type OperatorType

type OperatorType string
const (
	Equals         OperatorType = ":"
	SubstringMatch OperatorType = "~"
	GreaterThan    OperatorType = ">"
	LessThan       OperatorType = "<"
)

type Package added in v0.2.0

type Package struct {
	Id      string    `json:"id"`
	BuiltAt time.Time `json:"built_at"`
	Url     string    `json:"url"`
	Version string    `json:"version"`
}

type PackageListResponse added in v0.2.0

type PackageListResponse struct {
	Packages   []Package  `json:"data"`
	Pagination Pagination `json:"pagination"`
}

type Pagination

type Pagination struct {
	Next          string `json:"next,omitempty"`
	CurrentCursor string `json:"current_cursor,omitempty"`
	NextCursor    string `json:"next_cursor,omitempty"`
	Count         int    `json:"count"`
}

See: https://www.kolide.com/docs/developers/api#pagination

type PeopleListResponse added in v0.3.0

type PeopleListResponse struct {
	People     []Person   `json:"data"`
	Pagination Pagination `json:"pagination"`
}

type Person added in v0.3.0

type Person struct {
	Id                  string    `json:"id"`
	Name                string    `json:"name"`
	Email               string    `json:"email"`
	CreatedAt           time.Time `json:"created_at"`
	LastAuthenticatedAt time.Time `json:"last_authenticated_at,omitempty"`
	HasRegisteredDevice bool      `json:"has_registered_device"`
	Usernames           []int     `json:"usernames,omitempty"`
}

type PersonGroup

type PersonGroup struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type PersonGroupListResponse added in v0.3.0

type PersonGroupListResponse struct {
	PersonGroups []PersonGroup `json:"data"`
	Pagination   Pagination    `json:"pagination"`
}

type RegisteredOwner

type RegisteredOwner struct {
	// Whilst the Kolide API readme entry references this as a "string", the returned value encountered during implementation is an "int"
	Identifier int32 `json:"identifier,omitempty"`
}
type Search struct {
	Field    string
	Operator OperatorType
	Value    string
}

type TargetingConfiguration added in v0.2.0

type TargetingConfiguration struct {
	ExcludedGroups []string `json:"excluded_groups,omitempty"`
	TargetedGroups []string `json:"targeted_groups,omitempty"`
}

Jump to

Keyboard shortcuts

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