Documentation ¶
Index ¶
- Constants
- type DBConnect
- func (d *DBConnect) AuthDeployEnv(key string, env string) bool
- func (d *DBConnect) Close() bool
- func (d *DBConnect) QueryDeploy(deployID string) (*DeployStatus, error)
- func (d *DBConnect) QueueDeploy(deployID string, environment string, imageName string, imageTag string) bool
- func (d *DBConnect) UpdateDeploy(deployID string, status int, message string, log string) bool
- func (d *DBConnect) ValidAuth(key string) bool
- type DeployStatus
Constants ¶
View Source
const ( Queued Started Success Failed )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBConnect ¶
type DBConnect struct {
// contains filtered or unexported fields
}
func NewDBConnect ¶
NewDBConnect is a factory method that returns a new db connection
func (*DBConnect) AuthDeployEnv ¶
AuthDeployEnv returns true if the API Key is valid to deploy to a given environment for a request.
func (*DBConnect) QueryDeploy ¶
func (d *DBConnect) QueryDeploy(deployID string) (*DeployStatus, error)
QueryDeploy returns the status of a deploy request.
func (*DBConnect) QueueDeploy ¶
func (d *DBConnect) QueueDeploy(deployID string, environment string, imageName string, imageTag string) bool
QueueDeploy inserts a fresh row into the log for a deployment run.
func (*DBConnect) UpdateDeploy ¶
UpdateDeploy updates the deploy row with information from the run.
type DeployStatus ¶
type DeployStatus struct { DeployID string `json:"deployID"` // UUID of teh deploy. Environment string `json:"environment"` // Environment serviced (development, qa etc.) ImageName string `json:"imageName"` // Docker image name. ImageTag string `json:"imageTag"` // Version tag of the image. Status int `json:"status"` // The status ID of the result. Message string `json:"message"` // A user friendly message of what occurred. Log string `json:"log"` // The log of all steps run during the deploy. UpdatedAt string `json:"updatedAt"` // The create date and time of the deploy. CreatedAt string `json:"createdAt"` // The last update to this record. }
DeployStatus is used to return deploy status information from the database to the requester.
Click to show internal directories.
Click to hide internal directories.