Documentation ¶
Index ¶
- Constants
- Variables
- type Application
- type ApplicationDeviceCounts
- type ApplicationExistenceConditionParams
- type ApplicationFull1
- type ApplicationReleaseConditionParams
- type Auth0SsoRequest
- type Bundle
- type BundledApplication
- type Condition
- type ConditionType
- type Connection
- type CreateReleaseRequest
- type DatadogMetric
- type DatadogPostMetricsRequest
- type DatadogSeries
- type Device
- type DeviceAccessKey
- type DeviceApplicationStatus
- type DeviceApplicationStatusFull
- type DeviceApplicationStatusInfo
- type DeviceFull
- type DeviceInfo
- type DeviceMetricsConfig
- type DevicePropertyConditionParams
- type DeviceRegistrationToken
- type DeviceRegistrationTokenFull
- type DeviceServiceState
- type DeviceServiceStatus
- type DeviceServiceStatusFull
- type DeviceStatus
- type DevicesRegisteredWithTokenCount
- type ExposedMetric
- type ExternalUser
- type Filter
- type FullBundledApplication
- type IntermediateServiceMetricsRequest
- type InternalUser
- type LabelExistenceConditionParams
- type LabelValueConditionParams
- type Membership
- type MembershipFull1
- type MembershipFull2
- type MembershipRoleBinding
- type MetricEndpointConfig
- type OSRelease
- type Operator
- type PasswordRecoveryToken
- type Project
- type ProjectApplicationCounts
- type ProjectConfig
- type ProjectDeviceCounts
- type ProjectFull
- type ProjectMetricsConfig
- type Protocol
- type Query
- type RegisterDeviceRequest
- type RegisterDeviceResponse
- type RegistrationToken
- type Release
- type ReleaseDeviceCounts
- type ReleaseFull
- type ReleaseSelector
- type Role
- type ScheduleType
- type ScheduledDevice
- type SchedulingRule
- type Service
- type ServiceAccount
- type ServiceAccountAccessKey
- type ServiceAccountAccessKeyWithValue
- type ServiceAccountFull
- type ServiceAccountRoleBinding
- type ServiceMetricsConfig
- type ServiceState
- type ServiceStateConditionParams
- type ServiceStateCount
- type Session
- type SetDeviceApplicationStatusRequest
- type SetDeviceInfoRequest
- type SetDeviceServiceStateRequest
- type SetDeviceServiceStatusRequest
- type SsoJWT
- type User
- type UserAccessKey
- type UserAccessKeyWithValue
- type UserFull
- type WhitelistedTag
Constants ¶
View Source
const ( HashLabel = labelPrefix + "hash" ServiceLabel = labelPrefix + "service" ApplicationLabel = labelPrefix + "application" AgentVersionLabel = labelPrefix + "agent-version" )
View Source
const ( DeviceStatusOnline = DeviceStatus("online") DeviceStatusOffline = DeviceStatus("offline") )
View Source
const ( ProtocolTCP = Protocol("tcp") ProtocolHTTP = Protocol("http") )
View Source
const ( DefaultMetricPort uint = 2112 DefaultMetricPath string = "/metrics" )
View Source
const ( ServiceMetricsConfigKey = "service-metrics-config" ProjectMetricsConfigKey = "project-metrics-config" DeviceMetricsConfigKey = "device-metrics-config" )
View Source
const ( DevicePropertyCondition = ConditionType("DevicePropertyCondition") LabelValueCondition = ConditionType("LabelValueCondition") LabelExistenceCondition = ConditionType("LabelExistenceCondition") ApplicationReleaseCondition = ConditionType("ApplicationReleaseCondition") ApplicationExistenceCondition = ConditionType("ApplicationExistenceCondition") ServiceStateCondition = ConditionType("ServiceStateCondition") )
View Source
const ( OperatorIs = Operator("is") OperatorIsNot = Operator("is not") OperatorExists = Operator("exists") OperatorNotExists = Operator("does not exist") )
View Source
const ( ScheduleTypeNoDevices = "NoDevices" ScheduleTypeAllDevices = "AllDevices" ScheduleTypeConditional = "Conditional" )
View Source
const (
AnyApplicationRelease = string("any")
)
View Source
const LatestRelease = "latest"
Variables ¶
View Source
var AllServiceStates = map[ServiceState]bool{ ServiceStateUnknown: true, ServiceStatePullingImage: true, ServiceStateCreatingContainer: true, ServiceStateStoppingPreviousContainer: true, ServiceStateRemovingPreviousContainer: true, ServiceStateStartingContainer: true, ServiceStateRunning: true, ServiceStateExited: true, }
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { ID string `json:"id" yaml:"id"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt"` ProjectID string `json:"projectId" yaml:"projectId"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` SchedulingRule SchedulingRule `json:"schedulingRule" yaml:"schedulingRule"` MetricEndpointConfigs map[string]MetricEndpointConfig `json:"metricEndpointConfigs" yaml:"metricEndpointConfigs"` }
type ApplicationDeviceCounts ¶
type ApplicationDeviceCounts struct {
AllCount int `json:"allCount" yaml:"allCount"`
}
type ApplicationFull1 ¶
type ApplicationFull1 struct { Application LatestRelease *Release `json:"latestRelease" yaml:"latestRelease"` DeviceCounts ApplicationDeviceCounts `json:"deviceCounts" yaml:"deviceCounts"` ServiceStateCounts []ServiceStateCount `json:"serviceStateCounts" yaml:"serviceStateCounts"` }
type Auth0SsoRequest ¶
type Bundle ¶
type Bundle struct { Applications []FullBundledApplication `json:"applications" yaml:"applications"` ApplicationStatuses []DeviceApplicationStatus `json:"applicationStatuses" yaml:"applicationStatuses"` ServiceStatuses []DeviceServiceStatus `json:"serviceStatuses" yaml:"serviceStatuses"` ServiceStates []DeviceServiceState `json:"serviceStates" yaml:"serviceStates"` DeviceID string `json:"deviceId" yaml:"deviceId"` DeviceName string `json:"deviceName" yaml:"deviceName"` EnvironmentVariables map[string]string `json:"environmentVariables" yaml:"environmentVariables"` DesiredAgentVersion string `json:"desiredAgentVersion" yaml:"desiredAgentVersion"` ServiceMetricsConfigs []ServiceMetricsConfig `json:"serviceMetricsConfig" yaml:"serviceMetricsConfig"` DeviceMetricsConfig *DeviceMetricsConfig `json:"deviceMetricsConfig" yaml:"deviceMetricsConfig"` }
type BundledApplication ¶
type BundledApplication struct { ID string `json:"id" yaml:"id"` ProjectID string `json:"projectId" yaml:"projectId"` Name string `json:"name" yaml:"name"` MetricEndpointConfigs map[string]MetricEndpointConfig `json:"metricEndpointConfigs" yaml:"metricEndpointConfigs"` }
type Condition ¶
type Condition struct { Type ConditionType `json:"type"` Params map[string]interface{} `json:"params"` }
type ConditionType ¶
type ConditionType string
type Connection ¶
type CreateReleaseRequest ¶
type CreateReleaseRequest struct {
RawConfig string `json:"rawConfig" validate:"config"`
}
type DatadogMetric ¶
type DatadogPostMetricsRequest ¶
type DatadogPostMetricsRequest struct {
Series DatadogSeries `json:"series"`
}
type DatadogSeries ¶
type DatadogSeries []DatadogMetric
type Device ¶
type Device struct { ID string `json:"id" yaml:"id"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt"` ProjectID string `json:"projectId" yaml:"projectId"` Name string `json:"name" yaml:"name"` RegistrationTokenID *string `json:"registrationTokenId" yaml:"registrationTokenId"` DesiredAgentVersion string `json:"desiredAgentVersion" yaml:"desiredAgentVersion"` Info DeviceInfo `json:"info" yaml:"info"` LastSeenAt time.Time `json:"lastSeenAt" yaml:"lastSeenAt"` Status DeviceStatus `json:"status" yaml:"status"` Labels map[string]string `json:"labels" yaml:"labels"` EnvironmentVariables map[string]string `json:"environmentVariables" yaml:"environmentVariables"` }
type DeviceAccessKey ¶
type DeviceApplicationStatus ¶
type DeviceApplicationStatusFull ¶
type DeviceApplicationStatusFull struct { DeviceApplicationStatus CurrentRelease Release `json:"currentRelease" yaml:"currentRelease"` }
type DeviceApplicationStatusInfo ¶
type DeviceApplicationStatusInfo struct { Application Application `json:"application" yaml:"application"` ApplicationStatus *DeviceApplicationStatusFull `json:"applicationStatus" yaml:"applicationStatus"` ServiceStatuses []DeviceServiceStatusFull `json:"serviceStatuses" yaml:"serviceStatuses"` ServiceStates []DeviceServiceState `json:"serviceStates" yaml:"serviceStates"` }
type DeviceFull ¶
type DeviceFull struct { Device ApplicationStatusInfo []DeviceApplicationStatusInfo `json:"applicationStatusInfo" yaml:"applicationStatusInfo"` }
type DeviceInfo ¶
type DeviceMetricsConfig ¶
type DeviceMetricsConfig struct {
ExposedMetrics []ExposedMetric `json:"exposedMetrics" yaml:"exposedMetrics"`
}
type DeviceRegistrationToken ¶
type DeviceRegistrationToken struct { ID string `json:"id" yaml:"id"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt"` ProjectID string `json:"projectId" yaml:"projectId"` MaxRegistrations *int `json:"maxRegistrations" yaml:"maxRegistrations"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Labels map[string]string `json:"labels" yaml:"labels"` EnvironmentVariables map[string]string `json:"environmentVariables" yaml:"environmentVariables"` }
type DeviceRegistrationTokenFull ¶
type DeviceRegistrationTokenFull struct { DeviceRegistrationToken DeviceCounts DevicesRegisteredWithTokenCount `json:"deviceCounts" yaml:"deviceCounts"` }
type DeviceServiceState ¶
type DeviceServiceState struct { ProjectID string `json:"projectId" yaml:"projectId"` DeviceID string `json:"deviceId" yaml:"deviceId"` ApplicationID string `json:"applicationId" yaml:"applicationId"` Service string `json:"service" yaml:"service"` State ServiceState `json:"state" yaml:"state"` ErrorMessage string `json:"errorMessage" yaml:"errorMessage"` }
type DeviceServiceStatus ¶
type DeviceServiceStatus struct { ProjectID string `json:"projectId" yaml:"projectId"` DeviceID string `json:"deviceId" yaml:"deviceId"` ApplicationID string `json:"applicationId" yaml:"applicationId"` Service string `json:"service" yaml:"service"` CurrentReleaseID string `json:"currentReleaseId" yaml:"currentReleaseId"` }
type DeviceServiceStatusFull ¶
type DeviceServiceStatusFull struct { DeviceServiceStatus CurrentRelease Release `json:"currentRelease" yaml:"currentRelease"` }
type DeviceStatus ¶
type DeviceStatus string
type DevicesRegisteredWithTokenCount ¶
type DevicesRegisteredWithTokenCount struct {
AllCount int `json:"allCount" yaml:"allCount"`
}
type ExposedMetric ¶
type ExposedMetric struct { Name string `json:"name" yaml:"name"` Labels []string `json:"labels" yaml:"labels"` Properties []string `json:"properties" yaml:"properties"` WhitelistedTags []WhitelistedTag `json:"whitelistedTags" yaml:"whitelistedTags"` }
type ExternalUser ¶
type FullBundledApplication ¶
type FullBundledApplication struct { Application BundledApplication `json:"application" yaml:"application"` LatestRelease Release `json:"latestRelease" yaml:"latestRelease"` }
type IntermediateServiceMetricsRequest ¶
type IntermediateServiceMetricsRequest map[string](map[string]DatadogSeries)
type InternalUser ¶
type Membership ¶
type MembershipFull1 ¶
type MembershipFull1 struct { Membership User User `json:"user" yaml:"user"` Project ProjectFull `json:"project" yaml:"project"` }
type MembershipFull2 ¶
type MembershipFull2 struct { Membership User UserFull `json:"user" yaml:"user"` Roles []Role `json:"roles" yaml:"roles"` }
type MembershipRoleBinding ¶
type MetricEndpointConfig ¶
type PasswordRecoveryToken ¶
type ProjectApplicationCounts ¶
type ProjectApplicationCounts struct {
AllCount int `json:"allCount" yaml:"allCount"`
}
type ProjectConfig ¶
type ProjectDeviceCounts ¶
type ProjectDeviceCounts struct {
AllCount int `json:"allCount" yaml:"allCount"`
}
type ProjectFull ¶
type ProjectFull struct { Project DeviceCounts ProjectDeviceCounts `json:"deviceCounts" yaml:"deviceCounts"` ApplicationCounts ProjectApplicationCounts `json:"applicationCounts" yaml:"applicationCounts"` }
type ProjectMetricsConfig ¶
type ProjectMetricsConfig struct {
ExposedMetrics []ExposedMetric `json:"exposedMetrics" yaml:"exposedMetrics"`
}
type RegisterDeviceRequest ¶
type RegisterDeviceRequest struct {
DeviceRegistrationTokenID string `json:"deviceRegistrationTokenId" validate:"id"`
}
type RegisterDeviceResponse ¶
type RegistrationToken ¶
type Release ¶
type Release struct { ID string `json:"id" yaml:"id"` Number uint32 `json:"number" yaml:"number"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt"` ProjectID string `json:"projectId" yaml:"projectId"` ApplicationID string `json:"applicationId" yaml:"applicationId"` Config map[string]Service `json:"config" yaml:"config"` RawConfig string `json:"rawConfig" yaml:"rawConfig"` CreatedByUserID *string `json:"createdByUserId" yaml:"createdByUserId"` CreatedByServiceAccountID *string `json:"createdByServiceAccountId" yaml:"createdByServiceAccountId"` }
type ReleaseDeviceCounts ¶
type ReleaseDeviceCounts struct {
AllCount int `json:"allCount" yaml:"allCount"`
}
type ReleaseFull ¶
type ReleaseFull struct { Release CreatedByUser *User `json:"createdByUser" yaml:"createdByUser"` CreatedByServiceAccount *ServiceAccount `json:"createdByServiceAccount" yaml:"createdByServiceAccount"` DeviceCounts ReleaseDeviceCounts `json:"deviceCounts" yaml:"deviceCounts"` }
type ReleaseSelector ¶
type Role ¶
type Role struct { ID string `json:"id" yaml:"id"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt"` ProjectID string `json:"projectId" yaml:"projectId"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Config string `json:"config" yaml:"config"` }
type ScheduleType ¶
type ScheduleType string
type ScheduledDevice ¶
type SchedulingRule ¶
type SchedulingRule struct { ScheduleType ScheduleType `json:"scheduleType"` DefaultReleaseID string `json:"defaultReleaseId"` // TODO: validate Release ID? ConditionalQuery *Query `json:"conditionalQuery,omitempty"` ReleaseSelectors []ReleaseSelector `json:"releaseSelectors"` }
type Service ¶
type Service struct { CapAdd []string `yaml:"cap_add,omitempty"` CapDrop []string `yaml:"cap_drop,omitempty"` Command yamltypes.Command `yaml:"command,flow,omitempty"` CPUSet string `yaml:"cpuset,omitempty"` CPUQuota yamltypes.StringorInt `yaml:"cpu_quota,omitempty"` Devices []string `yaml:"devices,omitempty"` DNS yamltypes.Stringorslice `yaml:"dns,omitempty"` DNSOpts []string `yaml:"dns_opt,omitempty"` DNSSearch yamltypes.Stringorslice `yaml:"dns_search,omitempty"` DomainName string `yaml:"domainname,omitempty"` Entrypoint yamltypes.Command `yaml:"entrypoint,flow,omitempty"` Environment yamltypes.MaporEqualSlice `yaml:"environment,omitempty"` ExtraHosts []string `yaml:"extra_hosts,omitempty"` GroupAdd []string `yaml:"group_add,omitempty"` Image string `yaml:"image,omitempty"` Hostname string `yaml:"hostname,omitempty"` Ipc string `yaml:"ipc,omitempty"` Labels yamltypes.SliceorMap `yaml:"labels,omitempty"` MemLimit yamltypes.MemStringorInt `yaml:"mem_limit,omitempty"` MemReservation yamltypes.MemStringorInt `yaml:"mem_reservation,omitempty"` MemSwapLimit yamltypes.MemStringorInt `yaml:"memswap_limit,omitempty"` NetworkMode string `yaml:"network_mode,omitempty"` OomKillDisable bool `yaml:"oom_kill_disable,omitempty"` OomScoreAdj yamltypes.StringorInt `yaml:"oom_score_adj,omitempty"` Pid string `yaml:"pid,omitempty"` Ports []string `yaml:"ports,omitempty"` Privileged bool `yaml:"privileged,omitempty"` ReadOnly bool `yaml:"read_only,omitempty"` Restart string `yaml:"restart,omitempty"` Runtime string `yaml:"runtime,omitempty"` SecurityOpt []string `yaml:"security_opt,omitempty"` ShmSize yamltypes.MemStringorInt `yaml:"shm_size,omitempty"` StopSignal string `yaml:"stop_signal,omitempty"` Tty bool `yaml:"tty,omitempty"` User string `yaml:"user,omitempty"` Uts string `yaml:"uts,omitempty"` Volumes *yamltypes.Volumes `yaml:"volumes,omitempty"` WorkingDir string `yaml:"working_dir,omitempty"` }
type ServiceAccount ¶
type ServiceAccountAccessKey ¶
type ServiceAccountAccessKey struct { ID string `json:"id" yaml:"id"` CreatedAt time.Time `json:"createdAt" yaml:"createdAt"` ProjectID string `json:"projectId" yaml:"projectId"` ServiceAccountID string `json:"serviceAccountId" yaml:"serviceAccountId"` Description string `json:"description" yaml:"description"` }
type ServiceAccountAccessKeyWithValue ¶
type ServiceAccountAccessKeyWithValue struct { ServiceAccountAccessKey Value string `json:"value" yaml:"value"` }
type ServiceAccountFull ¶
type ServiceAccountFull struct { ServiceAccount Roles []Role `json:"roles" yaml:"roles"` }
type ServiceMetricsConfig ¶
type ServiceMetricsConfig struct { ApplicationID string `json:"applicationId" yaml:"applicationId"` Service string `json:"service" yaml:"service"` ExposedMetrics []ExposedMetric `json:"exposedMetrics" yaml:"exposedMetrics"` }
type ServiceState ¶
type ServiceState string
const ( ServiceStateUnknown ServiceState = "unknown" ServiceStatePullingImage ServiceState = "pulling image" ServiceStateCreatingContainer ServiceState = "creating container" ServiceStateStoppingPreviousContainer ServiceState = "stopping previous container" ServiceStateRemovingPreviousContainer ServiceState = "removing previous container" ServiceStateStartingContainer ServiceState = "starting container" ServiceStateRunning ServiceState = "running" ServiceStateExited ServiceState = "exited" )
type ServiceStateConditionParams ¶
type ServiceStateConditionParams struct { ApplicationID string `json:"applicationId"` Service string `json:"service"` Operator Operator `json:"operator"` ServiceState ServiceState `json:"serviceState"` }
type ServiceStateCount ¶
type ServiceStateCount struct { Count int `json:"count" yaml:"count"` CountErroring int `json:"countErroring" yaml:"countErroring"` State ServiceState `json:"state" yaml:"state"` Service string `json:"service" yaml:"service"` ApplicationID string `json:"applicationId" yaml:"applicationId"` }
type SetDeviceApplicationStatusRequest ¶
type SetDeviceApplicationStatusRequest struct {
CurrentReleaseID string `json:"currentReleaseId" validate:"id"`
}
type SetDeviceInfoRequest ¶
type SetDeviceInfoRequest struct {
DeviceInfo DeviceInfo `json:"deviceInfo"` // TODO: validate
}
type SetDeviceServiceStateRequest ¶
type SetDeviceServiceStateRequest struct { State ServiceState `json:"state"` ErrorMessage string `json:"errorMessage"` }
type SetDeviceServiceStatusRequest ¶
type SetDeviceServiceStatusRequest struct {
CurrentReleaseID string `json:"currentReleaseId" validate:"id"`
}
type UserAccessKey ¶
type UserAccessKeyWithValue ¶
type UserAccessKeyWithValue struct { UserAccessKey Value string `json:"value" yaml:"value"` }
type WhitelistedTag ¶
Click to show internal directories.
Click to hide internal directories.