Documentation ¶
Index ¶
- Variables
- func AppIDByAlias(alias string) string
- func DeleteAllConsoles() error
- func DeleteAuth(endpoint string) error
- func DoneRead() error
- func HasRead() bool
- func Inspect(bucket, key string) interface{}
- func VersionString() string
- type App
- type Auth
- type Component
- func (c *Component) Delete() error
- func (c *Component) Generate(app *App, ttype string) error
- func (c *Component) GenerateEvars(app *App) error
- func (c *Component) GeneratePlan(data string) error
- func (c *Component) IPAddr() string
- func (c *Component) IsNew() bool
- func (c *Component) PurgeEvars(a *App) error
- func (c *Component) Save() error
- type ComponentPlan
- type ComponentPlanUser
- type Config
- type Console
- type Env
- type IPs
- type LogOpts
- type Provider
- type Remote
- type TunnelConfig
- type TunnelInfo
- type Update
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AppIDByAlias ¶
AppIDByAlias looks up an app id from an alias
func HasRead ¶
func HasRead() bool
HasRead returns true if the value is set. Used for prompting high sierra warning on first config.
func VersionString ¶
func VersionString() string
Types ¶
type App ¶
type App struct { EnvID string ID string Name string // State is used to ensure we don't setup this environment multiple times State string Status string // Appironment variables available to the environment Evars map[string]string // There are also certain platform service ips that need to 1) remain constant // even if the component were repaired and 2) be available even before the // component is. logvac and mist ips are examples. We'll store those here. LocalIPs map[string]string // the boxfile from the most recent deploy DeployedBoxfile string // the https key used Key string // the https cert used Cert string }
App ...
func AllAppsByEnv ¶
AllAppsByEnv loads all of the Apps in the database
func AllAppsByStatus ¶
AllAppsByStatus loads all of the Apps filtering by status
func FindAppBySlug ¶
FindAppBySlug finds an app by an appID and name
func (*App) DisplayName ¶
type Auth ¶
type Auth struct { Endpoint string // nanobox, bonesalt, dev, sim Key string // api_token from dashboard }
Auth ...
func LoadAuthByEndpoint ¶
loads an auth by a specific endpoint
type Component ¶
type Component struct { // the docker id ID string `json:"id"` AppID string `json:"app_id"` EnvID string `json:"env_id"` // name is used for boltdb storage Name string `json:"name"` Label string `json:"label"` Image string `json:"image"` Type string `json:"type"` IP string `json:"ip"` // ExternalIP string `json:"external_ip"` InternalIP string `json:"internal_ip"` Plan ComponentPlan `json:"plan"` State string `json:"state"` }
Component ...
func AllComponentsByApp ¶
AllComponentsByApp loads all of the components in the database
func FindComponentBySlug ¶
FindComponentBySlug finds a component by an appID and name
func (*Component) GenerateEvars ¶
GenerateEvars generates the evars for this component
func (*Component) GeneratePlan ¶
GeneratePlan generates the plan from the plan hook output
func (*Component) IPAddr ¶
backword compatibility function so we can transition to the new single ip system
func (*Component) PurgeEvars ¶
PurgeEvars purges the generated evars for a component
type ComponentPlan ¶
type ComponentPlan struct { IPs []string `json:"ips"` Users []ComponentPlanUser `json:"users"` MountProtocol string `json:"mount_protocol"` Behaviors []string `json:"behaviors"` DefaultUser string `json:"user"` }
ComponentPlan ...
func (ComponentPlan) BehaviorPresent ¶
func (p ComponentPlan) BehaviorPresent(b string) bool
BehaviorPresent ...
type ComponentPlanUser ¶
type ComponentPlanUser struct { Username string `json:"username"` Password string `json:"password"` Meta map[string]interface{} `json:"meta"` }
ComponentPlanUser ...
type Config ¶
type Config struct { Provider string `json:"provider"` CIMode bool `json:"ci-mode"` CISyncVerbose bool `json:"ci-sync-verbose"` // required for docker-machine MountType string `json:"mount-type"` NetfsMountOpts string `json:"netfs-mount-opts"` CPUs int `json:"cpus"` RAM int `json:"ram"` Disk int `json:"disk"` // ip address spaces ExternalNetworkSpace string `json:"external-network-space"` DockerMachineNetworkSpace string `json:"docker-machine-network-space"` NativeNetworkSpace string `json:"native-network-space"` SshKey string `json:"ssh-key"` SshEncryptedKeys bool `json:"ssh-encrypted-keys"` Anonymous bool `json:"anonymous"` LockPort int `json:"lock-port"` }
Config ...
type Console ¶
func AllConsoles ¶
AllConsoles loads all of the Consoles in the database
type Env ¶
type Env struct { ID string Directory string Name string // Remotes map a local app to multiple production apps, by an alias Remotes map[string]Remote // the boxfile from the most recent build BuiltBoxfile string UserBoxfile string BuiltID string DeployedID string LastBuild time.Time LastCompile time.Time BuildTriggers map[string]string }
Env ...
type LogOpts ¶
type LogOpts struct { Follow bool // Follow is whether or not to follow the log stream. Number int // Number of logs to print. Raw bool // Raw will not strip out the timestamp from the log stream. Start string // Start is where to start the logs from. End string // End is where to end the logs. Limit string // Limit is how many logs to show. }
LogOpts are options for logging
type Provider ¶
type Provider struct { Name string // name of the provider HostIP string // the ip the host knows about MountIP string // the ip we reserved for mounting }
Provider ...
type TunnelConfig ¶
type TunnelConfig struct { AppName string // name of app to tunnel to ListenPort int // local port to listen on DestPort int // port to tunnel to Component string // component to tunnel to }
TunnelConfig contains the endpoint information.
type TunnelInfo ¶
type TunnelInfo struct { Name string `json:"name,omitempty"` // component name being tunneled to Token string `json:"token,omitempty"` // token to complete the tunnel URL string `json:"url,omitempty"` // url/ip of nanoagent Port int `json:"port,omitempty"` // port to tunnel to. *must* omitempty. odin will use whatever port is passed (if 0, don't send) }