Documentation ¶
Index ¶
- Constants
- func NewForbiddenError(err error) error
- func NewInternalError(err error) error
- func NewInvalidInputError(err error) error
- func NewNotFoundError(err error) error
- func NewResourceBusyError(err error) error
- type AuxDepBase
- type AuxDepContainer
- type AuxDepFilter
- type AuxDepReq
- type AuxDepRunConfig
- type AuxDeployment
- type ContainerInfo
- type DepAdvFilter
- type DepAdvertisement
- type DepAdvertisementBase
- type DepAssets
- type DepBase
- type DepConfig
- type DepContainer
- type DepCreateRequest
- type DepFilter
- type DepInput
- type DepModule
- type DepSecret
- type DepSecretVariant
- type DepUpdateTemplate
- type Deployment
- type ForbiddenError
- type HealthState
- type InputTemplate
- type InputTemplateConfig
- type InputTemplateHostRes
- type InputTemplateSecret
- type InternalError
- type InvalidInputError
- type ModAddRequest
- type ModDeployTemplate
- type ModFilter
- type ModUpdate
- type ModUpdatePrepareRequest
- type ModUpdateRequest
- type ModUpdateTemplate
- type Module
- type NotFoundError
- type ResourceBusyError
- type ToggleVal
Constants ¶
View Source
const ( HeaderRequestID = "X-Request-ID" HeaderApiVer = "X-Api-Version" HeaderSrvName = "X-Service" DepIdHeaderKey = "X-MGW-DID" )
View Source
const ( ModulesPath = "modules" ModUpdatesPath = "updates" ModUptPreparePath = "prepare" ModUptCancelPath = "cancel" DeploymentsPath = "deployments" DepTemplatePath = "dep-template" DepUpdateTemplatePath = "upt-template" DepBatchPath = "deployments-batch" DepStartPath = "start" DepStopPath = "stop" DepRestartPath = "restart" DepDeletePath = "delete" AuxDeploymentsPath = "aux-deployments" AuxDepBatchPath = "aux-deployments-batch" JobsPath = "jobs" JobsCancelPath = "cancel" DepAdvertisementsPath = "dep-advertisements" DepAdvertisementsBatchPath = "dep-advertisements-batch" DiscoveryPath = "discovery" SrvInfoPath = "info" RestrictedPath = "restricted" )
Variables ¶
This section is empty.
Functions ¶
func NewForbiddenError ¶
func NewInternalError ¶
func NewInvalidInputError ¶
func NewNotFoundError ¶
func NewResourceBusyError ¶
Types ¶
type AuxDepBase ¶
type AuxDepBase struct { ID string `json:"id"` // uuid DepID string `json:"dep_id"` Image string `json:"image"` Labels map[string]string `json:"labels"` Configs map[string]string `json:"configs"` Volumes map[string]string `json:"volumes"` // {name:mntPoint} Ref string `json:"ref"` Name string `json:"name"` RunConfig AuxDepRunConfig `json:"run_config"` Enabled bool `json:"enabled"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
type AuxDepContainer ¶
type AuxDepContainer struct { ID string `json:"id"` Alias string `json:"alias"` Info *ContainerInfo `json:"info"` }
type AuxDepFilter ¶
type AuxDepReq ¶
type AuxDepReq struct { Image string `json:"image"` Labels map[string]string `json:"labels"` Configs map[string]string `json:"configs"` Volumes map[string]string `json:"volumes"` // {name:mntPoint} Ref string `json:"ref"` // only required by create method Name string `json:"name"` RunConfig *AuxDepRunConfig `json:"run_config"` }
type AuxDepRunConfig ¶
type AuxDeployment ¶
type AuxDeployment struct { AuxDepBase Container AuxDepContainer `json:"container"` }
type ContainerInfo ¶
type DepAdvFilter ¶ added in v0.7.0
type DepAdvertisement ¶ added in v0.7.0
type DepAdvertisement struct { ModuleID string `json:"module_id"` Origin string `json:"origin"` Timestamp time.Time `json:"timestamp"` DepAdvertisementBase }
type DepAdvertisementBase ¶ added in v0.7.0
type DepContainer ¶
type DepContainer struct { ID string `json:"id"` SrvRef string `json:"srv_ref"` Alias string `json:"alias"` Order uint `json:"order"` Info *ContainerInfo `json:"info"` }
type DepCreateRequest ¶
type DepInput ¶
type DepInput struct { Name *string `json:"name"` // defaults to module name if nil HostResources map[string]string `json:"host_resources"` // {ref:resourceID} Secrets map[string]string `json:"secrets"` // {ref:secretID} Configs map[string]any `json:"configs"` // {ref:value} SecretRequests map[string]any // {ref:value} }
type DepSecret ¶
type DepSecret struct { ID string `json:"id"` Variants []DepSecretVariant `json:"variants"` }
type DepSecretVariant ¶
type DepUpdateTemplate ¶
type DepUpdateTemplate struct { Name string `json:"name"` InputTemplate }
type Deployment ¶
type Deployment struct { DepBase RequiredDep []string `json:"required_dep"` // deployments required by this deployment DepRequiring []string `json:"dep_requiring"` // deployments requiring this deployment DepAssets Containers map[string]DepContainer `json:"containers"` // {ref:DepContainer} State *HealthState `json:"state"` }
type ForbiddenError ¶
type ForbiddenError struct {
// contains filtered or unexported fields
}
type HealthState ¶
type HealthState = string
const ( DepHealthy HealthState = "healthy" DepUnhealthy HealthState = "unhealthy" DepTrans HealthState = "transitioning" )
type InputTemplate ¶
type InputTemplate struct { HostResources map[string]InputTemplateHostRes `json:"host_resources"` // {ref:ResourceInput} Secrets map[string]InputTemplateSecret `json:"secrets"` // {ref:SecretInput} Configs map[string]InputTemplateConfig `json:"configs"` // {ref:ConfigInput} InputGroups map[string]module.InputGroup `json:"input_groups"` // {ref:InputGroup} }
type InputTemplateConfig ¶
type InputTemplateConfig struct { module.Input Value any `json:"value"` Default any `json:"default"` Options any `json:"options"` OptExt bool `json:"opt_ext"` Type string `json:"type"` TypeOpt map[string]any `json:"type_opt"` DataType module.DataType `json:"data_type"` IsList bool `json:"is_list"` Required bool `json:"required"` }
type InputTemplateHostRes ¶
type InputTemplateHostRes struct { module.Input module.HostResource Value any `json:"value"` }
type InputTemplateSecret ¶
type InternalError ¶
type InternalError struct {
// contains filtered or unexported fields
}
type InvalidInputError ¶
type InvalidInputError struct {
// contains filtered or unexported fields
}
type ModAddRequest ¶
type ModDeployTemplate ¶
type ModDeployTemplate struct { InputTemplate Dependencies map[string]InputTemplate `json:"dependencies"` }
type ModUpdatePrepareRequest ¶
type ModUpdatePrepareRequest struct {
Version string `json:"version"`
}
type ModUpdateRequest ¶
type ModUpdateTemplate ¶
type ModUpdateTemplate = ModDeployTemplate
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
type ResourceBusyError ¶
type ResourceBusyError struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.