Documentation ¶
Index ¶
- Variables
- func ACM() *acm.ACM
- func AppDockerLogin(app structs.App) (string, error)
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func AutoScaling() *autoscaling.AutoScaling
- func CloudFormation() *cloudformation.CloudFormation
- func CloudWatchLogs() *cloudwatchlogs.CloudWatchLogs
- func DashName(name string) string
- func DescribeContainerInstances() (*ecs.DescribeContainerInstancesOutput, error)
- func DescribeStack(name string) (*cloudformation.DescribeStacksOutput, error)
- func DescribeStacks() (*cloudformation.DescribeStacksOutput, error)
- func Docker(host string) (*docker.Client, error)
- func DockerHost() (string, error)
- func DockerLogin(ac docker.AuthConfiguration) (string, error)
- func DockerLogout(ac docker.AuthConfiguration) error
- func DynamoDB() *dynamodb.DynamoDB
- func EC2() *ec2.EC2
- func ECR() *ecr.ECR
- func ECS() *ecs.ECS
- func IAM() *iam.IAM
- func InstanceKeyroll() error
- func InstanceSSH(id, command, term string, height, width int, rw io.ReadWriter) error
- func LoginPrivateRegistries() error
- func MustAsset(name string) []byte
- func Notify(name, status string, data map[string]string) error
- func NotifyError(action string, err error, data map[string]string) error
- func NotifySuccess(action string, data map[string]string) error
- func ParseEnvLine(line string) (string, string)
- func PrettyJSON(raw string) (string, error)
- func Provider() provider.Provider
- func PullAppImages()
- func PutEnvironment(app string, env Environment) (string, error)
- func PutRackSettings(env Environment) error
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func S3() *s3.S3
- func S3Put(bucket, key string, data []byte, public bool) error
- func S3PutFile(bucket, key string, f io.ReadSeeker, public bool) error
- func SNS() *sns.SNS
- func Test(t *testing.T, fn func())
- func UpdateStack(req *cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error)
- func UpperName(name string) string
- type Agent
- type Agents
- type App
- func (a App) AgentFunctionCode() map[string]template.HTML
- func (a App) Agents(m manifest.Manifest) []Agent
- func (a *App) Create() error
- func (a App) CronJobs(m manifest.Manifest) []CronJob
- func (a *App) Delete() error
- func (a *App) ForkRelease() (*Release, error)
- func (a *App) Formation(m manifest.Manifest) (string, error)
- func (a *App) IsBound() bool
- func (a *App) Resources() (Resources, error)
- func (a *App) StackName() string
- func (a *App) UpdateParams(changes map[string]string) error
- type Apps
- type CronJob
- type CronJobs
- type DescribeStacksResult
- type Environment
- type Release
- type Releases
- type Resource
- type Resources
- type SSL
- type SSLs
- type Template
- type TemplateParameter
Constants ¶
This section is empty.
Variables ¶
var ( CustomTopic = os.Getenv("CUSTOM_TOPIC") CloudformationEventsTopic = os.Getenv("CLOUDFORMATION_EVENTS_TOPIC") StatusCodePrefix = client.StatusCodePrefix )
var DescribeStacksCache = map[string]DescribeStacksResult{}
var DescribeStacksCacheTTL = 5 * time.Second
var DescribeStacksMutex = &sync.Mutex{}
var Logger = logger.New("ns=api.models")
Logger is a package-wide logger
var ManifestRandomPorts = true
set to false when testing for deterministic ports
var NotificationTopic = os.Getenv("NOTIFICATION_TOPIC")
NotificationTopic is the SNS topic for notifications
var PauseNotifications = false
PauseNotifications turns off notifications globally
var SortableTime = "20060102.150405.000000000"
var TestProvider = &provider.MockProvider{}
TestProvider is a global test provider
Functions ¶
func AppDockerLogin ¶
Log into the appropriate registry for the given app
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func AutoScaling ¶
func AutoScaling() *autoscaling.AutoScaling
func CloudFormation ¶
func CloudFormation() *cloudformation.CloudFormation
func CloudWatchLogs ¶
func CloudWatchLogs() *cloudwatchlogs.CloudWatchLogs
func DescribeContainerInstances ¶
func DescribeContainerInstances() (*ecs.DescribeContainerInstancesOutput, error)
DescribeContainerInstances lists and describes all the ECS instances. It handles pagination for clusters > 100 instances.
func DescribeStack ¶
func DescribeStack(name string) (*cloudformation.DescribeStacksOutput, error)
func DescribeStacks ¶
func DescribeStacks() (*cloudformation.DescribeStacksOutput, error)
func DockerHost ¶
func DockerLogin ¶
func DockerLogout ¶
func DockerLogout(ac docker.AuthConfiguration) error
func InstanceKeyroll ¶
func InstanceKeyroll() error
func InstanceSSH ¶
func InstanceSSH(id, command, term string, height, width int, rw io.ReadWriter) error
func LoginPrivateRegistries ¶
func LoginPrivateRegistries() error
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func NotifyError ¶
uniform error handling
func ParseEnvLine ¶
ParseEnvLine returns a valid key, value pair or empty strings
func PrettyJSON ¶
PrettyJSON returns JSON string in a human-readable format
func PullAppImages ¶
func PullAppImages()
func PutEnvironment ¶
func PutEnvironment(app string, env Environment) (string, error)
PutEnvironment creates a new release with a given Environment.
func PutRackSettings ¶
func PutRackSettings(env Environment) error
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
func UpdateStack ¶
func UpdateStack(req *cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error)
Types ¶
type Agent ¶
Agent represents a Service which runs exactly once on every ECS agent
type App ¶
type App struct { Name string `json:"name"` Release string `json:"release"` Status string `json:"status"` Outputs map[string]string `json:"-"` Parameters map[string]string `json:"-"` Tags map[string]string `json:"-"` }
func GetAppBound ¶
func GetAppUnbound ¶
func (App) AgentFunctionCode ¶
AgentFunctionCode returns the Node.js code used by the AgentFunction lambda
func (*App) ForkRelease ¶
type CronJob ¶
type CronJob struct { Name string `yaml:"name"` Schedule string `yaml:"schedule"` Command string `yaml:"command"` Service *manifest.Service App *App }
func NewCronJobFromLabel ¶
type DescribeStacksResult ¶
type DescribeStacksResult struct { Name string Output *cloudformation.DescribeStacksOutput RequestTime time.Time }
type Environment ¶
func GetEnvironment ¶
func GetEnvironment(app string) (Environment, error)
GetEnvironment retrieves an app's current Environment.
func GetPrivateRegistriesAuth ¶
func GetPrivateRegistriesAuth() (Environment, docker.AuthConfigurations119, error)
func GetRackSettings ¶
func GetRackSettings() (Environment, error)
Use the Rack Settings bucket and EncryptionKey KMS key to store and retrieve sensitive credentials, just like app env
func LoadEnvironment ¶
func LoadEnvironment(data []byte) (Environment, error)
LoadEnvironment loads input into an Environment struct.
func (Environment) Raw ¶
func (e Environment) Raw() string
func (Environment) SortedNames ¶
func (e Environment) SortedNames() []string
type Release ¶
type Release struct { Id string `json:"id"` App string `json:"app"` Build string `json:"build"` Env string `json:"env"` Manifest string `json:"manifest"` Created time.Time `json:"created"` }
func GetRelease ¶
func NewRelease ¶
func (*Release) EnvironmentUrl ¶
type Resources ¶
func ListResources ¶
type SSL ¶
type Template ¶
type Template struct {
Parameters map[string]TemplateParameter
}