Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ------------- Key formats ---------------- DeployBucketDbKey = "deployments" DeployCounterKeyFmt = "%s:counter" DeployObjectDbKeyFmt = "%s:data:%d" DeployObjectListDbKeyFmt = "%s:data:" // This key will contain the deployment json body // examples: // - {NAMESPACE}:data:{INCREMENTAL DEPLOY ID} // - slok/daton:data:1 // - slok/daton:data:98 // - docker/docker:data:4 DeployQueryDbKeyFmt = "%s:query:%s" )
Deloyment database keys
View Source
const ( // Deploy status constants StatusPending = "pending" StatusSuccess = "success" StatusError = "error" StatusFailure = "failure" )
Variables ¶
This section is empty.
Functions ¶
func ListDeploymentsAsJson ¶
Types ¶
type BoltDb ¶
Bolt database will be the storage for the data
func (*BoltDb) Disconnect ¶
type Deployment ¶
type Deployment struct { Url string `json:"url"` Id int64 `json:"id"` Sha string `json:"sha"` Ref string `json:"ref"` // Required always Task string `json:"task"` Payload interface{} `json:"payload"` Environment string `json:"environment"` Description string `json:"description"` Creator User `json:"creator"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` StatusesUrl string `json:"statuses_url"` RepositoryUrl string `json:"repository_url"` StatusId int `json:"status_id"` Namespace string `json:"-"` }
Deploy represents a deployment
func ListDeployments ¶
func ListDeployments(namespace string) ([]Deployment, error)
func (*Deployment) Save ¶
func (d *Deployment) Save() error
type Status ¶
type Status struct { Url string `json:"url"` Id int `json:"id"` State string `json:"state"` // Required always Creator User `json:"creator"` Description string `json:"description"` TargetUrl string `json:"target_url"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeploymentUrl string `json:"deployment_url"` RepositoryUrl string `json:"repository_url"` DeploymentId int `json:"deploy_id"` Namespace string `json:"-"` }
Status represents the current status of a deployment
Click to show internal directories.
Click to hide internal directories.