Documentation
¶
Index ¶
- type App
- type AppCreateRequest
- type AppRunRequest
- type AppRunResponse
- type AppUpdateRequest
- type AuthCancelRequest
- type AuthLoginRequest
- type AuthLoginResponse
- type AuthPasswdRequest
- type AuthRegenerateRequest
- type AuthRegenerateResponse
- type AuthRegisterRequest
- type Build
- type Cert
- type CertAttachRequest
- type CertCreateRequest
- type Config
- type ConfigSet
- type ConfigUnset
- type CreateBuildRequest
- type Domain
- type DomainCreateRequest
- type ExecProbe
- type HTTPGetProbe
- type Healthcheck
- type KVPair
- type Key
- type KeyCreateRequest
- type PermsAppResponse
- type PermsRequest
- type Pods
- type Release
- type ReleaseRollback
- type TCPSocketProbe
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Created string `json:"created"` ID string `json:"id"` Owner string `json:"owner"` Updated string `json:"updated"` URL string `json:"-"` 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 AppRunRequest ¶
type AppRunRequest struct {
Command string `json:"command"`
}
AppRunRequest is the definition of POST /v2/apps/<app id>/run.
type AppRunResponse ¶
AppRunResponse is the definition of /v2/apps/<app id>/run.
type AppUpdateRequest ¶
type AppUpdateRequest struct {
Owner string `json:"owner,omitempty"`
}
AppUpdateRequest is the definition of POST /v2/apps/<app id>/.
type AuthCancelRequest ¶
type AuthCancelRequest struct {
Username string `json:"username"`
}
AuthCancelRequest is the definition of POST /v2/auth/cancel/.
type AuthLoginRequest ¶
type AuthLoginRequest struct { Username string `json:"username"` Password string `json:"password"` }
AuthLoginRequest is the definition of POST /v2/auth/login/.
type AuthLoginResponse ¶
type AuthLoginResponse tokenResponse
AuthLoginResponse is the definition of /v2/auth/login/.
type AuthPasswdRequest ¶
type AuthPasswdRequest struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` NewPassword string `json:"new_password"` }
AuthPasswdRequest is the definition of POST /v2/auth/passwd/.
type AuthRegenerateRequest ¶
type AuthRegenerateRequest struct { Name string `json:"username,omitempty"` All bool `json:"all,omitempty"` }
AuthRegenerateRequest is the definition of POST /v2/auth/tokens/.
type AuthRegenerateResponse ¶
type AuthRegenerateResponse tokenResponse
AuthRegenerateResponse is the definition of /v2/auth/tokens/.
type AuthRegisterRequest ¶
type AuthRegisterRequest struct { Username string `json:"username"` Password string `json:"password"` Email string `json:"email"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` }
AuthRegisterRequest is the definition of POST /v2/auth/register/.
type Build ¶
type Build struct { App string `json:"app"` Created string `json:"created"` Dockerfile string `json:"dockerfile,omitempty"` Image string `json:"image,omitempty"` Owner string `json:"owner"` Procfile map[string]string `json:"procfile"` Sha string `json:"sha,omitempty"` Updated string `json:"updated"` UUID string `json:"uuid"` }
Build is the structure of the build object.
type Cert ¶
type Cert struct { Updated time.Time `json:"updated,omitempty"` Created time.Time `json:"created,omitempty"` 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 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 map[string]interface{} `json:"values,omitempty"` // Memory is used to set process memory limits. The key is the process name // and the value is a number followed by a memory unit (G, M, K, or B). Ex: 200G Memory map[string]interface{} `json:"memory,omitempty"` // CPU is used to set process CPU limits. It can be set in terms of whole CPUs // (ex 1) or in milli units to reflect the number of CPU shares (ex 500m). CPU map[string]interface{} `json:"cpu,omitempty"` // Healthchecks are the healthchecks 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]interface{} `json:"tags,omitempty"` // Registry is a key-value pair to provide authentication for docker registries. // The key is the username and the value is the password. Registry map[string]interface{} `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 ConfigUnset ¶
type ConfigUnset struct {
Values map[string]interface{} `json:"values"`
}
ConfigUnset is the definition of POST /v2/apps/<app id>/config/.
type CreateBuildRequest ¶
type CreateBuildRequest struct { Image string `json:"image"` Procfile map[string]string `json:"procfile,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"` Updated string `json:"updated"` }
Domain is the structure of the domain object.
type DomainCreateRequest ¶
type DomainCreateRequest struct {
Domain string `json:"domain"`
}
DomainCreateRequest is the structure of POST /v2/app/<app id>/domains/.
type ExecProbe ¶
type ExecProbe struct {
Command []string `json:"command"`
}
ExecProbe executes a command within a Pod.
type HTTPGetProbe ¶
type HTTPGetProbe struct { Path string `json:"path,omitempty"` Port int `json:"port"` HTTPHeaders []*KVPair `json:"httpHeaders,omitempty"` }
HTTPGetProbe performs an HTTP GET request to the Pod with the given path, port and headers.
func (HTTPGetProbe) String ¶
func (h HTTPGetProbe) String() string
String displays the HTTPGetProbe in a readable format.
type Healthcheck ¶
type Healthcheck struct { InitialDelaySeconds int `json:"initialDelaySeconds"` TimeoutSeconds int `json:"timeoutSeconds"` PeriodSeconds int `json:"periodSeconds"` SuccessThreshold int `json:"successThreshold"` FailureThreshold int `json:"failureThreshold"` Exec *ExecProbe `json:"exec,omitempty"` HTTPGet *HTTPGetProbe `json:"httpGet,omitempty"` TCPSocket *TCPSocketProbe `json:"tcpSocket,omitempty"` }
Healthcheck is the structure for an application healthcheck. Healthchecks only need to provide information about themselves. All the information is pushed to the server and handled by kubernetes.
func (Healthcheck) String ¶
func (h Healthcheck) String() string
String displays the HealthcheckHTTPGetProbe in a readable format.
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 PermsAppResponse ¶
type PermsAppResponse struct {
Users []string `json:"users"`
}
PermsAppResponse is the definition of GET /v2/apps/<app id>/perms/.
type PermsRequest ¶
type PermsRequest struct {
Username string `json:"username"`
}
PermsRequest is the definition of a requst on /perms/.
type Pods ¶
type Pods struct { Release string `json:"release"` Type string `json:"type"` Name string `json:"name"` State string `json:"state"` Started time.Time `json:"started"` }
Pods defines the structure of a process.
type Release ¶
type Release struct { App string `json:"app"` Build string `json:"build,omitempty"` Config string `json:"config"` Created string `json:"created"` Owner string `json:"owner"` Summary string `json:"summary"` Updated string `json:"updated"` UUID string `json:"uuid"` Version int `json:"version"` }
Release is the definition of the release object.
type ReleaseRollback ¶
type ReleaseRollback struct {
Version int `json:"version"`
}
ReleaseRollback is the defenition of POST /v2/apps/<app id>/releases/.
type TCPSocketProbe ¶
type TCPSocketProbe struct {
Port int `json:"port"`
}
TCPSocketProbe attempts to open a socket connection to the Pod on the given port.
func (TCPSocketProbe) String ¶
func (t TCPSocketProbe) String() string
String displays the TCPSocketProbe in a readable format.
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.