Documentation ¶
Index ¶
- Variables
- func Error(w http.ResponseWriter, message string, statusCode int)
- type ApplyAutoReleasePolicyRequest
- type ApplyBranchRestrictionPolicyRequest
- type ApplyBranchRestrictionPolicyResponse
- type ApplyPolicyResponse
- type ArtifactUploadRequest
- type ArtifactUploadResponse
- type Authenticator
- type AutoReleasePolicy
- type BranchRestrictionPolicy
- type Client
- type ClientAuthenticator
- type ContainerError
- type DeletePolicyRequest
- type DeletePolicyResponse
- type DescribeArtifactResponse
- type DescribeReleaseResponse
- type DescribeReleaseResponseRelease
- type Environment
- type ErrorResponse
- type JobConditionError
- type JobErrorEvent
- type KubernetesNotifyResponse
- type ListPoliciesResponse
- type Metadata
- type PodErrorEvent
- type ReleaseEvent
- type ReleaseRequest
- type ReleaseResponse
- type StatusRequest
- type StatusResponse
- type UserAuthenticator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLoginRequired = errors.New("login required") ErrTokenExpired = errors.New("oauth2: token expired and refresh token is not set") )
Functions ¶
Types ¶
type ApplyAutoReleasePolicyRequest ¶
type ApplyAutoReleasePolicyRequest struct { Service string `json:"service,omitempty"` Branch string `json:"branch,omitempty"` Environment string `json:"environment,omitempty"` CommitterName string `json:"committerName,omitempty"` CommitterEmail string `json:"committerEmail,omitempty"` }
func (ApplyAutoReleasePolicyRequest) Validate ¶ added in v0.7.0
func (r ApplyAutoReleasePolicyRequest) Validate(w http.ResponseWriter) bool
type ApplyBranchRestrictionPolicyRequest ¶ added in v0.4.0
type ApplyBranchRestrictionPolicyRequest struct { Service string `json:"service,omitempty"` Environment string `json:"environment,omitempty"` BranchRegex string `json:"branchRegex,omitempty"` CommitterName string `json:"committerName,omitempty"` CommitterEmail string `json:"committerEmail,omitempty"` }
func (ApplyBranchRestrictionPolicyRequest) Validate ¶ added in v0.7.0
func (r ApplyBranchRestrictionPolicyRequest) Validate(w http.ResponseWriter) bool
type ApplyBranchRestrictionPolicyResponse ¶ added in v0.4.0
type ApplyPolicyResponse ¶
type ArtifactUploadRequest ¶ added in v0.6.0
type ArtifactUploadRequest struct { Artifact artifact.Spec `json:"artifact,omitempty"` MD5 string `json:"md5,omitempty"` }
func (ArtifactUploadRequest) Validate ¶ added in v0.7.0
func (r ArtifactUploadRequest) Validate(w http.ResponseWriter) bool
type ArtifactUploadResponse ¶ added in v0.6.0
type ArtifactUploadResponse struct {
ArtifactUploadURL string `json:"artifactUploadUrl,omitempty"`
}
type Authenticator ¶ added in v0.27.4
type AutoReleasePolicy ¶
type BranchRestrictionPolicy ¶ added in v0.4.0
type Client ¶
type Client struct { BaseURL string Timeout time.Duration Metadata Metadata Auth Authenticator }
func (*Client) Do ¶
Do sends an HTTP request defined by the provided method and path. The base URL is prefixed on the provided path.
Request and response bodies are marshalled and unmarshalled as JSON and if the server returns a status code above 399 the response is parsed as an ErrorResponse object and returned as the error.
type ClientAuthenticator ¶ added in v0.27.4
type ClientAuthenticator struct {
// contains filtered or unexported fields
}
func NewClientAuthenticator ¶ added in v0.27.4
func NewClientAuthenticator(clientID, clientSecret, idpURL, scope string) ClientAuthenticator
type ContainerError ¶ added in v0.5.0
type DeletePolicyRequest ¶
type DeletePolicyRequest struct { Service string `json:"service,omitempty"` PolicyIDs []string `json:"policyIds,omitempty"` CommitterName string `json:"committerName,omitempty"` CommitterEmail string `json:"committerEmail,omitempty"` }
func (DeletePolicyRequest) Validate ¶ added in v0.7.0
func (r DeletePolicyRequest) Validate(w http.ResponseWriter) bool
type DeletePolicyResponse ¶
type DescribeArtifactResponse ¶ added in v0.0.33
type DescribeReleaseResponse ¶ added in v0.0.33
type DescribeReleaseResponse struct { Service string `json:"service,omitempty"` Environment string `json:"environment,omitempty"` Releases []DescribeReleaseResponseRelease `json:"releases,omitempty"` }
DescribeReleaseResponse returns releases for a service. The Releases returned are in chronically order with the latest and current release first
type DescribeReleaseResponseRelease ¶ added in v0.9.0
type DescribeReleaseResponseRelease struct { ReleaseIndex int `json:"releaseIndex,omitempty"` Artifact artifact.Spec `json:"artifact,omitempty"` ReleasedAt time.Time `json:"releasedAt,omitempty"` ReleasedByEmail string `json:"releasedByEmail,omitempty"` ReleasedByName string `json:"releasedByName,omitempty"` Intent intent.Intent `json:"intent,omitempty"` }
type Environment ¶
type Environment struct { Name string `json:"name,omitempty"` Tag string `json:"tag,omitempty"` Committer string `json:"committer,omitempty"` Author string `json:"author,omitempty"` Message string `json:"message,omitempty"` Date int64 `json:"date,omitempty"` BuildUrl string `json:"buildUrl,omitempty"` HighVulnerabilities int64 `json:"highVulnerabilities,omitempty"` MediumVulnerabilities int64 `json:"mediumVulnerabilities,omitempty"` LowVulnerabilities int64 `json:"lowVulnerabilities,omitempty"` }
type ErrorResponse ¶
type ErrorResponse struct { Status int `json:"status,omitempty"` Message string `json:"message,omitempty"` ID string `json:"-"` }
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type JobConditionError ¶ added in v0.12.4
type JobErrorEvent ¶ added in v0.12.4
type JobErrorEvent struct { JobName string `json:"jobName,omitempty"` Namespace string `json:"namespace,omitempty"` Errors []JobConditionError `json:"errors,omitempty"` AuthorEmail string `json:"authorEmail,omitempty"` Environment string `json:"environment,omitempty"` ArtifactID string `json:"artifactId,omitempty"` }
type KubernetesNotifyResponse ¶ added in v0.5.0
type KubernetesNotifyResponse struct { }
type ListPoliciesResponse ¶
type ListPoliciesResponse struct { Service string `json:"service,omitempty"` AutoReleases []AutoReleasePolicy `json:"autoReleases,omitempty"` BranchRestrictions []BranchRestrictionPolicy `json:"branchRestrictions,omitempty"` }
type PodErrorEvent ¶ added in v0.5.0
type PodErrorEvent struct { PodName string `json:"podName,omitempty"` Namespace string `json:"namespace,omitempty"` Errors []ContainerError `json:"errors,omitempty"` AuthorEmail string `json:"authorEmail,omitempty"` Environment string `json:"environment,omitempty"` ArtifactID string `json:"artifactId,omitempty"` Squad string `json:"squad,omitempty"` AlertSquad string `json:"alertSquad,omitempty"` }
func (*PodErrorEvent) ErrorStrings ¶ added in v0.26.0
func (pee *PodErrorEvent) ErrorStrings() []string
type ReleaseEvent ¶ added in v0.5.0
type ReleaseEvent struct { Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` ResourceType string `json:"resourceType,omitempty"` AvailablePods int32 `json:"availablePods"` DesiredPods int32 `json:"replicas,omitempty"` ArtifactID string `json:"artifactId,omitempty"` AuthorEmail string `json:"authorEmail,omitempty"` Environment string `json:"environment,omitempty"` }
type ReleaseRequest ¶
type ReleaseRequest struct { Service string `json:"service,omitempty"` Environment string `json:"environment,omitempty"` ArtifactID string `json:"artifactId,omitempty"` CommitterName string `json:"committerName,omitempty"` CommitterEmail string `json:"committerEmail,omitempty"` Intent intent.Intent `json:"intent,omitempty"` }
func (ReleaseRequest) Validate ¶ added in v0.7.0
func (r ReleaseRequest) Validate(w http.ResponseWriter) bool
type ReleaseResponse ¶
type StatusRequest ¶
type StatusRequest struct {
Service string `json:"service,omitempty"`
}
type StatusResponse ¶
type StatusResponse struct { DefaultNamespaces bool `json:"defaultNamespaces,omitempty"` Environments []Environment `json:"environments,omitempty"` }
type UserAuthenticator ¶ added in v0.27.4
type UserAuthenticator struct {
// contains filtered or unexported fields
}
func NewUserAuthenticator ¶ added in v0.27.4
func NewUserAuthenticator(clientID, idpURL string, autoLogin bool) UserAuthenticator
Click to show internal directories.
Click to hide internal directories.