Documentation ¶
Index ¶
- Constants
- type AsyncDeploymentResult
- type BBCRelease
- type Client
- func (c *Client) Create(ctx context.Context, req *CreateDeploymentRequest) (*AsyncDeploymentResult, error)
- func (c *Client) Get(ctx context.Context, req *GetDeploymentRequest) (*GetDeploymentResult, error)
- func (c *Client) GetRequestStatus(ctx context.Context, req *GetRequestStatusRequest) (*RequestStatusResult, error)
- func (c *Client) UpdateState(ctx context.Context, req *UpdateDeploymentStateRequest) (*AsyncDeploymentResult, error)
- type Commit
- type CreateDeploymentRequest
- type Deployment
- type DeploymentIdentifier
- type Environment
- type EnvironmentType
- type GetDeploymentRequest
- type GetDeploymentResult
- type GetRequestStatusRequest
- type Release
- type ReleaseType
- type Repository
- type RequestStatusResult
- type State
- type UpdateDeploymentStateRequest
- type Workspace
Constants ¶
View Source
const ( Initial State = "initial" Started = "started" Successful = "successful" Failed = "failed" )
View Source
const ( Test EnvironmentType = "Test" Staging = "Staging" Production = "Production" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncDeploymentResult ¶
type AsyncDeploymentResult struct { client.ResultMetadata Result string `json:"result,omitempty"` // contains filtered or unexported fields }
func (*AsyncDeploymentResult) RetrieveStatus ¶
func (ar *AsyncDeploymentResult) RetrieveStatus(ctx context.Context) (*RequestStatusResult, error)
type BBCRelease ¶
type BBCRelease struct { Type ReleaseType `json:"type"` Repository Repository `json:"repository"` Commit Commit `json:"commit"` }
func (*BBCRelease) MarshalJSON ¶
func (b *BBCRelease) MarshalJSON() ([]byte, error)
func (*BBCRelease) Validate ¶
func (r *BBCRelease) Validate() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, req *CreateDeploymentRequest) (*AsyncDeploymentResult, error)
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, req *GetDeploymentRequest) (*GetDeploymentResult, error)
func (*Client) GetRequestStatus ¶
func (c *Client) GetRequestStatus(ctx context.Context, req *GetRequestStatusRequest) (*RequestStatusResult, error)
func (*Client) UpdateState ¶
func (c *Client) UpdateState(ctx context.Context, req *UpdateDeploymentStateRequest) (*AsyncDeploymentResult, error)
type CreateDeploymentRequest ¶
type CreateDeploymentRequest struct { client.BaseRequest State State `json:"state"` Environment *Environment `json:"environment"` StartedAt time.Time `json:"startedAt"` CompletedAt time.Time `json:"completedAt, omitempty"` Message string `json:"message, omitempty"` ExternalId string `json:"externalId,omitempty"` Description string `json:"description,omitempty"` ExternalLink string `json:"externalLink,omitempty"` Releases []Release `json:"releases"` }
func (*CreateDeploymentRequest) Method ¶
func (r *CreateDeploymentRequest) Method() string
func (*CreateDeploymentRequest) ResourcePath ¶
func (r *CreateDeploymentRequest) ResourcePath() string
func (*CreateDeploymentRequest) Validate ¶
func (r *CreateDeploymentRequest) Validate() error
type Deployment ¶
type Deployment struct { Id string `json:"id,omitempty"` ExternalId string `json:"externalId,omitempty"` State string `json:"state,omitempty"` Environment Environment `json:"environment,omitempty"` Type string `json:"type,omitempty"` StartedAt time.Time `json:"startedAt,omitempty"` CompletedAt time.Time `json:"completedAt,omitempty"` Releases []Release `json:"releases,omitempty"` }
type DeploymentIdentifier ¶
type DeploymentIdentifier uint32
const ( DEPLOYMENT_ID DeploymentIdentifier = iota API PIPELINES )
type Environment ¶
type Environment struct { Type EnvironmentType `json:"type"` Id string `json:"id"` DisplayName string `json:"displayName, omitempty"` }
type EnvironmentType ¶
type EnvironmentType string
type GetDeploymentRequest ¶
type GetDeploymentRequest struct { client.BaseRequest IdentifierType DeploymentIdentifier IdentifierValue string }
func (*GetDeploymentRequest) Method ¶
func (r *GetDeploymentRequest) Method() string
func (*GetDeploymentRequest) RequestParams ¶
func (r *GetDeploymentRequest) RequestParams() map[string]string
While getting deployment you can use the deployment id as well as externalId that you provided while creating or pipelines UUID
func (*GetDeploymentRequest) ResourcePath ¶
func (r *GetDeploymentRequest) ResourcePath() string
func (*GetDeploymentRequest) Validate ¶
func (r *GetDeploymentRequest) Validate() error
type GetDeploymentResult ¶
type GetDeploymentResult struct { client.ResultMetadata Deployment `json:"data"` }
type GetRequestStatusRequest ¶
type GetRequestStatusRequest struct { client.BaseRequest RequestId string `json:"requestId,omitempty"` }
func (*GetRequestStatusRequest) Method ¶
func (r *GetRequestStatusRequest) Method() string
func (*GetRequestStatusRequest) ResourcePath ¶
func (r *GetRequestStatusRequest) ResourcePath() string
func (*GetRequestStatusRequest) Validate ¶
func (r *GetRequestStatusRequest) Validate() error
type Repository ¶
func (*Repository) Validate ¶
func (r *Repository) Validate() error
type RequestStatusResult ¶
type UpdateDeploymentStateRequest ¶
type UpdateDeploymentStateRequest struct { client.BaseRequest IdentifierType DeploymentIdentifier IdentifierValue string State State `json:"state"` CompletedAt time.Time `json:"completedAt"` }
func (*UpdateDeploymentStateRequest) Method ¶
func (r *UpdateDeploymentStateRequest) Method() string
func (*UpdateDeploymentStateRequest) RequestParams ¶
func (r *UpdateDeploymentStateRequest) RequestParams() map[string]string
While updating state you can use the deployment id as well as externalId that you provided while creating or pipelines UUID
func (*UpdateDeploymentStateRequest) ResourcePath ¶
func (r *UpdateDeploymentStateRequest) ResourcePath() string
func (*UpdateDeploymentStateRequest) Validate ¶
func (r *UpdateDeploymentStateRequest) Validate() error
Click to show internal directories.
Click to hide internal directories.