Documentation
¶
Index ¶
- func NewRoutable() *bool
- type App
- type AppCreateRequest
- type AppRunRequest
- type AppRunResponse
- type AppSettings
- type AppUpdateRequest
- type Apps
- type AuthCancelRequest
- type AuthLoginRequest
- type AuthLoginResponse
- type AuthPasswdRequest
- type AuthRegenerateRequest
- type AuthRegenerateResponse
- type AuthRegisterRequest
- type Autoscale
- type Autoscales
- type Build
- type BuildHookRequest
- type Cert
- type CertAttachRequest
- type CertCreateRequest
- type Config
- type ConfigHookRequest
- type ConfigSet
- type ConfigUnset
- type CreateBuildRequest
- type Domain
- type DomainCreateRequest
- type Domains
- type ExecProbe
- type HTTPGetProbe
- type Healthcheck
- type Healthchecks
- type KVPair
- type Key
- type KeyCreateRequest
- type Keys
- type Labels
- type PermsAppResponse
- type PermsRequest
- type PodType
- type PodTypes
- type Pods
- type PodsList
- type ProcessType
- type Release
- type ReleaseRollback
- type TCPSocketProbe
- type TLS
- type User
- type UserApps
- type Users
- type Whitelist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRoutable ¶
func NewRoutable() *bool
NewRoutable returns a default value for the AppSettings.Routable field.
Types ¶
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 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 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"` // Maintenance determines if the application is taken down for maintenance or not. Maintenance *bool `json:"maintenance,omitempty"` // Routable determines if the application should be exposed by the router. Routable *bool `json:"routable,omitempty"` Whitelist []string `json:"whitelist,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 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 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 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 BuildHookRequest ¶
type BuildHookRequest struct { Sha string `json:"sha"` User string `json:"receive_user"` App string `json:"receive_repo"` Image string `json:"image"` Procfile ProcessType `json:"procfile"` Dockerfile string `json:"dockerfile"` }
BuildHookRequest is a hook request to create a new build.
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"` // Healthcheck is map of healthchecks for each process that the application uses. Healthcheck map[string]*Healthchecks `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 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 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 Healthchecks ¶
type Healthchecks map[string]*Healthcheck
Healthchecks is a map of healthcheck probes. The valid values are "livenessProbe" and "readinessProbe".
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 ProcessType ¶
ProcessType represents the key/value mappings of a process type to a process inside a Heroku Procfile.
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 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"` }
TLS is the structure of an app's TLS settings.
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.