Versions in this module Expand all Collapse all v0 v0.9.0 Jun 15, 2015 Changes in this version + const DefaultTag + const ExposePrivate + const ExposePublic + const StatusFailed + const StatusPending + const StatusSuccess + const UserKey + const WebPort + const WebProcessType + var All = ScopeFunc(func(db *gorm.DB) *gorm.DB { ... }) + var Constraints1X = Constraints + var Constraints2X = Constraints + var ConstraintsPX = Constraints + var DefaultConstraints = Constraints1X + var DefaultOptions = Options + var DefaultQuantities = ProcessQuantityMap + var DefaultReporter = reporter.NewLogReporter() + var ErrDomainAlreadyAdded = errors.New("Domain already added to this app.") + var ErrDomainInUse = errors.New("Domain currently in use by another app.") + var ErrDomainNotFound = errors.New("Domain could not be found.") + var ErrInvalidImage = errors.New("invalid image") + var ErrInvalidName = &ValidationError + var ErrNoPorts = errors.New("no ports avaiable") + var NamePattern = regexp.MustCompile(`^[a-z][a-z0-9-]{2,30}$`) + var NamedConstraints = map[string]Constraints + var Procfile = "Procfile" + func AppID(id string) func(*gorm.DB) *gorm.DB + func Migrate(db, path string) ([]error, bool) + func NewAppNameFromRepo(repo string) string + func SignToken(secret []byte, token *AccessToken) (string, error) + func WithUser(ctx context.Context, u *User) context.Context + type AccessToken struct + Token string + User *User + func ParseToken(secret []byte, token string) (*AccessToken, error) + type App struct + Certificates []*Certificate + CreatedAt *time.Time + Exposure string + ID string + Name string + Repo *string + func (a *App) BeforeCreate() error + func (a *App) IsValid() error + type AppsQuery struct + ID *string + Name *string + Repo *string + func (q AppsQuery) Scope(db *gorm.DB) *gorm.DB + type Certificate struct + App *App + AppID string + CertificateChain string + CreatedAt *time.Time + ID string + Name string + PrivateKey string + UpdatedAt *time.Time + func (c *Certificate) BeforeCreate() error + func (c *Certificate) BeforeUpdate() error + type CertificatesQuery struct + App *App + ID *string + func (q CertificatesQuery) Scope(db *gorm.DB) *gorm.DB + type Command string + func (c *Command) Scan(src interface{}) error + func (c Command) Value() (driver.Value, error) + type CommandMap map[ProcessType]Command + func ParseProcfile(b []byte) (CommandMap, error) + func (cm *CommandMap) Scan(src interface{}) error + func (cm CommandMap) Value() (driver.Value, error) + type ComposedScope []Scope + func (s ComposedScope) Scope(db *gorm.DB) *gorm.DB + type Config struct + App *App + AppID string + ID string + Vars Vars + func NewConfig(old *Config, vars Vars) *Config + type ConfigsQuery struct + App *App + ID *string + func (q ConfigsQuery) Scope(db *gorm.DB) *gorm.DB + type Constraints constraints.Constraints + func (c *Constraints) UnmarshalJSON(b []byte) error + func (c Constraints) String() string + type ContainerRelay struct + AttachURL string + Command string + CreatedAt time.Time + Name string + Size string + State string + Type string + type DeploymentsCreateOpts struct + App *App + EventCh chan Event + Image Image + type DockerEvent jsonmessage.JSONMessage + func FakeDockerPull(image Image) []DockerEvent + func (e *DockerEvent) Event() string + type DockerOptions struct + Auth *docker.AuthConfigurations + CertPath string + Socket string + type Domain struct + App *App + AppID string + CreatedAt *time.Time + Hostname string + ID string + func (d *Domain) BeforeCreate() error + type DomainsQuery struct + App *App + Hostname *string + func (q DomainsQuery) Scope(db *gorm.DB) *gorm.DB + type ECSOptions struct + Cluster string + ServiceRole string + type ELBOptions struct + ExternalSecurityGroupID string + ExternalSubnetIDs []string + InternalSecurityGroupID string + InternalSubnetIDs []string + InternalZoneID string + type Empire struct + Logger log15.Logger + func New(options Options) (*Empire, error) + func (e *Empire) AccessTokensCreate(accessToken *AccessToken) (*AccessToken, error) + func (e *Empire) AccessTokensFind(token string) (*AccessToken, error) + func (e *Empire) Apps(q AppsQuery) ([]*App, error) + func (e *Empire) AppsCreate(app *App) (*App, error) + func (e *Empire) AppsDestroy(ctx context.Context, app *App) error + func (e *Empire) AppsFirst(q AppsQuery) (*App, error) + func (e *Empire) AppsScale(ctx context.Context, app *App, t ProcessType, quantity int, c *Constraints) (*Process, error) + func (e *Empire) CertificatesCreate(ctx context.Context, cert *Certificate) (*Certificate, error) + func (e *Empire) CertificatesDestroy(ctx context.Context, cert *Certificate) error + func (e *Empire) CertificatesFirst(ctx context.Context, q CertificatesQuery) (*Certificate, error) + func (e *Empire) CertificatesUpdate(ctx context.Context, cert *Certificate) (*Certificate, error) + func (e *Empire) ConfigsApply(ctx context.Context, app *App, vars Vars) (*Config, error) + func (e *Empire) ConfigsCurrent(app *App) (*Config, error) + func (e *Empire) DeployImage(ctx context.Context, image Image, out chan Event) (*Release, error) + func (e *Empire) Domains(q DomainsQuery) ([]*Domain, error) + func (e *Empire) DomainsCreate(domain *Domain) (*Domain, error) + func (e *Empire) DomainsDestroy(domain *Domain) error + func (e *Empire) DomainsFirst(q DomainsQuery) (*Domain, error) + func (e *Empire) IsHealthy() bool + func (e *Empire) JobStatesByApp(ctx context.Context, app *App) ([]*ProcessState, error) + func (e *Empire) ProcessesRestart(ctx context.Context, app *App, t ProcessType, id string) error + func (e *Empire) ProcessesRun(ctx context.Context, app *App, command string, opts ProcessesRunOpts) (*ContainerRelay, error) + func (e *Empire) ReleasesFindByApp(app *App) ([]*Release, error) + func (e *Empire) ReleasesFindByAppAndVersion(app *App, version int) (*Release, error) + func (e *Empire) ReleasesLast(app *App) (*Release, error) + func (e *Empire) ReleasesRollback(ctx context.Context, app *App, version int) (*Release, error) + func (e *Empire) Reset() error + type Event interface + Event func() string + type Extractor interface + Extract func(Image) (CommandMap, error) + type Formation map[ProcessType]*Process + func NewFormation(f Formation, cm CommandMap) Formation + func (f Formation) Processes() []*Process + type Image struct + ID string + Repo string + func (i *Image) Scan(src interface{}) error + func (i *Image) UnmarshalJSON(b []byte) error + func (i Image) String() string + func (i Image) Value() (driver.Value, error) + type Options struct + AWSConfig *aws.Config + DB string + Docker DockerOptions + ECS ECSOptions + ELB ELBOptions + Runner RunnerOptions + Secret string + type Port struct + AppID *string + ID string + Port int + type Process struct + Command Command + ID string + Port int + Quantity int + Release *Release + ReleaseID string + Type ProcessType + func NewProcess(t ProcessType, cmd Command) *Process + type ProcessQuantityMap map[ProcessType]int + type ProcessState struct + Command string + Constraints Constraints + Name string + State string + UpdatedAt time.Time + type ProcessType string + func (p *ProcessType) Scan(src interface{}) error + func (p ProcessType) Value() (driver.Value, error) + type ProcessesQuery struct + Release *Release + func (q ProcessesQuery) Scope(db *gorm.DB) *gorm.DB + type ProcessesRunOpts struct + Attach bool + Env map[string]string + Size string + type ProcfileError struct + Err error + func (e *ProcfileError) Error() string + type Release struct + App *App + AppID string + Config *Config + ConfigID string + CreatedAt *time.Time + Description string + ID string + Processes []*Process + Slug *Slug + SlugID string + Version int + func (r *Release) BeforeCreate() error + func (r *Release) Formation() Formation + type ReleasesQuery struct + App *App + Version *int + func (q ReleasesQuery) Scope(db *gorm.DB) *gorm.DB + type Resolver interface + Resolve func(Image, chan Event) (Image, error) + type RunnerOptions struct + API string + type Scope interface + Scope func(*gorm.DB) *gorm.DB + func FieldEquals(field string, v interface{}) Scope + func ForApp(app *App) Scope + func ID(id string) Scope + func Order(order string) Scope + func Preload(associations ...string) Scope + type ScopeFunc func(*gorm.DB) *gorm.DB + func (f ScopeFunc) Scope(db *gorm.DB) *gorm.DB + type Slug struct + ID string + Image Image + ProcessTypes CommandMap + type User struct + GitHubToken string + Name string + func UserFromContext(ctx context.Context) (*User, bool) + func (u *User) GitHubClient() *http.Client + type ValidationError struct + Err error + func (e *ValidationError) Error() string + type Variable string + type Vars map[Variable]*string + func (v *Vars) Scan(src interface{}) error + func (v Vars) Value() (driver.Value, error)