Documentation
¶
Index ¶
- Constants
- type APIError
- type APIErrorBadRequestExample
- type APIErrorForbiddenExample
- type APIErrorNotSupportedExample
- type APIErrors
- type APIResourceMeta
- type APIServerMetadata
- type APIServerMetadataAuth
- type APIServerMetadataIntegrations
- type APIVerb
- type APIVerbGroup
- type CreateModuleRequest
- type CreateModuleRequestGithub
- type CreateModuleRequestLocal
- type CreateModuleResponse
- type CreateModuleRunRequest
- type CreateModuleRunResponse
- type CreateModuleValuesRequestGithub
- type CreateMonitorRequest
- type CreateMonitorResponse
- type CreateMonitorResultRequest
- type CreateOrgMemberInviteRequest
- type CreateOrgMemberInviteResponse
- type CreateOrganizationRequest
- type CreateOrganizationResponse
- type CreatePATRequest
- type CreatePATResponse
- type CreateTeamRequest
- type CreateTeamResponse
- type CreateTerraformPlanRequest
- type CreateTerraformStateRequest
- type CreateUserRequest
- type CreateUserResponse
- type DeleteModuleResponse
- type DeleteMonitorResponse
- type DeleteOrganizationResponse
- type DeletePATResponse
- type DeleteTeamResponse
- type DeploymentMechanism
- type EmptyResponse
- type FinalizeModuleRunRequest
- type FinalizeModuleRunResponse
- type ForceUnlockModuleResponse
- type GetLogsResponse
- type GetModuleEnvVarsVersionResponse
- type GetModulePlanSummaryResponse
- type GetModuleResponse
- type GetModuleRunResponse
- type GetModuleRunTokenResponse
- type GetModuleTarballURLRequest
- type GetModuleTarballURLResponse
- type GetModuleValuesCurrentResponse
- type GetModuleValuesRequest
- type GetModuleValuesResponse
- type GetMonitorResponse
- type GetNotificationResponse
- type GetOrgMemberResponse
- type GetOrganizationResponse
- type GetPATResponse
- type GetUserResponse
- type GithubAppInstallation
- type GithubBranch
- type GithubPullRequest
- type GithubRepo
- type HTTPVerb
- type ListGithubAppInstallationsRequest
- type ListGithubAppInstallationsResponse
- type ListGithubRepoBranchesResponse
- type ListGithubReposResponse
- type ListModuleRunsRequest
- type ListModuleRunsResponse
- type ListModulesRequest
- type ListModulesResponse
- type ListMonitorResultsRequest
- type ListMonitorResultsResponse
- type ListMonitorsRequest
- type ListMonitorsResponse
- type ListNotificationsRequest
- type ListNotificationsResponse
- type ListOrgMembersRequest
- type ListOrgMembersResponse
- type ListPATsRequest
- type ListPATsResponse
- type ListTeamMembersRequest
- type ListTeamMembersResponse
- type ListTeamsRequest
- type ListTeamsResponse
- type ListUserOrgsRequest
- type ListUserOrgsResponse
- type ListUserTeamsRequest
- type ListUserTeamsResponse
- type LockTerraformStateRequest
- type LockTerraformStateResponse
- type LoginUserRequest
- type LoginUserResponse
- type Module
- type ModuleDeploymentConfig
- type ModuleEnvVar
- type ModuleEnvVarsVersion
- type ModuleLockKind
- type ModuleMonitor
- type ModuleMonitorKind
- type ModuleMonitorMeta
- type ModuleMonitorResult
- type ModulePlanSummary
- type ModulePlannedChangeSummary
- type ModuleRun
- type ModuleRunConfig
- type ModuleRunKind
- type ModuleRunOverview
- type ModuleRunReportKind
- type ModuleRunStatus
- type ModuleRunTriggerKind
- type ModuleValues
- type ModuleValuesGithubConfig
- type MonitorResultSeverity
- type MonitorResultStatus
- type Notification
- type NotificationMeta
- type Organization
- type OrganizationInvite
- type OrganizationInviteSanitized
- type OrganizationMember
- type OrganizationMemberSanitized
- type OrganizationPolicyMeta
- type OrganizationPolicyReference
- type PaginationRequest
- type PaginationResponse
- type PermissionScope
- type PersonalAccessToken
- type ResetPasswordEmailFinalizeRequest
- type ResetPasswordEmailRequest
- type ResetPasswordEmailVerifyTokenRequest
- type ResetPasswordManualRequest
- type RevokePATResponse
- type RevokePATResponseExample
- type Team
- type TeamAddMemberRequest
- type TeamAddMemberResponse
- type TeamMember
- type TeamPolicyMeta
- type TeamPolicyReference
- type TeamUpdateRequest
- type TeamUpdateResponse
- type TerraformLock
- type URLParam
- type UpdateModuleRequest
- type UpdateModuleResponse
- type UpdateMonitorRequest
- type UpdateMonitorResponse
- type UpdateOrgMemberPoliciesRequest
- type UpdateOrgMemberPoliciesResponse
- type UpdateOrgOwnerRequest
- type UpdateOrgRequest
- type UpdateOrgResponse
- type UpdateUserRequest
- type UpdateUserResponse
- type UsageMetric
- type User
- type UserOrgPublishedData
- type VerifyEmailRequest
Constants ¶
const ( APIErrorCodeUnknown uint = 0 ErrCodeBadRequest uint = 1400 ErrCodeForbidden uint = 1403 ErrCodeNotFound uint = 1404 ErrCodeEmailNotVerified uint = 6000 ErrCodeInternalServerError uint = 1500 )
const ( // ModuleRunReportKindCore reports for the core run -- plan, apply, destroy ModuleRunReportKindCore = "core" // ModuleRunReportKindMonitor reports for monitor runs ModuleRunReportKindMonitor = "monitor" )
const GenericResourceNotFound string = "the requested resource was not found"
const InvalidEmailCode uint = 2404
const InvalidEmailOrPasswordCode uint = 2403
const OrgMemberLookupKey string = "org_member"
const TeamMemberLookupKey string = "team_member"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
// a custom Hatchet error code
// example: 1400
Code uint `json:"code"`
// a description for this error
// example: A descriptive error message
Description string `json:"description"`
// a link to the documentation for this error, if it exists
// example: github.com/hatchet-dev/hatchet
DocsLink string `json:"docs_link"`
}
swagger:model
var InvalidEmail APIError = APIError{ Code: InvalidEmailCode, Description: "Invalid email: email either already exists or is not permitted on this Hatchet instance.", }
var InvalidEmailOrPassword APIError = APIError{ Code: InvalidEmailOrPasswordCode, Description: "Invalid email or password combination", }
type APIErrorBadRequestExample ¶
type APIErrorBadRequestExample struct {
*APIError
// a custom Hatchet error code
// example: 1400
Code uint `json:"code"`
// a description for this error
// example: Bad request (detailed error)
Description string `json:"description"`
}
swagger:model
type APIErrorForbiddenExample ¶
type APIErrorForbiddenExample struct {
*APIError
// a custom Hatchet error code
// example: 1403
Code uint `json:"code"`
// a description for this error
// example: Forbidden
Description string `json:"description"`
}
swagger:model
type APIErrorNotSupportedExample ¶
type APIErrorNotSupportedExample struct {
*APIError
// a custom Hatchet error code
// example: 1405
Code uint `json:"code"`
// a description for this error
// example: This endpoint is not supported on this Hatchet instance.
Description string `json:"description"`
}
swagger:model
type APIResourceMeta ¶
type APIResourceMeta struct {
// the time that this resource was created
// example: 2022-12-13T15:06:48.888358-05:00
CreatedAt *time.Time `json:"created_at"`
// the time that this resource was last updated
// example: 2022-12-13T15:06:48.888358-05:00
UpdatedAt *time.Time `json:"updated_at"`
// the id of this resource, in UUID format
// example: bb214807-246e-43a5-a25d-41761d1cff9e
ID string `json:"id"`
}
swagger:model
type APIServerMetadata ¶
type APIServerMetadata struct {
// version for the API server runtime
Version string `json:"version"`
// auth metadata options
Auth *APIServerMetadataAuth `json:"auth"`
// integration options
Integrations *APIServerMetadataIntegrations `json:"integrations"`
}
swagger:model
type APIServerMetadataAuth ¶
type APIServerMetadataAuth struct {
// whether email verification is required in order to use the api/dashboard
RequireEmailVerification bool `json:"require_email_verification"`
}
swagger:model
type APIServerMetadataIntegrations ¶
type APIServerMetadataIntegrations struct {
// whether the server has a Github app integration
GithubApp bool `json:"github_app"`
// whether the server has email capabilities
Email bool `json:"email"`
}
swagger:model
type APIVerbGroup ¶
type APIVerbGroup []APIVerb
func ReadVerbGroup ¶
func ReadVerbGroup() APIVerbGroup
func ReadWriteVerbGroup ¶
func ReadWriteVerbGroup() APIVerbGroup
type CreateModuleRequest ¶
type CreateModuleRequest struct {
Name string `json:"name" form:"required,max=255"`
EnvVars map[string]string `json:"env_vars"`
ValuesRaw map[string]interface{} `json:"values_raw" form:"required_without=ValuesGithub,omitempty"`
ValuesGithub *CreateModuleValuesRequestGithub `json:"values_github,omitempty" form:"required_without=ValuesRaw,omitempty"`
DeploymentGithub *CreateModuleRequestGithub `json:"github,omitempty" form:"omitempty"`
DeploymentLocal *CreateModuleRequestLocal `json:"local,omitempty" form:"omitempty"`
}
swagger:model
type CreateModuleRequestGithub ¶
type CreateModuleRequestGithub struct {
// path to the module in the github repository
// required: true
// example: ./staging/eks
Path string `json:"path" form:"required"`
// this refers to the Hatchet app installation id, **not** the installation id stored on Github
// required: true
// example: bb214807-246e-43a5-a25d-41761d1cff9e
GithubAppInstallationID string `json:"github_app_installation_id" form:"required,uuid"`
// the repository owner on Github
// required: true
// example: hatchet-dev
GithubRepositoryOwner string `json:"github_repository_owner" form:"required"`
// the repository name on Github
// required: true
// example: infra
GithubRepositoryName string `json:"github_repository_name" form:"required"`
// the repository branch on Github
// required: true
// example: main
GithubRepositoryBranch string `json:"github_repository_branch" form:"required"`
}
type CreateModuleRequestLocal ¶
type CreateModuleRequestLocal struct {
// the local path to the module
LocalPath string `json:"local_path" form:"required"`
}
type CreateModuleRunRequest ¶
type CreateModuleRunRequest struct {
Kind ModuleRunKind `json:"kind" form:"required,oneof=plan apply init destroy"`
Hostname string `json:"hostname"`
}
swagger:model
type CreateModuleValuesRequestGithub ¶
type CreateModuleValuesRequestGithub struct {
// path to the module values in the github repository (including file name)
// required: true
// example: ./staging/eks
Path string `json:"path" form:"required"`
// this refers to the Hatchet app installation id, **not** the installation id stored on Github
// required: true
// example: bb214807-246e-43a5-a25d-41761d1cff9e
GithubAppInstallationID string `json:"github_app_installation_id" form:"required,uuid"`
// the repository owner on Github
// required: true
// example: hatchet-dev
GithubRepositoryOwner string `json:"github_repository_owner" form:"required"`
// the repository name on Github
// required: true
// example: infra
GithubRepositoryName string `json:"github_repository_name" form:"required"`
// the repository branch on Github
// required: true
// example: main
GithubRepositoryBranch string `json:"github_repository_branch" form:"required"`
}
type CreateMonitorRequest ¶
type CreateMonitorRequest struct {
Name string `json:"name" form:"required"`
Description string `json:"description" form:"required"`
Kind ModuleMonitorKind `json:"kind" form:"required,oneof=plan state before_plan after_plan before_apply after_apply before_destroy after_destroy"`
CronSchedule string `json:"cron_schedule" form:"omitempty,required_if=Kind plan,required_if=Kind state,cron"`
PolicyBytes string `json:"policy_bytes" form:"required"`
// Whether the monitor is disabled. In order to turn the monitor off for all modules, set
// disabled=true. Passing in an empty module list will trigger this monitor for all modules.
Disabled bool `json:"disabled"`
// A list of module ids. If empty or omitted, this monitor targets all modules.
Modules []string `json:"modules,omitempty"`
}
swagger:model
type CreateMonitorResultRequest ¶
type CreateMonitorResultRequest struct {
MonitorID string `json:"monitor_id" form:"required"`
Status string `json:"status" mapstructure:"POLICY_STATUS" form:"omitempty,oneof=succeeded failed"`
Severity string `json:"severity" mapstructure:"POLICY_SEVERITY" form:"omitempty,oneof=critical high low"`
Title string `json:"title" mapstructure:"POLICY_TITLE" form:"required"`
SuccessMessage string `json:"success_message" mapstructure:"POLICY_SUCCESS_MESSAGE"`
FailureMessages []string `json:"failure_messages" mapstructure:"POLICY_FAILURE_MESSAGES"`
}
swagger:model
type CreateOrgMemberInviteRequest ¶
type CreateOrgMemberInviteRequest struct {
// the email address to use for the invite
//
// required: true
// example: user1@gmail.com
InviteeEmail string `json:"invitee_email" form:"required,max=255,email"`
// the set of policies for this user
// required: true
InviteePolicies []OrganizationPolicyReference `json:"invitee_policies" form:"required,min=1,dive"`
}
swagger:model
type CreateOrgMemberInviteResponse ¶
type CreateOrgMemberInviteResponse OrganizationMember
swagger:model
type CreateOrganizationRequest ¶
type CreateOrganizationRequest struct {
// the display name for the organization
//
// required: true
// example: Organization 1
DisplayName string `json:"display_name" form:"required,max=255"`
}
swagger:model
type CreatePATRequest ¶
type CreatePATRequest struct {
// the display name for the personal access token
// required: true
// example: cli-token-1234
DisplayName string `json:"display_name" form:"required,max=255"`
}
swagger:model
type CreatePATResponse ¶
type CreatePATResponse struct {
// the personal access token object
PersonalAccessToken PersonalAccessToken `json:"pat"`
// the raw JWT token. see API documentation for details
// example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....
Token string `json:"token"`
}
swagger:model
type CreateTeamRequest ¶
type CreateTeamRequest struct {
// the display name for the team
//
// required: true
// example: Team 1
DisplayName string `json:"display_name" form:"required,max=255"`
}
swagger:model
type CreateTerraformPlanRequest ¶
type CreateTerraformPlanRequest struct {
// the prettified contents of the plan
// required: true
PlanPretty string `json:"plan_pretty"`
// the JSON contents of the plan
// required: true
PlanJSON string `json:"plan_json"`
}
swagger:model
type CreateTerraformStateRequest ¶
type CreateTerraformStateRequest struct {
ID string `schema:"ID"`
}
swagger:model
type CreateUserRequest ¶
type CreateUserRequest struct {
// the display name for this user
//
// required: true
// example: User 1
DisplayName string `json:"display_name" form:"required,max=255"`
// the email address for this user
//
// required: true
// example: user1@gmail.com
Email string `json:"email" form:"required,max=255,email"`
// the password for this user
//
// required: true
// example: Securepassword123
Password string `json:"password" form:"required,max=255,password"`
}
swagger:model
type DeploymentMechanism ¶
type DeploymentMechanism string
const ( DeploymentMechanismGithub DeploymentMechanism = "github" DeploymentMechanismAPI DeploymentMechanism = "api" DeploymentMechanismLocal DeploymentMechanism = "local" )
type FinalizeModuleRunRequest ¶
type FinalizeModuleRunRequest struct {
// the status of the module run
// required: true
Status ModuleRunStatus `json:"status" form:"required"`
// the description for the module run status
// required: true
Description string `json:"description"`
// the report kind for the finalizer request
// required: true
ReportKind ModuleRunReportKind `json:"report_kind" form:"required,oneof=core monitor"`
}
swagger:model
type GetModuleEnvVarsVersionResponse ¶
type GetModuleEnvVarsVersionResponse ModuleEnvVarsVersion
swagger:model
type GetModulePlanSummaryResponse ¶
type GetModulePlanSummaryResponse []ModulePlannedChangeSummary
swagger:model
type GetModuleRunTokenResponse ¶
type GetModuleRunTokenResponse struct {
Token string `json:"token"`
}
swagger:model
type GetModuleTarballURLRequest ¶
type GetModuleTarballURLRequest struct {
// the SHA to get the tarball from
// name: github_sha
// in: query
GithubSHA string `schema:"github_sha" json:"github_sha"`
}
swagger:parameters getModuleTarballURL
type GetModuleTarballURLResponse ¶
type GetModuleTarballURLResponse struct {
URL string `json:"url"`
}
swagger:model
type GetModuleValuesCurrentResponse ¶
type GetModuleValuesCurrentResponse map[string]interface{}
swagger:model
type GetModuleValuesRequest ¶
type GetModuleValuesRequest struct {
// the SHA to get the module values file from
// name: github_sha
// in: query
GithubSHA string `schema:"github_sha" json:"github_sha"`
}
swagger:parameters getCurrentModuleValues
type GithubAppInstallation ¶
type GithubAppInstallation struct {
*APIResourceMeta
InstallationID int64 `json:"installation_id"`
InstallationSettingsURL string `json:"installation_settings_url"`
AccountName string `json:"account_name"`
AccountAvatarURL string `json:"account_avatar_url"`
}
swagger:model
type GithubBranch ¶
type GithubBranch struct {
BranchName string `json:"branch_name"`
IsDefault bool `json:"is_default"`
}
swagger:model
type GithubPullRequest ¶
type GithubPullRequest struct {
GithubRepositoryOwner string `json:"github_repository_owner"`
GithubRepositoryName string `json:"github_repository_name"`
GithubPullRequestID int64 `json:"github_pull_request_id"`
GithubPullRequestTitle string `json:"github_pull_request_title"`
GithubPullRequestNumber int64 `json:"github_pull_request_number"`
GithubPullRequestHeadBranch string `json:"github_pull_request_head_branch"`
GithubPullRequestBaseBranch string `json:"github_pull_request_base_branch"`
GithubPullRequestState string `json:"github_pull_request_state"`
}
swagger:model
type GithubRepo ¶
swagger:model
type ListGithubAppInstallationsRequest ¶
type ListGithubAppInstallationsRequest struct {
*PaginationRequest
}
swagger:parameters listGithubAppInstallations
type ListGithubAppInstallationsResponse ¶
type ListGithubAppInstallationsResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*GithubAppInstallation `json:"rows"`
}
swagger:model
type ListGithubRepoBranchesResponse ¶
type ListGithubRepoBranchesResponse []GithubBranch
swagger:model
type ListModuleRunsRequest ¶
type ListModuleRunsRequest struct {
*PaginationRequest
// an optional list of statuses for the module run
// in: query
Status []ModuleRunStatus `schema:"status" json:"status,omitempty"`
// an optional list of kinds for the module run
// in: query
Kind []ModuleRunKind `schema:"kind" json:"kind,omitempty"`
}
swagger:parameters listModuleRuns
type ListModuleRunsResponse ¶
type ListModuleRunsResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*ModuleRunOverview `json:"rows"`
}
swagger:model
type ListModulesRequest ¶
type ListModulesRequest struct {
*PaginationRequest
}
swagger:parameters listModules
type ListModulesResponse ¶
type ListModulesResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*Module `json:"rows"`
}
swagger:model
type ListMonitorResultsRequest ¶
type ListMonitorResultsRequest struct {
*PaginationRequest
// The monitor id to filter by
// in: query
// example: 322346f9-54b4-497d-bc9a-c54b5aaa4400
ModuleMonitorID string `schema:"module_monitor_id" json:"module_monitor_id" form:"omitempty,uuid"`
// The module id to filter by
// in: query
// example: 322346f9-54b4-497d-bc9a-c54b5aaa4400
ModuleID string `schema:"module_id" json:"module_id" form:"omitempty,uuid"`
}
swagger:parameters listMonitorResults
type ListMonitorResultsResponse ¶
type ListMonitorResultsResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*ModuleMonitorResult `json:"rows"`
}
swagger:model
type ListMonitorsRequest ¶
type ListMonitorsRequest struct {
*PaginationRequest
}
swagger:parameters listMonitors
type ListMonitorsResponse ¶
type ListMonitorsResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*ModuleMonitorMeta `json:"rows"`
}
swagger:model
type ListNotificationsRequest ¶
type ListNotificationsRequest struct {
*PaginationRequest
TeamID string `json:"team_id" schema:"team_id"`
}
swagger:parameters listNotifications
type ListNotificationsResponse ¶
type ListNotificationsResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*NotificationMeta `json:"rows"`
}
swagger:model
type ListOrgMembersRequest ¶
type ListOrgMembersRequest struct {
*PaginationRequest
}
swagger:parameters listOrgMembers
type ListOrgMembersResponse ¶
type ListOrgMembersResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*OrganizationMemberSanitized `json:"rows"`
}
swagger:model
type ListPATsRequest ¶
type ListPATsRequest struct {
*PaginationRequest
}
swagger:parameters listPersonalAccessTokens
type ListPATsResponse ¶
type ListPATsResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*PersonalAccessToken `json:"rows"`
}
swagger:model
type ListTeamMembersRequest ¶
type ListTeamMembersRequest struct {
*PaginationRequest
}
swagger:parameters listTeamMembers
type ListTeamMembersResponse ¶
type ListTeamMembersResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*TeamMember `json:"rows"`
}
swagger:model
type ListTeamsRequest ¶
type ListTeamsRequest struct {
*PaginationRequest
}
swagger:parameters listTeams
type ListTeamsResponse ¶
type ListTeamsResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*Team `json:"rows"`
}
swagger:model
type ListUserOrgsRequest ¶
type ListUserOrgsRequest struct {
*PaginationRequest
}
swagger:parameters listUserOrganizations
type ListUserOrgsResponse ¶
type ListUserOrgsResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*Organization `json:"rows"`
}
swagger:model
type ListUserTeamsRequest ¶
type ListUserTeamsRequest struct {
*PaginationRequest
// the id of the organization to filter by (optional)
// in: query
// example: bb214807-246e-43a5-a25d-41761d1cff9e
OrganizationID string `schema:"organization_id"`
}
swagger:parameters listUserTeams
type ListUserTeamsResponse ¶
type ListUserTeamsResponse struct {
Pagination *PaginationResponse `json:"pagination"`
Rows []*Team `json:"rows"`
}
swagger:model
type LockTerraformStateRequest ¶
type LockTerraformStateRequest struct {
ID string `json:"ID"`
Operation string `json:"Operation"`
Info string `json:"Info"`
Who string `json:"Who"`
Version string `json:"Version"`
Created string `json:"Created"`
Path string `json:"Path"`
}
swagger:model
type LockTerraformStateResponse ¶
type LockTerraformStateResponse struct {
*TerraformLock
}
swagger:model
type LoginUserRequest ¶
type LoginUserRequest struct {
// the email address for this user
//
// required: true
// example: user1@gmail.com
Email string `json:"email" form:"required,max=255,email"`
// the password for this user
//
// required: true
// example: Securepassword123
Password string `json:"password" form:"required,max=255,password"`
}
swagger:model
type Module ¶
type Module struct {
*APIResourceMeta
// the name for the module
// example: eks
Name string `json:"name"`
DeploymentMechanism DeploymentMechanism `json:"deployment_mechanism"`
DeploymentConfig ModuleDeploymentConfig `json:"deployment"`
LockID string `json:"lock_id"`
LockKind ModuleLockKind `json:"lock_kind"`
CurrentValuesVersionID string `json:"current_values_version_id"`
CurrentEnvVarsVersionID string `json:"current_env_vars_version_id"`
}
swagger:model
type ModuleDeploymentConfig ¶
type ModuleDeploymentConfig struct {
Path string `json:"path"`
GitRepoName string `json:"git_repo_name"`
GitRepoOwner string `json:"git_repo_owner"`
GitRepoBranch string `json:"git_repo_branch"`
GithubAppInstallationID string `json:"github_app_installation_id"`
}
swagger:model
type ModuleEnvVar ¶
type ModuleEnvVarsVersion ¶
type ModuleEnvVarsVersion struct {
*APIResourceMeta
Version uint `json:"version"`
EnvVars []ModuleEnvVar `json:"env_vars"`
}
swagger:model
type ModuleLockKind ¶
type ModuleLockKind string
const ( ModuleLockKindGithubBranch ModuleLockKind = "github_branch" ModuleLockKindManual ModuleLockKind = "manual" )
type ModuleMonitor ¶
type ModuleMonitor struct {
*ModuleMonitorMeta
// The list of modules that this monitor filters for
Modules []string `json:"modules"`
// the policy bytes for the monitor
PolicyBytes string `json:"policy_bytes"`
}
swagger:model
type ModuleMonitorKind ¶
type ModuleMonitorKind string
const ( MonitorKindPlan ModuleMonitorKind = "plan" MonitorKindState ModuleMonitorKind = "state" MonitorKindBeforePlan ModuleMonitorKind = "before_plan" MonitorKindAfterPlan ModuleMonitorKind = "after_plan" MonitorKindBeforeApply ModuleMonitorKind = "before_apply" MonitorKindAfterApply ModuleMonitorKind = "after_apply" MonitorKindBeforeDestroy ModuleMonitorKind = "before_destroy" MonitorKindAfterDestroy ModuleMonitorKind = "after_destroy" )
type ModuleMonitorMeta ¶
type ModuleMonitorMeta struct {
*APIResourceMeta
// the name for the monitor
// example: drift
Name string `json:"name"`
// the description for the monitor
// example: detects drift
Description string `json:"description"`
// the kind of monitor
// example: plan
Kind ModuleMonitorKind `json:"kind"`
// the cron schedule for the monitor
CronSchedule string `json:"cron_schedule"`
// whether this monitor is a default for all modules in the team
IsDefault bool `json:"is_default"`
// whether the monitor is currently disabled
Disabled bool `json:"disabled"`
}
swagger:model
type ModuleMonitorResult ¶
type ModuleMonitorResult struct {
*APIResourceMeta
ModuleID string `json:"module_id"`
ModuleName string `json:"module_name"`
ModuleRunID string `json:"module_run_id"`
ModuleMonitorID string `json:"module_monitor_id"`
Status MonitorResultStatus `json:"status"`
Title string `json:"title"`
Message string `json:"message"`
Severity MonitorResultSeverity `json:"severity"`
}
swagger:model
type ModulePlannedChangeSummary ¶
type ModulePlannedChangeSummary struct {
Address string `json:"address"`
Actions []string `json:"actions"`
}
swagger:model
type ModuleRun ¶
type ModuleRun struct {
*ModuleRunOverview
ModuleRunConfig *ModuleRunConfig `json:"config,omitempty"`
ModuleRunPullRequest *GithubPullRequest `json:"github_pull_request,omitempty"`
Monitors []ModuleMonitor `json:"monitors,omitempty"`
MonitorResults []ModuleMonitorResult `json:"monitor_results,omitempty"`
}
swagger:model
type ModuleRunConfig ¶
type ModuleRunConfig struct {
TriggerKind ModuleRunTriggerKind `json:"trigger_kind"`
GitCommitSHA string `json:"git_commit_sha"`
EnvVarVersionID string `json:"env_var_version_id"`
ValuesVersionID string `json:"values_version_id"`
}
swagger:model
type ModuleRunKind ¶
type ModuleRunKind string
const ( ModuleRunKindPlan ModuleRunKind = "plan" ModuleRunKindApply ModuleRunKind = "apply" ModuleRunKindDestroy ModuleRunKind = "destroy" ModuleRunKindInit ModuleRunKind = "init" )
type ModuleRunOverview ¶
type ModuleRunOverview struct {
*APIResourceMeta
Status ModuleRunStatus `json:"status"`
StatusDescription string `json:"status_description"`
Kind ModuleRunKind `json:"kind"`
}
swagger:model
type ModuleRunReportKind ¶
type ModuleRunReportKind string
type ModuleRunStatus ¶
type ModuleRunStatus string
const ( ModuleRunStatusCompleted ModuleRunStatus = "completed" ModuleRunStatusFailed ModuleRunStatus = "failed" )
type ModuleRunTriggerKind ¶
type ModuleRunTriggerKind string
const ( ModuleRunTriggerKindGithub ModuleRunTriggerKind = "github" ModuleRunTriggerKindManual ModuleRunTriggerKind = "manual" )
type ModuleValues ¶
type ModuleValues struct {
*APIResourceMeta
Version uint `json:"version"`
// Github-based values
Github *ModuleValuesGithubConfig `json:"github,omitempty"`
// Raw values (may be omitted)
Values map[string]interface{} `json:"raw_values,omitempty"`
}
swagger:model
type ModuleValuesGithubConfig ¶
type ModuleValuesGithubConfig struct {
Path string `json:"path"`
GithubRepoName string `json:"github_repo_name"`
GithubRepoOwner string `json:"github_repo_owner"`
GithubRepoBranch string `json:"github_repo_branch"`
GithubAppInstallationID string `json:"github_app_installation_id"`
}
swagger:model
type MonitorResultSeverity ¶
type MonitorResultSeverity string
const ( MonitorResultSeverityCritical MonitorResultSeverity = "critical" MonitorResultSeverityHigh MonitorResultSeverity = "high" MonitorResultSeverityLow MonitorResultSeverity = "low" )
type MonitorResultStatus ¶
type MonitorResultStatus string
const ( MonitorResultStatusSucceeded MonitorResultStatus = "succeeded" MonitorResultStatusFailed MonitorResultStatus = "failed" )
type Notification ¶
type Notification struct {
*NotificationMeta
Runs []ModuleRun `json:"runs"`
MonitorResults []ModuleMonitorResult `json:"monitor_results"`
Module Module `json:"module"`
}
swagger:model
type NotificationMeta ¶
type NotificationMeta struct {
*APIResourceMeta
TeamID string `json:"team_id"`
NotificationID string `json:"notification_id"`
Title string `json:"title"`
Message string `json:"message"`
LastNotified *time.Time `json:"last_notified"`
Resolved bool `json:"resolved"`
ModuleID string `json:"module_id"`
}
swagger:model
type Organization ¶
type Organization struct {
*APIResourceMeta
// the display name for the team
// example: Organization 1
DisplayName string `json:"display_name"`
// information about the organization owner
Owner UserOrgPublishedData `json:"owner"`
}
swagger:model
type OrganizationInvite ¶
type OrganizationInvite struct {
*APIResourceMeta
InviteLinkURL string `json:"invite_link_url"`
PublicInviteLinkURL string `json:"public_invite_link_url"`
InviteeEmail string `json:"invitee_email"`
Expires *time.Time `json:"expires"`
}
swagger:model
type OrganizationInviteSanitized ¶
type OrganizationInviteSanitized struct {
*APIResourceMeta
InviteeEmail string `json:"invitee_email"`
Expires *time.Time `json:"expires"`
}
swagger:model
type OrganizationMember ¶
type OrganizationMember struct {
*APIResourceMeta
User UserOrgPublishedData `json:"user"`
Invite OrganizationInvite `json:"invite"`
InviteAccepted bool `json:"invite_accepted"`
OrgPolicies []OrganizationPolicyMeta `json:"organization_policies"`
}
swagger:model
type OrganizationMemberSanitized ¶
type OrganizationMemberSanitized struct {
*APIResourceMeta
User UserOrgPublishedData `json:"user"`
InviteAccepted bool `json:"invite_accepted"`
Invite OrganizationInviteSanitized `json:"invite"`
OrgPolicies []OrganizationPolicyMeta `json:"organization_policies"`
}
OrganizationMemberSanitized represents an organization member without a sensitive invite link exposed. swagger:model
type OrganizationPolicyMeta ¶
type OrganizationPolicyMeta struct {
*APIResourceMeta
Name string `json:"name"`
}
swagger:model
type OrganizationPolicyReference ¶
type OrganizationPolicyReference struct {
Name string `json:"name" form:"omitempty,oneof=admin member"`
ID string `json:"id" form:"omitempty,uuid"`
}
swagger:model
type PaginationRequest ¶
type PaginationRequest struct {
// The page to query for
// in: query
// example: 2
Page int64 `schema:"page" json:"page"`
}
type PaginationResponse ¶
type PaginationResponse struct {
// the total number of pages for listing
// example: 10
NumPages int64 `json:"num_pages" form:"required"`
// the current page
// example: 2
CurrentPage int64 `json:"current_page" form:"required"`
// the next page
// example: 3
NextPage int64 `json:"next_page" form:"required"`
}
swagger:model
type PermissionScope ¶
type PermissionScope string
const ( NoUserScope PermissionScope = "no_user_scope" UserScope PermissionScope = "user_scope" BasicAuthUserScope PermissionScope = "basic_auth_user_scope" OrgScope PermissionScope = "org_scope" OrgMemberScope PermissionScope = "org_member_scope" OrgOwnerScope PermissionScope = "org_owner_scope" TeamScope PermissionScope = "team_scope" TeamMemberScope PermissionScope = "team_member_scope" GithubAppInstallationScope PermissionScope = "github_app_installation_scope" ModuleScope PermissionScope = "module_scope" ModuleEnvVarScope PermissionScope = "module_env_var_scope" ModuleValuesScope PermissionScope = "module_values_scope" ModuleRunScope PermissionScope = "module_run_scope" MonitorScope PermissionScope = "monitor_scope" NotificationScope PermissionScope = "notification_scope" // ModuleServiceAccountScope restricts the scope to service account types only. This is enforced // by OPA policies ModuleServiceAccountScope PermissionScope = "module_service_account_scope" )
type PersonalAccessToken ¶
type PersonalAccessToken struct {
*APIResourceMeta
// the display name for the personal access token
// example: cli-token-1234
DisplayName string `json:"display_name"`
// when the token expires
// example: 2023-01-12T17:09:28.35059-05:00
Expires *time.Time `json:"expires"`
// whether the token has been revoked
// example: false
Revoked bool `json:"revoked"`
}
swagger:model
type ResetPasswordEmailFinalizeRequest ¶
type ResetPasswordEmailFinalizeRequest struct {
*ResetPasswordEmailVerifyTokenRequest
// the new password for this user
//
// required: true
// example: Newpassword123
NewPassword string `json:"new_password" form:"required,max=255,password"`
}
swagger:model
type ResetPasswordEmailRequest ¶
type ResetPasswordEmailRequest struct {
// the email address for this user
//
// required: true
// example: user1@gmail.com
Email string `json:"email" form:"required,max=255,email"`
}
swagger:model
type ResetPasswordEmailVerifyTokenRequest ¶
type ResetPasswordEmailVerifyTokenRequest struct {
// the email address for this user
//
// required: true
// example: user1@gmail.com
Email string `json:"email" form:"required,max=255,email"`
// the token id
//
// required: true
// example: bb214807-246e-43a5-a25d-41761d1cff9e
TokenID string `json:"token_id" form:"required"`
// the token
//
// required: true
// example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....
Token string `json:"token" form:"required"`
}
swagger:model
type ResetPasswordManualRequest ¶
type ResetPasswordManualRequest struct {
// the old password for this user
//
// required: true
// example: Securepassword123
OldPassword string `json:"old_password" form:"required,max=255,password"`
// the new password for this user
//
// required: true
// example: Newpassword123
NewPassword string `json:"new_password" form:"required,max=255,password"`
}
swagger:model
type RevokePATResponseExample ¶
type RevokePATResponseExample struct {
*PersonalAccessToken
// whether the token is revoked
// example: true
Revoked bool `json:"revoked"`
}
swagger:model
type Team ¶
type Team struct {
*APIResourceMeta
// the display name for the team
// example: Team 1
DisplayName string `json:"display_name"`
}
swagger:model
type TeamAddMemberRequest ¶
type TeamAddMemberRequest struct {
// the organization member id of the new team member
OrgMemberID string `json:"org_member_id" form:"required"`
// the set of policies for this user
// required: true
Policies []TeamPolicyReference `json:"policies" form:"required,min=1,dive"`
}
swagger:model
type TeamMember ¶
type TeamMember struct {
*APIResourceMeta
OrgMember OrganizationMemberSanitized `json:"org_member"`
TeamPolicies []TeamPolicyMeta `json:"team_policies"`
}
swagger:model
type TeamPolicyMeta ¶
type TeamPolicyMeta struct {
*APIResourceMeta
Name string `json:"name"`
}
swagger:model
type TeamPolicyReference ¶
type TeamPolicyReference struct {
Name string `json:"name" form:"omitempty,oneof=admin member"`
ID string `json:"id" form:"omitempty,uuid"`
}
swagger:model
type TeamUpdateRequest ¶
type TeamUpdateRequest struct {
// the display name for the team
//
// required: true
// example: Team 1
DisplayName string `json:"display_name" form:"required,max=255"`
}
swagger:model
type TerraformLock ¶
type URLParam ¶
type URLParam string
const PersonalAccessTokenURLParam URLParam = "pat_id"
const (
URLParamMonitorID URLParam = "monitor_id"
)
const (
URLParamNotificationID URLParam = "notification_id"
)
type UpdateModuleRequest ¶
type UpdateModuleRequest struct {
Name string `json:"name" form:"max=255"`
EnvVars map[string]string `json:"env_vars,omitempty" form:"omitempty"`
ValuesRaw map[string]interface{} `json:"values_raw,omitempty" form:"omitempty"`
ValuesGithub *CreateModuleValuesRequestGithub `json:"values_github,omitempty" form:"omitempty"`
DeploymentGithub *CreateModuleRequestGithub `json:"github,omitempty" form:"omitempty"`
}
swagger:model
type UpdateMonitorRequest ¶
type UpdateMonitorRequest struct {
Name string `json:"name" form:"omitempty"`
Description string `json:"description" form:"omitempty"`
Kind ModuleMonitorKind `json:"kind" form:"omitempty,oneof=plan state before_plan after_plan before_apply after_apply before_destroy after_destroy"`
CronSchedule string `json:"cron_schedule" form:"omitempty,cron"`
PolicyBytes string `json:"policy_bytes" form:"omitempty"`
// Whether the monitor is disabled. In order to turn the monitor off for all modules, set
// disabled=true. Passing in an empty module list will trigger this monitor for all modules.
Disabled *bool `json:"disabled,omitempty"`
// A list of module ids. If empty or omitted, this monitor targets all modules.
Modules []string `json:"modules,omitempty"`
}
swagger:model
type UpdateOrgMemberPoliciesRequest ¶
type UpdateOrgMemberPoliciesRequest struct {
// the set of policies for this user
// required: true
Policies []OrganizationPolicyReference `json:"policies" form:"required,min=1,dive"`
}
swagger:model
type UpdateOrgMemberPoliciesResponse ¶
type UpdateOrgMemberPoliciesResponse OrganizationMember
swagger:model
type UpdateOrgOwnerRequest ¶
type UpdateOrgOwnerRequest struct {
// the member id of the new owner
// example: bb214807-246e-43a5-a25d-41761d1cff9e
NewOwnerMemberID string `json:"new_owner_member_id" form:"required,uuid"`
}
swagger:model
type UpdateOrgRequest ¶
type UpdateOrgRequest struct {
// the display name for this user
//
// required: true
// example: User 1
DisplayName string `json:"display_name" form:"required,max=255"`
}
swagger:model
type UpdateUserRequest ¶
type UpdateUserRequest struct {
// the display name for this user
//
// required: true
// example: User 1
DisplayName string `json:"display_name" form:"required,max=255"`
}
swagger:model
type UsageMetric ¶
type UsageMetric string
type User ¶
type User struct {
*APIResourceMeta
// the display name for this user
// example: User 1
DisplayName string `json:"display_name"`
// the email address for this user
// example: user1@gmail.com
Email string `json:"email"`
// whether this user's email address has been verified
// example: false
EmailVerified bool `json:"email_verified"`
// a URI for the user icon
// example: https://avatars.githubusercontent.com/u/25448214?v=4
Icon string `json:"icon"`
}
swagger:model
type UserOrgPublishedData ¶
type UserOrgPublishedData struct {
// the display name for this user
// example: User 1
DisplayName string `json:"display_name" form:"required,max=255"`
// the email address for this user
// example: user1@gmail.com
Email string `json:"email" form:"required,max=255,email"`
}
Public data about the user that other members of the org and team can access swagger:model
type VerifyEmailRequest ¶
type VerifyEmailRequest struct {
// the token id
//
// required: true
// example: bb214807-246e-43a5-a25d-41761d1cff9e
TokenID string `json:"token_id" form:"required"`
// the token
//
// required: true
// example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....
Token string `json:"token" form:"required"`
}
swagger:model