Documentation
¶
Overview ¶
Package resources contains the resource entities used in the Terramate Cloud API.
Index ¶
- type Author
- type BitbucketMetadata
- type ChangesetDetails
- type CommandLog
- type CommandLogs
- type CreatePreviewPayloadRequest
- type CreatePreviewResponse
- type DeploymentMetadata
- type DeploymentStackRequest
- type DeploymentStackRequests
- type DeploymentStackResponse
- type DeploymentStacksPayloadRequest
- type DeploymentStacksResponse
- type Drift
- type DriftStackPayloadRequest
- type DriftStackPayloadRequests
- type Drifts
- type DriftsStackPayloadResponse
- type EmptyResponse
- type GitMetadata
- type GithubMetadata
- type GitlabMetadata
- type Label
- type LogChannel
- type MemberOrganization
- type MemberOrganizations
- func (orgs MemberOrganizations) ActiveOrgs() MemberOrganizations
- func (orgs MemberOrganizations) InvitedOrgs() MemberOrganizations
- func (orgs MemberOrganizations) LookupByName(name string) (org MemberOrganization, found bool)
- func (orgs MemberOrganizations) SSOInvitedOrgs() MemberOrganizations
- func (orgs MemberOrganizations) String() string
- func (orgs MemberOrganizations) TrustedOrgs() MemberOrganizations
- func (orgs MemberOrganizations) Validate() error
- type PaginatedResult
- type PreviewStack
- type PreviewStacks
- type Resource
- type ResponsePreviewStack
- type ResponsePreviewStacks
- type ReviewRequest
- type ReviewRequestResponse
- type ReviewRequestResponsePayload
- type ReviewRequestResponses
- type Reviewer
- type Reviewers
- type SingleSignOnDetailResponse
- type Stack
- type StackObject
- type StacksResponse
- type StatusFilters
- type StoreOutput
- type StoreOutputKey
- type StoreOutputRequest
- type UUID
- type UpdateDeploymentStack
- type UpdateDeploymentStacks
- type UpdateStackPreviewPayloadRequest
- type User
- type WellKnown
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct {
Login string `json:"login"`
AvatarURL string `json:"avatar_url,omitempty"`
ID string `json:"id,omitempty"`
}
Author of the change.
type BitbucketMetadata ¶
type BitbucketMetadata struct {
BitbucketPipelinesBuildNumber string `json:"bitbucket_pipelines_build_number,omitempty"`
BitbucketPipelinesPipelineUUID string `json:"bitbucket_pipelines_pipeline_uuid,omitempty"`
BitbucketPipelinesCommit string `json:"bitbucket_pipelines_commit,omitempty"`
BitbucketPipelinesWorkspace string `json:"bitbucket_pipelines_workspace,omitempty"`
BitbucketPipelinesRepoSlug string `json:"bitbucket_pipelines_repo_slug,omitempty"`
BitbucketPipelinesRepoUUID string `json:"bitbucket_pipelines_repo_uuid,omitempty"`
BitbucketPipelinesRepoFullName string `json:"bitbucket_pipelines_repo_full_name,omitempty"`
BitbucketPipelinesBranch string `json:"bitbucket_pipelines_branch,omitempty"`
BitbucketPipelinesDestinationBranch string `json:"bitbucket_pipelines_destination_branch,omitempty"`
BitbucketPipelinesTag string `json:"bitbucket_pipelines_tag,omitempty"` // only available in tag events.
BitbucketPipelinesStepTriggererUUID string `json:"bitbucket_pipelines_step_triggerer_uuid,omitempty"`
BitbucketPipelinesTriggeredByAccountID string `json:"bitbucket_pipelines_triggered_by_account_id,omitempty"`
BitbucketPipelinesTriggeredByNickname string `json:"bitbucket_pipelines_triggered_by_nickname,omitempty"`
BitbucketPipelinesTriggeredByDisplayName string `json:"bitbucket_pipelines_triggered_by_display_name,omitempty"`
BitbucketPipelinesTriggeredByAvatarURL string `json:"bitbucket_pipelines_triggered_by_avatar_url,omitempty"`
BitbucketPipelinesParallelStep string `json:"bitbucket_pipelines_parallel_step,omitempty"`
BitbucketPipelinesParallelStepCount string `json:"bitbucket_pipelines_parallel_step_count,omitempty"`
BitbucketPipelinesPRID string `json:"bitbucket_pipelines_pr_id,omitempty"` // only available in PR events.
BitbucketPipelinesStepUUID string `json:"bitbucket_pipelines_step_uuid,omitempty"`
BitbucketPipelinesDeploymentEnvironment string `json:"bitbucket_pipelines_deployment_environment,omitempty"`
BitbucketPipelinesDeploymentEnvironmentUUID string `json:"bitbucket_pipelines_deployment_environment_uuid,omitempty"`
BitbucketPipelinesProjectKey string `json:"bitbucket_pipelines_project_key,omitempty"`
BitbucketPipelinesProjectUUID string `json:"bitbucket_pipelines_project_uuid,omitempty"`
BitbucketPullRequest *metadata.BitbucketPullRequest `json:"bitbucket_pull_request,omitempty"`
}
BitbucketMetadata holds the Bitbucket specific metadata.
type ChangesetDetails ¶
type ChangesetDetails struct {
Provisioner string `json:"provisioner"`
ChangesetASCII string `json:"changeset_ascii,omitempty"`
ChangesetJSON string `json:"changeset_json,omitempty"`
Serial *int64 `json:"serial,omitempty"`
}
ChangesetDetails represents the details of a changeset (e.g. the terraform plan).
func (ChangesetDetails) Validate ¶
func (ds ChangesetDetails) Validate() error
Validate the drift details.
type CommandLog ¶
type CommandLog struct {
Line int64 `json:"log_line"`
Timestamp *time.Time `json:"timestamp"`
Channel LogChannel `json:"channel"`
Message string `json:"message"`
}
CommandLog represents a single log message.
type CommandLogs ¶
type CommandLogs []*CommandLog
CommandLogs represents a batch of log messages.
func (CommandLogs) Validate ¶
func (ls CommandLogs) Validate() error
Validate a list of command logs.
type CreatePreviewPayloadRequest ¶
type CreatePreviewPayloadRequest struct {
CommitSHA string `json:"commit_sha"`
PushedAt int64 `json:"pushed_at"`
Technology string `json:"technology"`
TechnologyLayer string `json:"technology_layer"`
ReviewRequest *ReviewRequest `json:"review_request,omitempty"`
Metadata *DeploymentMetadata `json:"metadata,omitempty"`
Stacks PreviewStacks `json:"stacks"`
}
CreatePreviewPayloadRequest is the request payload for the creation of stack deployments.
func (CreatePreviewPayloadRequest) Validate ¶
func (r CreatePreviewPayloadRequest) Validate() error
Validate the CreatePreviewPayloadRequest object.
type CreatePreviewResponse ¶
type CreatePreviewResponse struct {
PreviewID string `json:"preview_id"`
Stacks ResponsePreviewStacks `json:"stacks"`
}
CreatePreviewResponse represents the deployment creation response item.
func (CreatePreviewResponse) Validate ¶
func (r CreatePreviewResponse) Validate() error
Validate validates the CreatePreviewResponse payload
type DeploymentMetadata ¶
type DeploymentMetadata struct {
GitMetadata
GithubMetadata
GitlabMetadata
BitbucketMetadata
}
DeploymentMetadata stores the metadata available in the target platform. It's marshaled as a flat hashmap of values. Note: no sensitive information must be stored here because it could be logged.
func (DeploymentMetadata) Validate ¶
func (m DeploymentMetadata) Validate() error
Validate the metadata.
type DeploymentStackRequest ¶
type DeploymentStackRequest struct {
Stack
CommitSHA string `json:"commit_sha,omitempty"`
DeploymentURL string `json:"deployment_url,omitempty"`
DeploymentStatus deployment.Status `json:"deployment_status,omitempty"`
DeploymentCommand string `json:"deployment_cmd"`
}
DeploymentStackRequest represents the stack object of the request payload type for the creation of stack deployments.
func (DeploymentStackRequest) Validate ¶
func (d DeploymentStackRequest) Validate() error
Validate the deployment stack request.
type DeploymentStackRequests ¶
type DeploymentStackRequests []DeploymentStackRequest
DeploymentStackRequests is a list of DeploymentStacksRequest.
func (DeploymentStackRequests) Validate ¶
func (d DeploymentStackRequests) Validate() error
Validate the list of deployment stack requests.
type DeploymentStackResponse ¶
type DeploymentStackResponse struct {
StackID int64 `json:"stack_id"`
StackMetaID string `json:"meta_id"`
// TODO(snk): The target in the response is not handled yet. This needs to happen once we
// support creating deployments with the same stack/meta_id on multiple targets.
Target string `json:"target"`
Status deployment.Status `json:"status"`
}
DeploymentStackResponse represents the deployment creation response item.
func (DeploymentStackResponse) Validate ¶
func (d DeploymentStackResponse) Validate() error
Validate the deployment stack response.
type DeploymentStacksPayloadRequest ¶
type DeploymentStacksPayloadRequest struct {
ReviewRequest *ReviewRequest `json:"review_request,omitempty"`
Stacks DeploymentStackRequests `json:"stacks"`
Workdir project.Path `json:"workdir"`
Metadata *DeploymentMetadata `json:"metadata,omitempty"`
}
DeploymentStacksPayloadRequest is the request payload for the creation of stack deployments.
func (DeploymentStacksPayloadRequest) Validate ¶
func (d DeploymentStacksPayloadRequest) Validate() error
Validate the deployment stack payload.
type DeploymentStacksResponse ¶
type DeploymentStacksResponse []DeploymentStackResponse
DeploymentStacksResponse represents the list of DeploymentStackResponse.
func (DeploymentStacksResponse) Validate ¶
func (ds DeploymentStacksResponse) Validate() error
Validate the list of deployment stacks response.
type Drift ¶
type Drift struct {
ID int64 `json:"id"`
Status drift.Status `json:"status"`
Details *ChangesetDetails `json:"drift_details,omitempty"`
Metadata *DeploymentMetadata `json:"metadata,omitempty"`
}
Drift represents the drift information for a given stack.
type DriftStackPayloadRequest ¶
type DriftStackPayloadRequest struct {
Stack Stack `json:"stack"`
Status drift.Status `json:"drift_status"`
Details *ChangesetDetails `json:"drift_details,omitempty"`
Metadata *DeploymentMetadata `json:"metadata,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
Command []string `json:"command"`
}
DriftStackPayloadRequest is the payload for the drift sync.
func (DriftStackPayloadRequest) Validate ¶
func (d DriftStackPayloadRequest) Validate() error
Validate the drift request payload.
type DriftStackPayloadRequests ¶
type DriftStackPayloadRequests []DriftStackPayloadRequest
DriftStackPayloadRequests is a list of DriftStackPayloadRequest
func (DriftStackPayloadRequests) Validate ¶
func (ds DriftStackPayloadRequests) Validate() error
Validate the list of drift requests.
type DriftsStackPayloadResponse ¶
type DriftsStackPayloadResponse struct {
Drifts Drifts `json:"drifts"`
Pagination PaginatedResult `json:"paginated_result"`
}
DriftsStackPayloadResponse is the payload returned when listing stack drifts.
func (DriftsStackPayloadResponse) Validate ¶
func (ds DriftsStackPayloadResponse) Validate() error
Validate the drifts list response payload.
type EmptyResponse ¶
type EmptyResponse string
EmptyResponse is used to represent an empty string response.
func (EmptyResponse) Validate ¶
func (s EmptyResponse) Validate() error
Validate that content is empty.
type GitMetadata ¶
type GitMetadata struct {
GitCommitSHA string `json:"git_commit_sha,omitempty"`
GitCommitAuthorName string `json:"git_commit_author_name,omitempty"`
GitCommitAuthorEmail string `json:"git_commit_author_email,omitempty"`
GitCommitAuthorTime *time.Time `json:"git_commit_author_time,omitempty"`
GitCommitTitle string `json:"git_commit_title,omitempty"`
GitCommitDescription string `json:"git_commit_description,omitempty"`
}
GitMetadata are the git related metadata.
type GithubMetadata ¶
type GithubMetadata struct {
GithubPullRequestAuthorLogin string `json:"github_pull_request_author_login,omitempty"`
GithubPullRequestAuthorAvatarURL string `json:"github_pull_request_author_avatar_url,omitempty"`
GithubPullRequestAuthorGravatarID string `json:"github_pull_request_author_gravatar_id,omitempty"`
GithubPullRequestURL string `json:"github_pull_request_url,omitempty"`
GithubPullRequestNumber int `json:"github_pull_request_number,omitempty"`
GithubPullRequestTitle string `json:"github_pull_request_title,omitempty"`
GithubPullRequestDescription string `json:"github_pull_request_description,omitempty"`
GithubPullRequestState string `json:"github_pull_request_state,omitempty"`
GithubPullRequestMergeCommitSHA string `json:"github_pull_request_merge_commit_sha,omitempty"`
GithubPullRequestHeadLabel string `json:"github_pull_request_head_label,omitempty"`
GithubPullRequestHeadRef string `json:"github_pull_request_head_ref,omitempty"`
GithubPullRequestHeadSHA string `json:"github_pull_request_head_sha,omitempty"`
GithubPullRequestHeadAuthorLogin string `json:"github_pull_request_head_author_login,omitempty"`
GithubPullRequestHeadAuthorAvatarURL string `json:"github_pull_request_head_author_avatar_url,omitempty"`
GithubPullRequestHeadAuthorGravatarID string `json:"github_pull_request_head_author_gravatar_id,omitempty"`
GithubPullRequestBaseLabel string `json:"github_pull_request_base_label,omitempty"`
GithubPullRequestBaseRef string `json:"github_pull_request_base_ref,omitempty"`
GithubPullRequestBaseSHA string `json:"github_pull_request_base_sha,omitempty"`
GithubPullRequestBaseAuthorLogin string `json:"github_pull_request_base_author_login,omitempty"`
GithubPullRequestBaseAuthorAvatarURL string `json:"github_pull_request_base_author_avatar_url,omitempty"`
GithubPullRequestBaseAuthorGravatarID string `json:"github_pull_request_base_author_gravatar_id,omitempty"`
GithubPullRequestCreatedAt *time.Time `json:"github_pull_request_created_at,omitempty"`
GithubPullRequestUpdatedAt *time.Time `json:"github_pull_request_updated_at,omitempty"`
GithubPullRequestClosedAt *time.Time `json:"github_pull_request_closed_at,omitempty"`
GithubPullRequestMergedAt *time.Time `json:"github_pull_request_merged_at,omitempty"`
GithubCommitVerified *bool `json:"github_commit_verified,omitempty"`
GithubCommitVerifiedReason string `json:"github_commit_verified_reason,omitempty"`
GithubCommitTitle string `json:"github_commit_title,omitempty"`
GithubCommitDescription string `json:"github_commit_description,omitempty"`
GithubCommitAuthorLogin string `json:"github_commit_author_login,omitempty"`
GithubCommitAuthorAvatarURL string `json:"github_commit_author_avatar_url,omitempty"`
GithubCommitAuthorGravatarID string `json:"github_commit_author_gravatar_id,omitempty"`
GithubCommitAuthorGitName string `json:"github_commit_author_git_name,omitempty"`
GithubCommitAuthorGitEmail string `json:"github_commit_author_git_email,omitempty"`
GithubCommitAuthorGitDate *time.Time `json:"github_commit_author_git_date,omitempty"`
GithubCommitCommitterLogin string `json:"github_commit_committer_login,omitempty"`
GithubCommitCommitterAvatarURL string `json:"github_commit_committer_avatar_url,omitempty"`
GithubCommitCommitterGravatarID string `json:"github_commit_committer_gravatar_id,omitempty"`
GithubCommitCommitterGitName string `json:"github_commit_committer_git_name,omitempty"`
GithubCommitCommitterGitEmail string `json:"github_commit_committer_git_email,omitempty"`
GithubCommitCommitterGitDate *time.Time `json:"github_commit_committer_git_date,omitempty"`
GithubActionsDeploymentBranch string `json:"github_actions_deployment_branch,omitempty"`
GithubActionsDeploymentActorID string `json:"github_actions_deployment_actor_id,omitempty"`
GithubActionsDeploymentActor string `json:"github_actions_deployment_actor,omitempty"`
GithubActionsDeploymentTriggeredBy string `json:"github_actions_triggered_by,omitempty"`
GithubActionsRunID string `json:"github_actions_run_id,omitempty"`
GithubActionsRunAttempt string `json:"github_actions_run_attempt,omitempty"`
GithubActionsWorkflowName string `json:"github_actions_workflow_name,omitempty"`
GithubActionsWorkflowRef string `json:"github_actions_workflow_ref,omitempty"`
GithubCommit *metadata.GithubCommit `json:"github_commit,omitempty"`
GithubPullRequest *metadata.GithubPullRequest `json:"github_pull_request,omitempty"`
}
GithubMetadata is the GitHub related metadata
type GitlabMetadata ¶
type GitlabMetadata struct {
GitlabMergeRequestAuthorID int `json:"gitlab_merge_request_author_id,omitempty"`
GitlabMergeRequestAuthorName string `json:"gitlab_merge_request_author_name,omitempty"`
GitlabMergeRequestAuthorWebURL string `json:"gitlab_merge_request_author_web_url,omitempty"`
GitlabMergeRequestAuthorUsername string `json:"gitlab_merge_request_author_username,omitempty"`
GitlabMergeRequestAuthorAvatarURL string `json:"gitlab_merge_request_author_avatar_url,omitempty"`
GitlabMergeRequestAuthorState string `json:"gitlab_merge_request_author_state,omitempty"`
GitlabMergeRequestID int `json:"gitlab_merge_request_id,omitempty"`
GitlabMergeRequestIID int `json:"gitlab_merge_request_iid,omitempty"`
GitlabMergeRequestState string `json:"gitlab_merge_request_state,omitempty"`
GitlabMergeRequestCreatedAt string `json:"gitlab_merge_request_created_at,omitempty"`
GitlabMergeRequestUpdatedAt string `json:"gitlab_merge_request_updated_at,omitempty"`
GitlabMergeRequestTargetBranch string `json:"gitlab_merge_request_target_branch,omitempty"`
GitlabMergeRequestSourceBranch string `json:"gitlab_merge_request_source_branch,omitempty"`
GitlabMergeRequestMergeStatus string `json:"gitlab_merge_request_merge_status,omitempty"`
GitlabMergeRequestWebURL string `json:"gitlab_merge_request_web_url,omitempty"`
// CICD
GitlabCICDJobManual bool `json:"gitlab_cicd_job_manual,omitempty"` // CI_JOB_MANUAL
GitlabCICDPipelineID string `json:"gitlab_cicd_pipeline_id,omitempty"` // CI_PIPELINE_ID
GitlabCICDPipelineSource string `json:"gitlab_cicd_pipeline_source,omitempty"` // CI_PIPELINE_SOURCE
GitlabCICDPipelineName string `json:"gitlab_cicd_pipeline_name,omitempty"` // CI_PIPELINE_NAME
GitlabCICDPipelineTriggered bool `json:"gitlan_cicd_pipeline_triggered,omitempty"` // CI_PIPELINE_TRIGGERED
GitlabCICDPipelineURL string `json:"gitlab_cicd_pipeline_url,omitempty"` // CI_PIPELINE_URL
GitlabCICDPipelineCreatedAt string `json:"gitlab_cicd_pipeline_created_at,omitempty"` // CI_PIPELINE_CREATED_AT
GitlabCICDJobID string `json:"gitlab_cicd_job_id,omitempty"` // CI_JOB_ID
GitlabCICDJobName string `json:"gitlab_cicd_job_name,omitempty"` // CI_JOB_NAME
GitlabCICDJobStartedAt string `json:"gitlab_cicd_job_started_at,omitempty"` // CI_JOB_STARTED_AT
GitlabCICDUserEmail string `json:"gitlab_cicd_user_email,omitempty"` // GITLAB_USER_EMAIL
GitlabCICDUserID string `json:"gitlab_cicd_user_id,omitempty"` // GITLAB_USER_ID
GitlabCICDUserName string `json:"gitlab_cicd_user_name,omitempty"` // GITLAB_USER_NAME
GitlabCICDUserLogin string `json:"gitlab_cicd_user_login,omitempty"` // GITLAB_USER_LOGIN
GitlabCICDCommitBranch string `json:"gitlab_cicd_commit_branch,omitempty"` // CI_COMMIT_BRANCH
// either CI_COMMIT_BRANCH or CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
GitlabCICDBranch string `json:"gitlab_cicd_branch,omitempty"`
// Only available for merge request pipelines
GitlabCICDMergeRequestApproved *bool `json:"gitlab_cicd_merge_request_approved,omitempty"` // CI_MERGE_REQUEST_APPROVED
GitlabMergeRequest *metadata.GitlabMergeRequest `json:"gitlab_merge_request,omitempty"`
}
GitlabMetadata holds the Gitlab specific metadata.
type Label ¶
type Label struct {
Name string `json:"name"`
Color string `json:"color,omitempty"`
Description string `json:"description,omitempty"`
}
Label of a review request.
type LogChannel ¶
type LogChannel int
LogChannel is an enum-like type for the output channels supported.
const ( // StdoutLogChannel is the stdout channel StdoutLogChannel LogChannel // StderrLogChannel is the stderr channel StderrLogChannel )
func (*LogChannel) MarshalJSON ¶
func (c *LogChannel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*LogChannel) UnmarshalJSON ¶
func (c *LogChannel) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type MemberOrganization ¶
type MemberOrganization struct {
MemberID int64 `json:"member_id,omitempty"`
Name string `json:"org_name"`
DisplayName string `json:"org_display_name"`
Domain string `json:"org_domain"`
UUID UUID `json:"org_uuid"`
Role string `json:"role,omitempty"`
Status string `json:"status"`
}
MemberOrganization represents the organization associated with the member.
func (MemberOrganization) String ¶
func (org MemberOrganization) String() string
String is a human representation of the organization.
func (MemberOrganization) Validate ¶
func (org MemberOrganization) Validate() error
Validate checks if at least the fields required by Terramate CLI are set.
type MemberOrganizations ¶
type MemberOrganizations []MemberOrganization
MemberOrganizations is a list of organizations associated with the member.
func (MemberOrganizations) ActiveOrgs ¶
func (orgs MemberOrganizations) ActiveOrgs() MemberOrganizations
ActiveOrgs filter the organization list by status=active organizations.
func (MemberOrganizations) InvitedOrgs ¶
func (orgs MemberOrganizations) InvitedOrgs() MemberOrganizations
InvitedOrgs filter the organization list by status=invited organizations.
func (MemberOrganizations) LookupByName ¶
func (orgs MemberOrganizations) LookupByName(name string) (org MemberOrganization, found bool)
LookupByName lookup an organization by name in the org list.
func (MemberOrganizations) SSOInvitedOrgs ¶
func (orgs MemberOrganizations) SSOInvitedOrgs() MemberOrganizations
SSOInvitedOrgs filter the organization list by status=sso_invited organizations.
func (MemberOrganizations) String ¶
func (orgs MemberOrganizations) String() string
String is a human readable list of organizations associated with a user.
func (MemberOrganizations) TrustedOrgs ¶
func (orgs MemberOrganizations) TrustedOrgs() MemberOrganizations
TrustedOrgs filter the organization list by status=trusted organizations.
func (MemberOrganizations) Validate ¶
func (orgs MemberOrganizations) Validate() error
Validate if the organization list is valid.
type PaginatedResult ¶
type PaginatedResult struct {
Total int64 `json:"total"`
Page int64 `json:"page"`
PerPage int64 `json:"per_page"`
}
PaginatedResult represents the pagination object.
func (PaginatedResult) Validate ¶
func (p PaginatedResult) Validate() error
Validate the "paginate_result" field.
type PreviewStack ¶
type PreviewStack struct {
Stack
PreviewStatus preview.StackStatus `json:"preview_status"`
Cmd []string `json:"cmd,omitempty"`
}
PreviewStack represents the stack object of the request payload type for the creation of stack deployments.
type PreviewStacks ¶
type PreviewStacks []PreviewStack
PreviewStacks is a list of stack objects for the request payload
func (PreviewStacks) Validate ¶
func (s PreviewStacks) Validate() error
Validate the PreviewStacks object.
type Resource ¶
type Resource interface {
Validate() error
}
Resource is the interface used to represent resource entities.
type ResponsePreviewStack ¶
type ResponsePreviewStack struct {
MetaID string `json:"meta_id"`
StackPreviewID string `json:"stack_preview_id"`
}
ResponsePreviewStack represents a specific stack in the preview response.
type ResponsePreviewStacks ¶
type ResponsePreviewStacks []ResponsePreviewStack
ResponsePreviewStacks is a list of stack objects in the response payload
func (ResponsePreviewStacks) Validate ¶
func (s ResponsePreviewStacks) Validate() error
Validate the ResponsePreviewStacks object.
type ReviewRequest ¶
type ReviewRequest struct {
Platform string `json:"platform"`
Repository string `json:"repository"`
CommitSHA string `json:"commit_sha"`
Number int `json:"number"`
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
Labels []Label `json:"labels,omitempty"`
Author Author `json:"author"`
Reviewers Reviewers `json:"reviewers,omitempty"`
Status string `json:"status"`
Draft bool `json:"draft"`
ReviewDecision string `json:"review_decision,omitempty"`
ChangesRequestedCount int `json:"changes_requested_count"`
ApprovedCount int `json:"approved_count"`
ChecksTotalCount int `json:"checks_total_count"`
ChecksFailureCount int `json:"checks_failure_count"`
ChecksSuccessCount int `json:"checks_success_count"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
PushedAt *int64 `json:"pushed_at,omitempty"`
Branch string `json:"branch"`
BaseBranch string `json:"base_branch"`
}
ReviewRequest is the review_request object.
func (ReviewRequest) Validate ¶
func (rr ReviewRequest) Validate() error
Validate the DeploymentReviewRequest object.
type ReviewRequestResponse ¶
type ReviewRequestResponse struct {
ID int64 `json:"review_request_id"`
CommitSHA string `json:"commit_sha"`
Number int `json:"number"`
}
ReviewRequestResponse is the response payload for the review request creation.
func (ReviewRequestResponse) Validate ¶
func (rr ReviewRequestResponse) Validate() error
Validate the ReviewRequestResponse object.
type ReviewRequestResponsePayload ¶
type ReviewRequestResponsePayload struct {
ReviewRequests ReviewRequestResponses `json:"review_requests"`
Pagination PaginatedResult `json:"paginated_result"`
}
ReviewRequestResponsePayload is the review request response payload.
func (ReviewRequestResponsePayload) Validate ¶
func (rr ReviewRequestResponsePayload) Validate() error
Validate the review request response payload.
type ReviewRequestResponses ¶
type ReviewRequestResponses []ReviewRequestResponse
ReviewRequestResponses is a list of review request responses.
func (ReviewRequestResponses) Validate ¶
func (rrs ReviewRequestResponses) Validate() error
Validate the list of review request responses.
type SingleSignOnDetailResponse ¶
type SingleSignOnDetailResponse struct {
EnterpriseOrgID string `json:"enterprise_org_id"`
}
SingleSignOnDetailResponse the response payload for the /v1/organizations/name/<name> endpoint.
func (SingleSignOnDetailResponse) Validate ¶
func (sso SingleSignOnDetailResponse) Validate() error
Validate the SSO details.
type Stack ¶
type Stack struct {
Repository string `json:"repository"`
Target string `json:"target,omitempty"`
FromTarget string `json:"from_target,omitempty"`
DefaultBranch string `json:"default_branch"`
Path string `json:"path"`
MetaID string `json:"meta_id"`
MetaName string `json:"meta_name,omitempty"`
MetaDescription string `json:"meta_description,omitempty"`
MetaTags []string `json:"meta_tags,omitempty"`
}
Stack represents the stack as defined by the user HCL code.
type StackObject ¶
type StackObject struct {
ID int64 `json:"stack_id"`
Stack
Status stack.Status `json:"status"`
DeploymentStatus deployment.Status `json:"deployment_status"`
DriftStatus drift.Status `json:"drift_status"`
// readonly fields
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
SeenAt *time.Time `json:"seen_at,omitempty"`
}
StackObject represents a stack object in the Terramate Cloud.
type StacksResponse ¶
type StacksResponse struct {
Stacks []StackObject `json:"stacks"`
Pagination PaginatedResult `json:"paginated_result"`
}
StacksResponse represents the stacks object response.
func (StacksResponse) Validate ¶
func (stacksResp StacksResponse) Validate() error
Validate the StacksResponse object.
type StatusFilters ¶
type StatusFilters struct {
StackStatus stack.FilterStatus
DeploymentStatus deployment.FilterStatus
DriftStatus drift.FilterStatus
}
StatusFilters defines multiple statuses stack filters.
func NoStatusFilters ¶
func NoStatusFilters() StatusFilters
NoStatusFilters returns a StatusFilters with no filter.
func (StatusFilters) HasFilter ¶
func (f StatusFilters) HasFilter() bool
HasFilter tells if StackFilter has any filter set.
type StoreOutput ¶
type StoreOutput struct {
ID UUID `json:"id"`
Key StoreOutputKey `json:"key"`
Value string `json:"value"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
StoreOutput represents an output stored in the Terramate Cloud.
func (StoreOutput) Validate ¶
func (s StoreOutput) Validate() error
Validate the StoreOutputResponse object.
type StoreOutputKey ¶
type StoreOutputKey struct {
OrgUUID UUID `json:"org_uuid"`
Repository string `json:"repository"`
StackMetaID string `json:"stack_meta_id"`
Target string `json:"target,omitempty"`
Name string `json:"name"`
}
StoreOutputKey is the key field of the StoreOutputRequest payload.
type StoreOutputRequest ¶
type StoreOutputRequest struct {
Key StoreOutputKey `json:"key"`
Value string `json:"value"`
}
StoreOutputRequest is the request payload for storing a output in /v1/store/<org>/outputs endpoint.
func (StoreOutputRequest) Validate ¶
func (s StoreOutputRequest) Validate() error
Validate the StoreOutputRequest object.
type UpdateDeploymentStack ¶
type UpdateDeploymentStack struct {
StackID int64 `json:"stack_id"`
Status deployment.Status `json:"status"`
Details *ChangesetDetails `json:"changeset_details,omitempty"`
}
UpdateDeploymentStack is the request payload item for updating the deployment status.
func (UpdateDeploymentStack) Validate ¶
func (d UpdateDeploymentStack) Validate() error
Validate the UpdateDeploymentStack object.
type UpdateDeploymentStacks ¶
type UpdateDeploymentStacks struct {
Stacks []UpdateDeploymentStack `json:"stacks"`
}
UpdateDeploymentStacks is the request payload for updating the deployment status.
func (UpdateDeploymentStacks) Validate ¶
func (ds UpdateDeploymentStacks) Validate() error
Validate the list of UpdateDeploymentStack.
type UpdateStackPreviewPayloadRequest ¶
type UpdateStackPreviewPayloadRequest struct {
Status string `json:"status"`
ChangesetDetails *ChangesetDetails `json:"changeset_details,omitempty"`
}
UpdateStackPreviewPayloadRequest is the request payload for the update of stack previews.
func (UpdateStackPreviewPayloadRequest) Validate ¶
func (r UpdateStackPreviewPayloadRequest) Validate() error
Validate the UpdateStackPreviewPayloadRequest object.