Documentation ¶
Index ¶
- type AssociatedEnv
- type CPUUsage
- type Cert
- type Command
- type ConsoleCredentials
- type DeployKey
- type EncryptionStore
- type Environment
- type Error
- type HTTPManager
- type Hits
- type Invite
- type Job
- type LogHits
- type Login
- type Logs
- type Maintenance
- type MemoryUsage
- type Metrics
- type MetricsData
- type NetworkUsage
- 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 Site
- type Spec
- type TempURL
- type User
- type UserKey
- type Workers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssociatedEnv ¶
type AssociatedEnv 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"` }
AssociatedEnv holds information about an associated environment
type ConsoleCredentials ¶
ConsoleCredentials hold the keys necessary for connecting to a console service
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 HTTPManager ¶
type HTTPManager interface { GetHeaders(sessionToken, version, pod, userID string) map[string][]string ConvertResp(b []byte, statusCode int, s interface{}) 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 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 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"` }
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 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 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 Pod ¶
type Pod struct { Name string `json:"name"` PHISafe bool `json:"phiSafe"` ImportRequiresLength bool `json:"importRequiresLength"` }
Pod is a pod returned from the pod router
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"` 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"` 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"` }
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 struct { AccountsHost string `json:"-"` AuthHost string `json:"-"` PaasHost string `json:"-"` AuthHostVersion string `json:"-"` PaasHostVersion string `json:"-"` Version string `json:"-"` HTTPManager HTTPManager `json:"-"` Username 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]AssociatedEnv `json:"environments"` Default string `json:"default"` Pods *[]Pod `json:"pods"` PodCheck int64 `json:"pod_check"` }
Settings 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 { Username string `json:"name"` Email string `json:"email"` SessionToken string `json:"sessionToken"` UsersID string `json:"id"` }
User is an authenticated User