Documentation ¶
Index ¶
- Constants
- Variables
- func FindState(statuses []*github.DeploymentStatus, needleStates ...deploymentState) int
- type Agent
- type Deployer
- type DeploymentOptions
- func (api *DeploymentOptions) CreateDeploymentStatus(ctx context.Context, depl *github.Deployment, state deploymentState, ...) error
- func (api *DeploymentOptions) FindNewestDeployment(ctx context.Context) (*github.Deployment, error)
- func (api *DeploymentOptions) HasSuccessStatus(ctx context.Context, depl *github.Deployment) (bool, error)
- func (api *DeploymentOptions) ListDeployments(ctx context.Context) (deployments []*github.Deployment, err error)
- type Hooks
- type Logger
Constants ¶
View Source
const ( DeploymentStateError deploymentState = "error" DeploymentStateFailure deploymentState = "failure" DeploymentStateSuccess deploymentState = "success" )
Variables ¶
View Source
var ErrHookNotFound error = errors.New("unknown hook")
Functions ¶
func FindState ¶
func FindState(statuses []*github.DeploymentStatus, needleStates ...deploymentState) int
Types ¶
type Agent ¶
type Agent struct { Log Logger Deployments *DeploymentOptions Deployer *Deployer }
Agent applies deployments
type Deployer ¶
type Deployer struct { Deployments *DeploymentOptions Hooks *Hooks Log Logger }
type DeploymentOptions ¶
func (*DeploymentOptions) CreateDeploymentStatus ¶
func (api *DeploymentOptions) CreateDeploymentStatus(ctx context.Context, depl *github.Deployment, state deploymentState, desc string) error
CreateDeploymentStatus publishes a new status message for the given deployment object.
see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status state = pending | success | error | failure description = string(140)
func (*DeploymentOptions) FindNewestDeployment ¶
func (api *DeploymentOptions) FindNewestDeployment(ctx context.Context) (*github.Deployment, error)
func (*DeploymentOptions) HasSuccessStatus ¶
func (api *DeploymentOptions) HasSuccessStatus(ctx context.Context, depl *github.Deployment) (bool, error)
func (*DeploymentOptions) ListDeployments ¶
func (api *DeploymentOptions) ListDeployments(ctx context.Context) (deployments []*github.Deployment, err error)
Click to show internal directories.
Click to hide internal directories.