Documentation ¶
Index ¶
- type AssociatedEnvV1
- type AssociatedEnvV2
- type CPUUsage
- type Cert
- type Command
- type ConsoleCredentials
- type ContentDigest
- type DeployKey
- type EncryptionStore
- type Environment
- type Error
- type Group
- type GroupMember
- type GroupWrapper
- type HTTPManager
- type Hits
- type Image
- type Invite
- type Job
- type LetsEncryptStatus
- type Location
- type LogHits
- type Login
- type Logs
- type Maintenance
- type MemoryUsage
- type Metrics
- type MetricsData
- type MultipartUploadInfo
- type NetworkUsage
- type NotaryRepo
- type Org
- type OrgUser
- type Payload
- type Pod
- type PodWrapper
- type PostInvite
- type Release
- type ReportedError
- type Role
- type Service
- type ServiceFile
- type ServiceSize
- type Settings
- type SettingsV1
- type SettingsV2
- type Site
- type Spec
- type TempURL
- type User
- type UserKey
- type VersionInfo
- type Volume
- type Workers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssociatedEnvV1 ¶
type AssociatedEnvV1 struct { EnvironmentID string `json:"environmentId"` ServiceID string `json:"serviceId"` Directory string `json:"dir"` Name string `json:"name"` Pod string `json:"pod"` OrgID string `json:"organizationId"` }
AssociatedEnvV1 holds information about an associated environment
type AssociatedEnvV2 ¶
type AssociatedEnvV2 struct { EnvironmentID string `json:"environmentId"` Name string `json:"name"` Pod string `json:"pod"` OrgID string `json:"organizationId"` }
AssociatedEnvV2 holds information about an associated environment
type Cert ¶
type Cert struct { Name string `json:"name"` PubKey string `json:"sslCertFile"` PrivKey string `json:"sslPKFile"` Service string `json:"service,omitempty"` PubKeyID int `json:"sslCertFileId,omitempty"` PrivKeyID int `json:"sslPKFileId,omitempty"` Restricted bool `json:"restricted,omitempty"` LetsEncrypt LetsEncryptStatus `json:"letsEncrypt,omitempty"` }
type ConsoleCredentials ¶
ConsoleCredentials hold the keys necessary for connecting to a console service
type ContentDigest ¶
ContentDigest contains hash data for an image
type DeployKey ¶
type DeployKey struct { Name string `json:"name"` Key string `json:"value"` Type string `json:"type"` }
DeployKey is an ssh key belonging to an environment's code service
type EncryptionStore ¶
type EncryptionStore struct { Key string `json:"key"` KeyLogs string `json:"keyLogs"` KeyInternalLogs string `json:"keyInternalLogs"` IV string `json:"iv"` }
EncryptionStore holds the values for encryption on backup/import jobs
type Environment ¶
type Environment struct { ID string `json:"id,omitempty"` Name string `json:"name"` Pod string `json:"pod,omitempty"` Namespace string `json:"namespace,omitempty"` OrgID string `json:"organizationId"` }
Environment environment
type Error ¶
type Error struct { Title string `json:"title"` Description string `json:"description"` Code int `json:"code"` }
Error is a wrapper around an array of errors from the API
type Group ¶
type Group struct { Name string `json:"name"` Acls []string `json:"acls"` Protected bool `json:"protected"` Members *[]GroupMember `json:"members"` }
type GroupMember ¶
type HTTPManager ¶
type HTTPManager interface { GetHeaders(sessionToken, version, pod, userID string) map[string][]string ConvertResp(b []byte, statusCode int, s interface{}) error ConvertError(b []byte, statuseCode int) (*Error, error) Get(body []byte, url string, headers map[string][]string) ([]byte, int, error) Post(body []byte, url string, headers map[string][]string) ([]byte, int, error) PostFile(filepath string, url string, headers map[string][]string) ([]byte, int, error) PutFile(filepath string, url string, headers map[string][]string) ([]byte, int, error) Put(body []byte, url string, headers map[string][]string) ([]byte, int, error) Delete(body []byte, url string, headers map[string][]string) ([]byte, int, error) }
type Hits ¶
type Hits struct { Total int64 `json:"total"` MaxScore float64 `json:"max_score"` Hits *[]LogHits `json:"hits"` }
Hits contain arrays of log data
type Image ¶
type Image struct { Name string Tag string Digest *ContentDigest }
Image contains data about an image
type Invite ¶
type Invite struct { ID string `json:"id"` OrgID string `json:"orgID"` SenderID string `json:"senderID"` RoleID int `json:"roleID"` Email string `json:"email"` Consumed bool `json:"consumed"` Revoked bool `json:"revoked"` }
Invite represents an invitation to an organization
type Job ¶
type Job struct { ID string `json:"id"` Type string `json:"type"` Status string `json:"status,omitempty"` Backup *EncryptionStore `json:"backup,omitempty"` Restore *EncryptionStore `json:"restore,omitempty"` CreatedAt string `json:"created_at"` MetricsData *[]MetricsData `json:"metrics"` Spec *Spec `json:"spec"` Target string `json:"target,omitempty"` IsSnapshotBackup *bool `json:"isSnapshotBackup,omitempty"` }
Job job
type LetsEncryptStatus ¶
type LetsEncryptStatus int
LetsEncryptStatus code
const ( // NormalCert is a non-let's encrypt cert NormalCert LetsEncryptStatus = iota // Waiting verification and issuance Waiting // Valid certificate that has already been issued Valid )
func (LetsEncryptStatus) String ¶
func (l LetsEncryptStatus) String() string
type Location ¶
type Location struct {
Location string `json:"location"`
}
Location is an s3 object location
type LogHits ¶
type LogHits struct { Index string `json:"_index"` Type string `json:"_type"` ID string `json:"_id"` Score float64 `json:"_score"` Fields map[string][]string `json:"fields"` Source map[string]string `json:"_source"` }
LogHits contain ordering data for logs
type Logs ¶
type Logs struct {
Hits *Hits `json:"hits"`
}
Logs hold the log values from a successful LogQuery
type Maintenance ¶
type MemoryUsage ¶
type Metrics ¶
type Metrics struct { ServiceName string `json:"serviceName"` ServiceType string `json:"serviceType"` ServiceID string `json:"serviceId"` ServiceLabel string `json:"serviceLabel"` Size ServiceSize `json:"size"` Data *MetricsData `json:"metrics"` }
Metrics holds all metrics data for an entire environment or a single service
type MetricsData ¶
type MetricsData struct { CPUUsage *[]CPUUsage `json:"cpu.usage"` MemoryUsage *[]MemoryUsage `json:"memory.usage"` NetworkUsage *[]NetworkUsage `json:"network.usage"` }
MetricsData is a container for each type of metrics: network, memory, etc.
type MultipartUploadInfo ¶
type MultipartUploadInfo struct { FileName string `json:"file_name"` UploadID string `json:"upload_id"` }
MultipartUploadInfo holds the identifiers necessary for upload parts to an s3 bucket
type NetworkUsage ¶
type NetworkUsage struct { JobID string `json:"job"` RXDropped float64 `json:"rx_dropped"` RXErrors float64 `json:"rx_errors"` RXKB float64 `json:"rx_kb"` RXPackets float64 `json:"rx_packets"` TXDropped float64 `json:"tx_dropped"` TXErrors float64 `json:"tx_errors"` TXKB float64 `json:"tx_kb"` TXPackets float64 `json:"tx_packets"` TS int `json:"ts"` }
type NotaryRepo ¶
type OrgUser ¶
type OrgUser struct { ID string `json:"id"` Name string `json:"name"` Email string `json:"email"` RoleID int `json:"roleID"` }
OrgUser users who have access to an org
type PostInvite ¶
type ReportedError ¶
ReportedError is the standard error model sent back from the API
type Service ¶
type Service struct { ID string `json:"id,omitempty"` Identifier string `json:"identifier,omitempty"` DNS string `json:"internal_domain,omitempty"` Type string `json:"type,omitempty"` Label string `json:"label"` Size ServiceSize `json:"size"` Name string `json:"name"` Environment string `json:"environment,omitempty"` EnvVars map[string]string `json:"environmentVariables,omitempty"` Source string `json:"source,omitempty"` LBIP string `json:"load_balancer_ip,omitempty"` Scale int `json:"scale,omitempty"` WorkerScale int `json:"worker_scale,omitempty"` Image string `json:"docker_image,omitempty"` ReleaseVersion string `json:"release_version,omitempty"` Redeployable bool `json:"redeployable,omitempty"` }
Service service
type ServiceFile ¶
type ServiceFile struct { ID int `json:"id"` Contents string `json:"contents"` GID int `json:"gid"` Mode string `json:"mode"` Name string `json:"name"` UID int `json:"uid"` EnableDownload bool `json:"enable_download"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
ServiceFile is a file associated with a service
type ServiceSize ¶
type ServiceSize struct { RAM int `json:"ram"` Storage int `json:"storage"` Behavior string `json:"behavior,omitempty"` Type string `json:"type,omitempty"` CPU int `json:"cpu"` }
ServiceSize holds size information for a service
type Settings ¶
type Settings SettingsV2
type SettingsV1 ¶
type SettingsV1 struct { AccountsHost string `json:"-"` AuthHost string `json:"-"` PaasHost string `json:"-"` AuthHostVersion string `json:"-"` PaasHostVersion string `json:"-"` Version string `json:"-"` HTTPManager HTTPManager `json:"-"` Email string `json:"-"` Password string `json:"-"` EnvironmentID string `json:"-"` // the id of the environment used for the current command ServiceID string `json:"-"` // the id of the service used for the current command Pod string `json:"-"` // the pod used for the current command EnvironmentName string `json:"-"` // the name of the environment used for the current command OrgID string `json:"-"` // the org ID the chosen environment for this commands belongs to PrivateKeyPath string `json:"private_key_path"` SessionToken string `json:"token"` UsersID string `json:"user_id"` Environments map[string]AssociatedEnvV1 `json:"environments"` Default string `json:"default"` Pods *[]Pod `json:"pods"` PodCheck int64 `json:"pod_check"` }
SettingsV1 holds various settings for the current context. All items with `json:"-"` are never persisted to disk but used in memory for the current command.
type SettingsV2 ¶
type SettingsV2 struct { AccountsHost string `json:"-"` AuthHost string `json:"-"` PaasHost string `json:"-"` AuthHostVersion string `json:"-"` PaasHostVersion string `json:"-"` Version string `json:"-"` HTTPManager HTTPManager `json:"-"` GivenEnvName string `json:"-"` Email string `json:"-"` Password string `json:"-"` EnvironmentID string `json:"-"` // the id of the environment used for the current command Pod string `json:"-"` // the pod used for the current command EnvironmentName string `json:"-"` // the name of the environment used for the current command OrgID string `json:"-"` // the org ID the chosen environment for this commands belongs to PrivateKeyPath string `json:"private_key_path"` SessionToken string `json:"token"` UsersID string `json:"user_id"` Environments map[string]AssociatedEnvV2 `json:"environments"` Pods *[]Pod `json:"pods"` PodCheck int64 `json:"pod_check"` Format string `json:"format"` }
SettingsV2 holds various settings for the current context. All items with `json:"-"` are never persisted to disk but used in memory for the current command.
type TempURL ¶
type TempURL struct {
URL string `json:"url"`
}
TempURL holds a URL for uploading or downloading files from a temporary URL
type User ¶
type User struct { Email string `json:"email"` SessionToken string `json:"sessionToken"` UsersID string `json:"id"` }
User is an authenticated User