Documentation
¶
Index ¶
- type CreateParams
- type EnvironmentVariable
- type ExposedPort
- type VersionAPI
- type VersionDetail
- type VersionOp
- func (op *VersionOp) Create(ctx context.Context, params CreateParams) (ver *v1.ReadApplicationVersionSummary, err error)
- func (op *VersionOp) Delete(ctx context.Context, id v1.ApplicationVersionNumber) error
- func (op *VersionOp) List(ctx context.Context, maxItems int64, cursor *v1.ApplicationVersionNumber) (list []v1.ApplicationVersionDeploymentStatus, ...)
- func (op *VersionOp) Read(ctx context.Context, id v1.ApplicationVersionNumber) (ver *VersionDetail, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateParams ¶
type CreateParams struct {
CPU int64 `json:"cpu"`
Memory int64 `json:"memory"`
ScalingMode v1.ScalingMode `json:"scalingMode"`
FixedScale *int32 `json:"fixedScale,omitempty"`
MinScale *int32 `json:"minScale,omitempty"`
MaxScale *int32 `json:"maxScale,omitempty"`
ScaleInThreshold *int32 `json:"scaleInThreshold,omitempty"`
ScaleOutThreshold *int32 `json:"scaleOutThreshold,omitempty"`
Image string `json:"image"`
Cmd []string `json:"cmd,omitempty"`
RegistryUsername *string `json:"registryUsername,omitempty"`
RegistryPassword *string `json:"registryPassword,omitempty"`
RegistryPasswordAction v1.RegistryPasswordAction `json:"registryPasswordAction,omitempty"`
ExposedPorts []ExposedPort `json:"exposedPorts,omitempty"`
EnvVars []EnvironmentVariable `json:"envVars,omitempty"`
}
type EnvironmentVariable ¶
type EnvironmentVariable struct {
Key string `json:"key"`
Value *string `json:"value,omitempty"`
Secret bool `json:"secret"`
}
func (*EnvironmentVariable) From ¶
func (e *EnvironmentVariable) From(res *v1.ReadEnvironmentVariable)
type ExposedPort ¶
type ExposedPort struct {
TargetPort v1.Port `json:"targetPort"`
LoadBalancerPort *v1.Port `json:"loadBalancerPort,omitempty"`
UseLetsEncrypt bool `json:"useLetsEncrypt"`
Host []string `json:"host,omitempty"`
HealthCheck *v1.HealthCheck `json:"healthCheck,omitempty"`
}
func (*ExposedPort) From ¶
func (p *ExposedPort) From(res *v1.ExposedPort)
type VersionAPI ¶
type VersionAPI interface {
// List returns the list of ApplicationVersions, paginated.
// Pass nil to `cursor` to get the first page, or
// previously returned `nextCursor` to get the next page.
List(ctx context.Context, maxItems int64, cursor *v1.ApplicationVersionNumber) (list []v1.ApplicationVersionDeploymentStatus, nextCursor *v1.ApplicationVersionNumber, err error)
Create(ctx context.Context, params CreateParams) (version *v1.ReadApplicationVersionSummary, err error)
Read(ctx context.Context, id v1.ApplicationVersionNumber) (version *VersionDetail, err error)
Delete(ctx context.Context, id v1.ApplicationVersionNumber) error
}
type VersionDetail ¶
type VersionDetail struct {
Version v1.ApplicationVersionNumber `json:"version"`
CPU int64 `json:"cpu"`
Memory int64 `json:"memory"`
ScalingMode v1.ScalingMode `json:"scalingMode"`
FixedScale *int32 `json:"fixedScale,omitempty"`
MinScale *int32 `json:"minScale,omitempty"`
MaxScale *int32 `json:"maxScale,omitempty"`
ScaleInThreshold *int32 `json:"scaleInThreshold,omitempty"`
ScaleOutThreshold *int32 `json:"scaleOutThreshold,omitempty"`
Image string `json:"image"`
Cmd []string `json:"cmd,omitempty"`
RegistryUsername *string `json:"registryUsername,omitempty"`
RegistryPassword *string `json:"registryPassword,omitempty"`
ActiveNodeCount int64 `json:"activeNodeCount"`
Created int `json:"created"`
ExposedPorts []ExposedPort `json:"exposedPorts,omitempty"`
EnvVars []EnvironmentVariable `json:"envVars,omitempty"`
}
type VersionOp ¶
type VersionOp struct {
// contains filtered or unexported fields
}
func NewVersionOp ¶
func NewVersionOp(client *v1.Client, applicationID v1.ApplicationID) *VersionOp
func (*VersionOp) Create ¶
func (op *VersionOp) Create(ctx context.Context, params CreateParams) (ver *v1.ReadApplicationVersionSummary, err error)
func (*VersionOp) List ¶
func (op *VersionOp) List(ctx context.Context, maxItems int64, cursor *v1.ApplicationVersionNumber) (list []v1.ApplicationVersionDeploymentStatus, nextCursor *v1.ApplicationVersionNumber, err error)
func (*VersionOp) Read ¶
func (op *VersionOp) Read(ctx context.Context, id v1.ApplicationVersionNumber) (ver *VersionDetail, err error)
Click to show internal directories.
Click to hide internal directories.