Documentation ¶
Index ¶
- Constants
- func NewGithubClientWithAccessToken(accessToken string) *github.Client
- type Deployment
- func (deployment *Deployment) Application() common.Application
- func (deployment *Deployment) CheckPreconditions() error
- func (deployment *Deployment) Environment() string
- func (deployment *Deployment) Flag(key string) interface{}
- func (deployment *Deployment) Flags() map[string]interface{}
- func (deployment *Deployment) GithubClient() (*github.Client, error)
- func (deployment *Deployment) HasFlag(key string) bool
- func (deployment *Deployment) IsForce() bool
- func (deployment *Deployment) MostPreciseRef() string
- func (deployment *Deployment) Ref() string
- func (deployment *Deployment) RunPhasePreloads() (PreloadResults, error)
- func (deployment *Deployment) RunPhases() error
- func (deployment *Deployment) SHA1() string
- func (deployment *Deployment) SetFlag(key string, value interface{})
- func (deployment *Deployment) SetSHA1(sha1 string)
- func (deployment *Deployment) SetStoreAndSave(store common.Store) error
- func (deployment *Deployment) Status() common.DeploymentStatus
- func (deployment *Deployment) Strategy() common.Strategy
- func (deployment *Deployment) UUID() uuid.UUID
- type PreloadResults
Constants ¶
View Source
const ACCESS_TOKEN_FLAG string = "github.access_token"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deployment ¶
type Deployment struct {
// contains filtered or unexported fields
}
Stores state relating to a deployment.
func NewBareDeployment ¶
func NewBareDeployment() *Deployment
func NewDeployment ¶
func NewDeployment(app common.Application, environment string, strategy common.Strategy, ref string, flags map[string]interface{}) *Deployment
Create a deployment for the given application to an environment.
func (*Deployment) Application ¶
func (deployment *Deployment) Application() common.Application
func (*Deployment) CheckPreconditions ¶
func (deployment *Deployment) CheckPreconditions() error
func (*Deployment) Environment ¶
func (deployment *Deployment) Environment() string
func (*Deployment) Flag ¶
func (deployment *Deployment) Flag(key string) interface{}
func (*Deployment) Flags ¶
func (deployment *Deployment) Flags() map[string]interface{}
func (*Deployment) GithubClient ¶
func (deployment *Deployment) GithubClient() (*github.Client, error)
func (*Deployment) HasFlag ¶
func (deployment *Deployment) HasFlag(key string) bool
func (*Deployment) IsForce ¶
func (deployment *Deployment) IsForce() bool
Looks for the "force" boolean in the `flags`.
func (*Deployment) MostPreciseRef ¶
func (deployment *Deployment) MostPreciseRef() string
func (*Deployment) Ref ¶
func (deployment *Deployment) Ref() string
func (*Deployment) RunPhasePreloads ¶
func (deployment *Deployment) RunPhasePreloads() (PreloadResults, error)
Phases can expose preloads to gather any additional information they may need before executing. This will run those preloads in parallel.
func (*Deployment) RunPhases ¶
func (deployment *Deployment) RunPhases() error
Runs all the phases configured in the `Strategy`. Sets `currentState` and `currentPhase` fields as appropriate. If an error occurs it will also set the `lastError` field to that error.
func (*Deployment) SHA1 ¶
func (deployment *Deployment) SHA1() string
func (*Deployment) SetFlag ¶
func (deployment *Deployment) SetFlag(key string, value interface{})
func (*Deployment) SetSHA1 ¶
func (deployment *Deployment) SetSHA1(sha1 string)
func (*Deployment) SetStoreAndSave ¶
func (deployment *Deployment) SetStoreAndSave(store common.Store) error
func (*Deployment) Status ¶
func (deployment *Deployment) Status() common.DeploymentStatus
func (*Deployment) Strategy ¶
func (deployment *Deployment) Strategy() common.Strategy
func (*Deployment) UUID ¶
func (deployment *Deployment) UUID() uuid.UUID
type PreloadResults ¶
func (PreloadResults) Get ¶
func (results PreloadResults) Get(phase common.Phase) interface{}
func (PreloadResults) Set ¶
func (results PreloadResults) Set(phase common.Phase, data interface{})
Click to show internal directories.
Click to hide internal directories.