Documentation
¶
Overview ¶
Package api provides data structures for the Drycc Controller API.
Index ¶
- func NewAutodeploy() *bool
- func NewAutorollback() *bool
- func NewRoutable() *bool
- type Address
- type Allowlist
- type App
- type AppCreateRequest
- type AppEvent
- type AppEvents
- type AppLogsRequest
- type AppRunRequest
- type AppSettings
- type AppUpdateRequest
- type Apps
- type AuthLoginRequest
- type AuthLoginResponse
- type AuthTokenResponse
- type Autoscale
- type Autoscales
- type BackendRefRequest
- type Build
- type BuildHookRequest
- type Cert
- type CertAttachRequest
- type CertCreateRequest
- type Command
- type Condition
- type Config
- type ConfigHookRequest
- type ConfigInfo
- type ConfigSet
- type ConfigTags
- type ConfigUnset
- type ConfigValue
- type ConfigVar
- type ContainerProbe
- type ContainerState
- type CreateBuildRequest
- type Domain
- type DomainCreateRequest
- type Domains
- type Event
- type ExecAction
- type FilerDirEntries
- type FilerDirEntry
- type GRPCAction
- type Gateway
- type GatewayCreateRequest
- type GatewayRemoveRequest
- type Gateways
- type HTTPGetAction
- type Healthcheck
- type Issuer
- type KVPair
- type Key
- type KeyCreateRequest
- type Keys
- type Labels
- type Lifecycle
- type LifecycleHandler
- type LimitPlan
- type LimitSpec
- type Listener
- type Mount
- type ParentRef
- type PodIDs
- type PodLogsRequest
- type PodState
- type PodType
- type PodTypes
- type Pods
- type PodsList
- type Port
- type ProcessType
- type Ptype
- type PtypeState
- type PtypeStates
- type PtypeValue
- type Ptypes
- type Release
- type ReleaseRollback
- type RequestRouteRule
- type Resource
- type ResourceBinding
- type ResourcePlan
- type ResourcePlans
- type ResourceService
- type ResourceServices
- type Resources
- type Route
- type RouteAttachRequest
- type RouteCreateRequest
- type RouteDetachRequest
- type RouteRule
- type Routes
- type Service
- type ServiceCreateUpdateRequest
- type ServiceDeleteRequest
- type Services
- type SleepAction
- type TCPSocketAction
- type TLS
- type Token
- type Types
- type Unmount
- type User
- type UserApps
- type UserPermRequest
- type UserPermResponse
- type Users
- type ValuesRefs
- type Volume
- type VolumeMount
- type Volumes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAutodeploy ¶
func NewAutodeploy() *bool
NewAutodeploy returns a default value for the AppSettings.NewAutodeploy field.
func NewAutorollback ¶
func NewAutorollback() *bool
NewAutorollback returns a default value for the AppSettings.Autorollback field.
func NewRoutable ¶
func NewRoutable() *bool
NewRoutable returns a default value for the AppSettings.Routable field.
Types ¶
type Allowlist ¶
type Allowlist struct {
Addresses []string `json:"addresses"`
}
Allowlist is the structure of POST /v2/app/<app id>/allowlist/.
type App ¶
type App struct {
Created string `json:"created"`
ID string `json:"id"`
Owner string `json:"owner"`
Updated string `json:"updated"`
UUID string `json:"uuid"`
}
App is the definition of the app object.
type AppCreateRequest ¶
type AppCreateRequest struct {
ID string `json:"id,omitempty"`
}
AppCreateRequest is the definition of POST /v2/apps/.
type AppEvent ¶
type AppEvent struct {
Reason string `json:"reason"`
Message string `json:"message"`
Created string `json:"created"`
}
AppEvent represents an event in the system.
type AppLogsRequest ¶
type AppLogsRequest struct {
Lines int `json:"lines"`
Follow bool `json:"follow"`
Timeout int `json:"timeout"`
}
AppLogsRequest is the definition of websocket /v2/apps/<app id>/logs
type AppRunRequest ¶
type AppRunRequest struct {
Command string `json:"command"`
Volumes map[string]any `json:"volumes,omitempty"`
Timeout uint32 `json:"timeout,omitempty"`
Expires uint32 `json:"expires,omitempty"`
}
AppRunRequest is the definition of POST /v2/apps/<app id>/run.
type AppSettings ¶
type AppSettings struct {
// Owner is the app owner. It cannot be updated with AppSettings.Set(). See app.Transfer().
Owner string `json:"owner,omitempty"`
// App is the app name. It cannot be updated at all right now.
App string `json:"app,omitempty"`
// Created is the time that the application settings was created and cannot be updated.
Created string `json:"created,omitempty"`
// Updated is the last time the application settings was changed and cannot be updated.
Updated string `json:"updated,omitempty"`
// UUID is a unique string reflecting the application settings in its current state.
// It changes every time the application settings is changed and cannot be updated.
UUID string `json:"uuid,omitempty"`
// Routable determines if the application should be exposed by the router.
Routable *bool `json:"routable,omitempty"`
Allowlist []string `json:"allowlist,omitempty"`
Autodeploy *bool `json:"autodeploy,omitempty"`
Autorollback *bool `json:"autorollback,omitempty"`
Autoscale map[string]*Autoscale `json:"autoscale,omitempty"`
Label Labels `json:"label,omitempty"`
}
AppSettings is the structure of an app's settings.
type AppUpdateRequest ¶
type AppUpdateRequest struct {
Owner string `json:"owner,omitempty"`
}
AppUpdateRequest is the definition of POST /v2/apps/<app id>/.
type AuthLoginRequest ¶
type AuthLoginRequest struct {
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
}
AuthLoginRequest represents the request structure for authentication login.
type AuthLoginResponse ¶
type AuthLoginResponse struct {
Key string `json:"key,omitempty"`
}
AuthLoginResponse represents the response structure for authentication login.
type AuthTokenResponse ¶
type AuthTokenResponse struct {
Token string `json:"token"`
Username string `json:"username,omitempty"`
}
AuthTokenResponse is the definition of /v2/auth/login/.
type Autoscale ¶
type Autoscale struct {
Min int `json:"min"`
Max int `json:"max"`
CPUPercent int `json:"cpu_percent"`
}
Autoscale is a per proc type scaling information
type Autoscales ¶
Autoscales contains a hash of process types and the autoscale rules
type BackendRefRequest ¶
type BackendRefRequest struct {
Kind string `json:"kind,omitempty"`
Name string `json:"name,omitempty"`
Port int32 `json:"port,omitempty"`
Weight int32 `json:"weight,omitempty"`
}
BackendRefRequest represents a backend reference in a route request.
type Build ¶
type Build struct {
App string `json:"app"`
Created string `json:"created"`
Dockerfile string `json:"dockerfile,omitempty"`
Image string `json:"image,omitempty"`
Stack string `json:"stack,omitempty"`
Owner string `json:"owner"`
Procfile map[string]string `json:"procfile"`
Dryccfile map[string]any `json:"dryccfile"`
Sha string `json:"sha,omitempty"`
Updated string `json:"updated"`
UUID string `json:"uuid"`
}
Build is the structure of the build object.
type BuildHookRequest ¶
type BuildHookRequest struct {
Sha string `json:"sha"`
User string `json:"receive_user"`
App string `json:"receive_repo"`
Image string `json:"image"`
Stack string `json:"stack"`
Procfile ProcessType `json:"procfile"`
Dockerfile string `json:"dockerfile"`
Dryccfile map[string]any `json:"dryccfile"`
}
BuildHookRequest is a hook request to create a new build.
type Cert ¶
type Cert struct {
Updated string `json:"updated,omitempty"`
Created string `json:"created,omitempty"`
App string `json:"app"`
Name string `json:"name"`
CommonName string `json:"common_name"`
Expires time.Time `json:"expires"`
Starts time.Time `json:"starts"`
Fingerprint string `json:"fingerprint"`
Issuer string `json:"issuer"`
Subject string `json:"subject"`
SubjectAltName []string `json:"san,omitempty"`
Domains []string `json:"domains,omitempty"`
Owner string `json:"owner,omitempty"`
ID int `json:"id,omitempty"`
}
Cert is the definition of the cert object. Some fields are omtempty because they are only returned when creating or getting a cert.
type CertAttachRequest ¶
type CertAttachRequest struct {
Domain string `json:"domain"`
}
CertAttachRequest is the definition of POST to /v2/certs/<cert>/domain
type CertCreateRequest ¶
type CertCreateRequest struct {
Certificate string `json:"certificate"`
Key string `json:"key"`
Name string `json:"name"`
}
CertCreateRequest is the definition of POST and PUT to /v2/certs/
type Command ¶
type Command struct {
Tty bool `json:"tty"`
Stdin bool `json:"stdin"`
Command []string `json:"command"`
}
Command defines a command of app exec.
type Condition ¶
type Condition struct {
State string `json:"state"`
Action string `json:"action"`
Ptypes []string `json:"ptypes"`
Exception string `json:"exception"`
Created string `json:"created"`
}
Condition represents a condition in a release.
type Config ¶
type Config struct {
// Owner is the app owner. It cannot be updated with config.Set(). See app.Transfer().
Owner string `json:"owner,omitempty"`
// App is the app name. It cannot be updated at all right now.
App string `json:"app,omitempty"`
// Values are exposed as environment variables to the app.
Values []ConfigValue `json:"values,omitempty"`
// Typed values are exposed as environment variables to the app.
ValuesRefs ValuesRefs `json:"values_refs,omitempty"`
// Limits is used to set process resources limits. The key is the process name
// and the value is a limit plan. Ex: std1.xlarge.c1m1
Limits map[string]any `json:"limits,omitempty"`
// Timeout is used to set termination grace period. The key is the process name
// and the value is a number in seconds, e.g. 30
Timeout map[string]any `json:"termination_grace_period,omitempty"`
// Lifecycle is a map of lifecycles for each process type.
Lifecycle map[string]*Lifecycle `json:"lifecycle,omitempty"`
// Healthcheck is map of healthchecks for each process that the application uses.
Healthcheck map[string]*Healthcheck `json:"healthcheck,omitempty"`
// Tags restrict applications to run on k8s nodes with that label.
Tags map[string]ConfigTags `json:"tags,omitempty"`
// Registry is a key-value pair to provide authentication for container registries.
// The key is the username and the value is the password.
Registry map[string]map[string]any `json:"registry,omitempty"`
// Created is the time that the application was created and cannot be updated.
Created string `json:"created,omitempty"`
// Updated is the last time the configuration was changed and cannot be updated.
Updated string `json:"updated,omitempty"`
// UUID is a unique string reflecting the configuration in its current state.
// It changes every time the configuration is changed and cannot be updated.
UUID string `json:"uuid,omitempty"`
}
Config is the structure of an app's config.
type ConfigHookRequest ¶
type ConfigHookRequest struct {
User string `json:"receive_user"`
App string `json:"receive_repo"`
}
ConfigHookRequest defines the request for configuration from the config hook.
type ConfigInfo ¶
type ConfigInfo struct {
Ptype map[string]PtypeValue `json:"ptype,omitempty"`
Group map[string][]ConfigVar `json:"group,omitempty"`
}
ConfigInfo represents the complete configuration information for an app.
type ConfigSet ¶
type ConfigSet struct {
Values []ConfigValue `json:"values"`
}
ConfigSet is the definition of POST /v2/apps/<app id>/config/.
type ConfigUnset ¶
type ConfigUnset struct {
Values []ConfigValue `json:"values"`
}
ConfigUnset is the definition of POST /v2/apps/<app id>/config/.
type ConfigValue ¶
type ConfigValue struct {
Ptype string `json:"ptype,omitempty"`
Group string `json:"group,omitempty"`
ConfigVar
}
ConfigValue represents a configuration value with its type and group.
type ContainerProbe ¶
type ContainerProbe struct {
InitialDelaySeconds int `json:"initialDelaySeconds"`
TimeoutSeconds int `json:"timeoutSeconds"`
PeriodSeconds int `json:"periodSeconds"`
SuccessThreshold int `json:"successThreshold"`
FailureThreshold int `json:"failureThreshold"`
Exec *ExecAction `json:"exec,omitempty"`
GRPC *GRPCAction `json:"grpc,omitempty"`
HTTPGet *HTTPGetAction `json:"httpGet,omitempty"`
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"`
}
ContainerProbe defines a container healthcheck probe.
func (ContainerProbe) String ¶
func (c ContainerProbe) String() string
String displays the ContainerProbe in a readable format.
type ContainerState ¶
type ContainerState struct {
Container string `json:"container"`
Image string `json:"image"`
Command []string `json:"command"`
Args []string `json:"args"`
State map[string]map[string]any `json:"state"`
LastState map[string]map[string]any `json:"lastState"`
Ready bool `json:"ready"`
RestartCount int `json:"restartCount"`
Status string `json:"status"`
Reason string `json:"reason"`
Message string `json:"message"`
}
ContainerState defines a container state.
type CreateBuildRequest ¶
type CreateBuildRequest struct {
Image string `json:"image"`
Stack string `json:"stack,omitempty"`
Procfile map[string]string `json:"procfile,omitempty"`
Dryccfile map[string]any `json:"dryccfile,omitempty"`
}
CreateBuildRequest is the structure of POST /v2/apps/<app id>/builds/.
type Domain ¶
type Domain struct {
App string `json:"app"`
Created string `json:"created"`
Domain string `json:"domain"`
Owner string `json:"owner"`
Ptype string `json:"ptype"`
Updated string `json:"updated"`
}
Domain is the structure of the domain object.
type DomainCreateRequest ¶
DomainCreateRequest is the structure of POST /v2/app/<app id>/domains/.
type ExecAction ¶
type ExecAction struct {
Command []string `json:"command"`
}
ExecProbe executes a command within a Pod.
func (ExecAction) String ¶
func (e ExecAction) String() string
String displays the ExecAction in a readable format.
type FilerDirEntries ¶
type FilerDirEntries []FilerDirEntry
FilerDirEntries is a collection of FilerDirEntry.
type FilerDirEntry ¶
type FilerDirEntry struct {
Name string `json:"name,omitempty"`
Path string `json:"path,omitempty"`
Size string `json:"size,omitempty"`
Type string `json:"type,omitempty"`
Timestamp string `json:"timestamp,omitempty"`
}
FilerDirEntry represents a directory entry in the file system.
type GRPCAction ¶
GRPCAction performs an GRPC request to the Pod with the given path, port and headers.
func (GRPCAction) String ¶
func (g GRPCAction) String() string
String displays the GRPCAction in a readable format.
type Gateway ¶
type Gateway struct {
// Owner is the app owner. It cannot be updated with AppSettings.Set(). See app.Transfer().
Owner string `json:"owner,omitempty"`
// App is the app name. It cannot be updated at all right now.
App string `json:"app,omitempty"`
// Created is the time that the application settings was created and cannot be updated.
Created string `json:"created,omitempty"`
// Updated is the last time the application settings was changed and cannot be updated.
Updated string `json:"updated,omitempty"`
// UUID is a unique string reflecting the application settings in its current state.
// It changes every time the application settings is changed and cannot be updated.
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Listeners []Listener `json:"listeners,omitempty"`
Addresses []Address `json:"addresses,omitempty"`
}
Gateway is the structure of an app's gateways.
type GatewayCreateRequest ¶
type GatewayCreateRequest struct {
Name string `json:"name,omitempty"`
Port int `json:"port,omitempty"`
Protocol string `json:"protocol,omitempty"`
}
GatewayCreateRequest is the structure of POST /v2/app/<app id>/gateways/.
type GatewayRemoveRequest ¶
type GatewayRemoveRequest struct {
Name string `json:"name,omitempty"`
Port int `json:"port,omitempty"`
Protocol string `json:"protocol,omitempty"`
}
GatewayRemoveRequest is the structure of Delete /v2/app/<app id>/gateways/.
type HTTPGetAction ¶
type HTTPGetAction struct {
Path string `json:"path,omitempty"`
Port int `json:"port"`
HTTPHeaders []*KVPair `json:"httpHeaders,omitempty"`
}
HTTPGetAction performs an HTTP GET request to the Pod with the given path, port and headers.
func (HTTPGetAction) String ¶
func (h HTTPGetAction) String() string
String displays the HTTPGetAction in a readable format.
type Healthcheck ¶
type Healthcheck struct {
StartupProbe **ContainerProbe `json:"startupProbe,omitempty"`
LivenessProbe **ContainerProbe `json:"livenessProbe,omitempty"`
ReadinessProbe **ContainerProbe `json:"readinessProbe,omitempty"`
}
Healthcheck defines a container healthcheck.
type Issuer ¶
type Issuer struct {
Email string `json:"email"`
Server string `json:"server"`
KeyID string `json:"key_id"`
KeySecret string `json:"key_secret"`
}
Issuer is the structure of POST /v2/app/<app id>/tls/.
type Key ¶
type Key struct {
Created string `json:"created"`
ID string `json:"id"`
Owner string `json:"owner"`
Public string `json:"public"`
Updated string `json:"updated"`
UUID string `json:"uuid"`
}
Key is the definition of the key object.
type KeyCreateRequest ¶
type KeyCreateRequest struct {
ID string `json:"id"`
Public string `json:"public"`
Name string `json:"name,omitempty"`
}
KeyCreateRequest is the definition of POST /v2/keys/.
type Lifecycle ¶
type Lifecycle struct {
PostStart **LifecycleHandler `json:"postStart,omitempty"`
PreStop **LifecycleHandler `json:"preStop,omitempty"`
StopSignal string `json:"stopSignal,omitempty"`
}
Lifecycle defines actions to take in the container lifecycle.
type LifecycleHandler ¶
type LifecycleHandler struct {
Exec *ExecAction `json:"exec,omitempty"`
HTTPGet *HTTPGetAction `json:"httpGet,omitempty"`
Sleep *SleepAction `json:"sleep,omitempty"`
TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty"`
}
LifecycleHandler defines actions to take in the container lifecycle.
func (LifecycleHandler) String ¶
func (l LifecycleHandler) String() string
String displays the LifecycleHandler in a readable format.
type LimitPlan ¶
type LimitPlan struct {
ID string `json:"id"`
Spec LimitSpec `json:"spec"`
CPU int `json:"cpu"`
Memory int `json:"memory"`
Features map[string]any `json:"features"`
Disabled bool `json:"disabled"`
}
LimitPlan is the definition of GET /v2/limits/plans/
type LimitSpec ¶
type LimitSpec struct {
ID string `json:"id"`
CPU map[string]any `json:"cpu"`
Memory map[string]any `json:"memory"`
Features map[string]any `json:"features"`
Keywords []string `json:"keywords"`
Disabled bool `json:"disabled"`
}
LimitSpec is the definition of GET /v2/limits/specs/
type Listener ¶
type Listener struct {
Name string `json:"name,omitempty"`
Port int `json:"port,omitempty"`
Protocol string `json:"protocol,omitempty"`
AllowedRoutes any `json:"allowedRoutes,omitempty"`
}
Listener represents a gateway listener configuration.
type PodIDs ¶
type PodIDs struct {
PodIDs string `json:"pod_ids"`
}
PodIDs represents a list of pod IDs.
type PodLogsRequest ¶
type PodLogsRequest struct {
Lines int `json:"lines"`
Follow bool `json:"follow"`
Container string `json:"container"`
Previous bool `json:"previous"`
}
PodLogsRequest is the definition of websocket /v2/apps/<app id>/logs
type Pods ¶
type Pods struct {
Release string `json:"release"`
Type string `json:"type"`
Name string `json:"name"`
State string `json:"state"`
Ready string `json:"ready"`
Restarts int `json:"restarts"`
Started string `json:"started"`
}
Pods defines the structure of a process.
type Port ¶
type Port struct {
Name string `json:"name"`
Port int `json:"port"`
Protocol string `json:"protocol"`
TargetPort int `json:"targetPort"`
}
Port represents a port configuration in a service.
type ProcessType ¶
ProcessType represents the key/value mappings of a process type to a process inside a Heroku Procfile.
type Ptype ¶
type Ptype struct {
Name string `json:"name"`
Release string `json:"release"`
Ready string `json:"ready"`
UpToDate int `json:"up_to_date"`
AvailableReplicas int `json:"available_replicas"`
Started string `json:"started"`
Garbage bool `json:"garbage"`
}
Ptype defines the structure of ptype deployment.
type PtypeState ¶
type PtypeState struct {
Container string `json:"container"`
Image string `json:"image"`
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
StartupProbe ContainerProbe `json:"startup_probe,omitempty"`
LivenessProbe ContainerProbe `json:"liveness_probe,omitempty"`
ReadinessProbe ContainerProbe `json:"readiness_probe,omitempty"`
Limits map[string]string `json:"limits,omitempty"`
VolumeMounts []VolumeMount `json:"volume_mounts,omitempty"`
NodeSelector map[string]string `json:"node_selector,omitempty"`
}
PtypeState defines a ptype deployment state.
type PtypeStates ¶
type PtypeStates []PtypeState
PtypeStates defines a collection of container state.
type PtypeValue ¶
type PtypeValue struct {
Env []ConfigVar `json:"env,omitempty"`
Ref []string `json:"ref,omitempty"`
}
PtypeValue represents values for a specific process type.
type Release ¶
type Release struct {
App string `json:"app"`
State string `json:"state"`
Build string `json:"build,omitempty"`
Config string `json:"config"`
Created string `json:"created"`
Owner string `json:"owner"`
Summary string `json:"summary"`
Exception string `json:"exception"`
Conditions []Condition `json:"conditions"`
Updated string `json:"updated"`
UUID string `json:"uuid"`
Version int `json:"version"`
}
Release is the definition of the release object.
type ReleaseRollback ¶
ReleaseRollback is the defenition of POST /v2/apps/<app id>/releases/.
type RequestRouteRule ¶
type RequestRouteRule struct {
BackendRefs []BackendRefRequest `json:"backendRefs,omitempty"`
}
RequestRouteRule represents a route rule in a request.
type Resource ¶
type Resource struct {
// Owner is the app owner.
Owner string `json:"owner,omitempty"`
// App is the app the tls settings apply to and cannot be updated.
App string `json:"app,omitempty"`
// Created is the time that the resource was created and cannot be updated.
Created string `json:"created,omitempty"`
// Updated is the last time the TLS settings was changed and cannot be updated.
Updated string `json:"updated,omitempty"`
// UUID is a unique string reflecting the resource in its current state.
// It changes every time the resource is changed and cannot be updated.
UUID string `json:"uuid,omitempty"`
// Resource's name
Name string `json:"name,omitempty"`
// Resource's Plan
Plan string `json:"plan,omitempty"`
// Resource connet info
Data map[string]any `json:"data,omitempty"`
// Resource's status
Status string `json:"status,omitempty"`
// Resource's binding status
Binding string `json:"binding,omitempty"`
// Resource Options
Options map[string]any `json:"options,omitempty"`
// Resource instance message
Message string `json:"message,omitempty"`
}
Resource is the structure of an app's resource.
type ResourceBinding ¶
type ResourceBinding struct {
BindAction string `json:"bind_action,omitempty"`
}
ResourceBinding is the definition of PATCH /v2/apps/<app_id>/resources/<name>/binding/.
type ResourcePlan ¶
type ResourcePlan struct {
// ID is a unique string for resource plan.
ID string `json:"id,omitempty"`
// Name is a unique string for resource plan.
Name string `json:"name,omitempty"`
// Description is a detailed description of the resource plan
Description string `json:"description,omitempty"`
}
ResourcePlan is the structure of an app's resource plan.
type ResourcePlans ¶
type ResourcePlans []ResourcePlan
ResourcePlans is a collection of ResourcePlan.
type ResourceService ¶
type ResourceService struct {
// ID is a unique string for resource service.
ID string `json:"id,omitempty"`
// Name is a unique string for resource service.
Name string `json:"name,omitempty"`
// Updatable is the plans of the current resource can be upgraded
Updateable bool `json:"updateable,omitempty"`
}
ResourceService is the structure of an app's resource service.
type ResourceServices ¶
type ResourceServices []ResourceService
ResourceServices is a collection of ResourceService.
type Route ¶
type Route struct {
// Owner is the app owner. It cannot be updated with AppSettings.Set(). See app.Transfer().
Owner string `json:"owner,omitempty"`
// App is the app name. It cannot be updated at all right now.
App string `json:"app,omitempty"`
// Created is the time that the application settings was created and cannot be updated.
Created string `json:"created,omitempty"`
// Updated is the last time the application settings was changed and cannot be updated.
Updated string `json:"updated,omitempty"`
// UUID is a unique string reflecting the application settings in its current state.
// It changes every time the application settings is changed and cannot be updated.
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Kind string `json:"kind,omitempty"`
ParentRefs []ParentRef `json:"parent_refs,omitempty"`
Rules []RouteRule `json:"rules,omitempty"`
}
Route is the structure of an app's route.
type RouteAttachRequest ¶
type RouteAttachRequest struct {
Port int `json:"port,omitempty"`
Gateway string `json:"gateway,omitempty"`
}
RouteAttachRequest is the structure of PATCH /v2/apps/(?P<id>{})/routes/(?P<name>{})/attach/?$.
type RouteCreateRequest ¶
type RouteCreateRequest struct {
Name string `json:"name,omitempty"`
Kind string `json:"kind,omitempty"`
Rules []RequestRouteRule `json:"rules,omitempty"`
}
RouteCreateRequest is the structure of POST /v2/app/<app_id>/routes/.
type RouteDetachRequest ¶
type RouteDetachRequest struct {
Port int `json:"port,omitempty"`
Gateway string `json:"gateway,omitempty"`
}
RouteDetachRequest is the structure of PATCH /v2/apps/(?P<id>{})/routes/(?P<name>{})/detach/?$.
type Service ¶
type Service struct {
Name string `json:"name"`
Domain string `json:"domain"`
Ptype string `json:"ptype"`
Ports []Port `json:"ports"`
}
Service is the structure of the service object.
type ServiceCreateUpdateRequest ¶
type ServiceCreateUpdateRequest struct {
Ptype string `json:"ptype"`
Port int `json:"port"`
Protocol string `json:"protocol"`
TargetPort int `json:"target_port"`
}
ServiceCreateUpdateRequest is the structure of POST /v2/app/<app id>/services/.
type ServiceDeleteRequest ¶
type ServiceDeleteRequest struct {
Ptype string `json:"ptype"`
Port int `json:"port"`
Protocol string `json:"protocol"`
}
ServiceDeleteRequest is the structure of DELETE /v2/app/<app id>/services/.
type SleepAction ¶
type SleepAction struct {
Seconds int `json:"seconds"`
}
SleepAction pauses for a specified number of seconds.
func (SleepAction) String ¶
func (s SleepAction) String() string
String displays the SleepAction in a readable format.
type TCPSocketAction ¶
type TCPSocketAction struct {
Port int `json:"port"`
}
TCPSocketAction attempts to open a socket connection to the Pod on the given port.
func (TCPSocketAction) String ¶
func (t TCPSocketAction) String() string
String displays the TCPSocketAction in a readable format.
type TLS ¶
type TLS struct {
// Owner is the app owner. It cannot be updated with TLS.Set(). See app.Transfer().
Owner string `json:"owner,omitempty"`
// App is the app the tls settings apply to and cannot be updated.
App string `json:"app,omitempty"`
// Created is the time that the TLS settings was created and cannot be updated.
Created string `json:"created,omitempty"`
// Updated is the last time the TLS settings was changed and cannot be updated.
Updated string `json:"updated,omitempty"`
// UUID is a unique string reflecting the TLS settings in its current state.
// It changes every time the TLS settings is changed and cannot be updated.
UUID string `json:"uuid,omitempty"`
// HTTPSEnforced determines if the router should enable or disable https-only requests.
HTTPSEnforced *bool `json:"https_enforced,omitempty"`
// Use ACME to automatically generate certificates if CertsAuto enable
CertsAutoEnabled *bool `json:"certs_auto_enabled,omitempty"`
Issuer *Issuer `json:"issuer,omitempty"`
Events []Event `json:"events,omitempty"`
}
TLS is the structure of an app's TLS settings.
type Token ¶
type Token struct {
UUID string `json:"uuid"`
Owner string `json:"owner"`
Alias string `json:"alias"`
Key string `json:"fuzzy_key"`
Created string `json:"created"`
Updated string `json:"updated"`
}
Token is the structure of the token object.
type Types ¶
type Types struct {
Types []string `json:"types,omitempty"`
}
Types is the definition of POST /v2/apps/<app_id>/stop or POST /v2/apps/<app_id>/start.
type User ¶
type User struct {
ID int `json:"id"`
LastLogin string `json:"last_login"`
IsSuperuser bool `json:"is_superuser"`
Username string `json:"username"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Email string `json:"email"`
IsStaff bool `json:"is_staff"`
IsActive bool `json:"is_active"`
DateJoined string `json:"date_joined"`
}
User is the definition of the user object.
type UserPermRequest ¶
type UserPermRequest struct {
Username string `json:"username"`
Permissions string `json:"permissions"`
}
UserPermRequest is the definition of a requst on /v2/perms/rules/.
type UserPermResponse ¶
type UserPermResponse struct {
App string `json:"app"`
Username string `json:"username"`
Permissions []string `json:"permissions"`
}
UserPermResponse is the definition of GET /v2/perms/rules/.
type Volume ¶
type Volume struct {
// Owner is the app owner.
Owner string `json:"owner,omitempty"`
// App is the app the tls settings apply to and cannot be updated.
App string `json:"app,omitempty"`
// Created is the time that the volume was created and cannot be updated.
Created string `json:"created,omitempty"`
// Updated is the last time the TLS settings was changed and cannot be updated.
Updated string `json:"updated,omitempty"`
// UUID is a unique string reflecting the volume in its current state.
// It changes every time the volume is changed and cannot be updated.
UUID string `json:"uuid,omitempty"`
// Volume's name
Name string `json:"name,omitempty"`
// Volume's size
Size string `json:"size,omitempty"`
// Volume's mount path
Path map[string]any `json:"path,omitempty"`
// Volume's type
Type string `json:"type,omitempty"`
// Volume's parameters
Parameters map[string]any `json:"parameters,omitempty"`
}
Volume is the structure of an app's volume.
type VolumeMount ¶
VolumeMount represents a volume mount in a container.