Documentation
¶
Index ¶
- Constants
- Variables
- func GetError(code int) error
- func GetStatusCode(err error) int
- func SetDefaultPermissions(instance Instance, permissions permV2Client.ResourcePermissions)
- type AuthAction
- type ImportType
- type ImportTypeConfig
- type Instance
- type InstanceConfig
- type InstanceStatus
- type Instances
- type Type
Constants ¶
View Source
const PermV2InstanceTopic = "import-instances"
Variables ¶
View Source
var ErrBadRequest = errors.New("bad request")
View Source
var ErrForbidden = fmt.Errorf("forbidden")
View Source
var ErrInternalServerError = errors.New("internal server error")
View Source
var ErrNotFound = fmt.Errorf("not found")
Functions ¶
func GetStatusCode ¶ added in v0.0.28
func SetDefaultPermissions ¶ added in v0.0.15
func SetDefaultPermissions(instance Instance, permissions permV2Client.ResourcePermissions)
Types ¶
type AuthAction ¶
type AuthAction string
const ( READ AuthAction = "r" WRITE AuthAction = "w" EXECUTE AuthAction = "x" ADMINISTRATE AuthAction = "a" )
func (AuthAction) String ¶
func (this AuthAction) String() string
type ImportType ¶
type ImportTypeConfig ¶
type Instance ¶
type Instance struct {
Id string `json:"id"`
Name string `json:"name"`
ImportTypeId string `json:"import_type_id"`
Image string `json:"image"`
KafkaTopic string `json:"kafka_topic"`
Configs []InstanceConfig `json:"configs"`
Restart *bool `json:"restart"`
ServiceId string `json:"-"`
Owner string `json:"-"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Generated bool `json:"generated"`
// Status is filled from the deployment backend on read and is never persisted.
Status *InstanceStatus `json:"status,omitempty" bson:"-"`
}
type InstanceConfig ¶
type InstanceStatus ¶ added in v0.1.0
type InstanceStatus struct {
Running bool `json:"running"`
Transitioning bool `json:"transitioning"`
Message string `json:"message,omitempty"`
}
InstanceStatus describes the current state of the container running an instance.
Click to show internal directories.
Click to hide internal directories.