Documentation ¶
Overview ¶
Package tharsis provides functions for interfacing with the Tharsis API.
Index ¶
- func IsNotFoundError(err error) bool
- type Apply
- type Client
- type ConfigurationVersion
- type GPGKey
- type GetWorkspacesPaginator
- type GraphQLManagedIdentity
- type GraphQLStateVersion
- type GraphQLStateVersionOutput
- type Group
- type GroupPaginator
- type Job
- type JobLogSubscriptionInput
- type ManagedIdentity
- type Plan
- type Run
- type RunPaginator
- type ServiceAccount
- type StateVersion
- type TerraformCLIVersion
- type TerraformModule
- type TerraformModuleAttestation
- type TerraformModuleVersion
- type TerraformProvider
- type TerraformProviderPlatform
- type TerraformProviderVersion
- type VCSProvider
- type Variable
- type WorkspaceVCSProviderLink
- type Workspaces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFoundError ¶ added in v0.19.1
IsNotFoundError returns true if the error is a tharsis Error and contains the ErrNotFound code.
Types ¶
type Apply ¶
type Apply interface {
UpdateApply(ctx context.Context, input *types.UpdateApplyInput) (*types.Apply, error)
}
Apply implements functions related to Tharsis Apply.
type Client ¶
type Client struct { ConfigurationVersion ConfigurationVersion GPGKey GPGKey Group Group Job Job ManagedIdentity ManagedIdentity Plan Plan Apply Apply Run Run ServiceAccount ServiceAccount StateVersion StateVersion Variable Variable Workspaces Workspaces TerraformProvider TerraformProvider TerraformProviderVersion TerraformProviderVersion TerraformModule TerraformModule TerraformModuleVersion TerraformModuleVersion TerraformModuleAttestation TerraformModuleAttestation TerraformProviderPlatform TerraformProviderPlatform TerraformCLIVersions TerraformCLIVersion VCSProvider VCSProvider WorkspaceVCSProviderLink WorkspaceVCSProviderLink // contains filtered or unexported fields }
Client provides access for the client/user to access the SDK functions. Note: When adding a new field here, make sure to assign the field near the end of the NewClient function.
type ConfigurationVersion ¶
type ConfigurationVersion interface { GetConfigurationVersion(ctx context.Context, input *types.GetConfigurationVersionInput) (*types.ConfigurationVersion, error) CreateConfigurationVersion(ctx context.Context, input *types.CreateConfigurationVersionInput) (*types.ConfigurationVersion, error) DownloadConfigurationVersion(ctx context.Context, input *types.GetConfigurationVersionInput, writer io.WriterAt) error UploadConfigurationVersion(ctx context.Context, input *types.UploadConfigurationVersionInput) error }
ConfigurationVersion implements functions related to Tharsis configuration versions.
func NewConfigurationVersion ¶
func NewConfigurationVersion(client *Client) ConfigurationVersion
NewConfigurationVersion returns a ConfigurationVersion object.
type GPGKey ¶ added in v0.15.0
type GPGKey interface { GetGPGKey(ctx context.Context, input *types.GetGPGKeyInput) (*types.GPGKey, error) CreateGPGKey(ctx context.Context, input *types.CreateGPGKeyInput) (*types.GPGKey, error) DeleteGPGKey(ctx context.Context, input *types.DeleteGPGKeyInput) (*types.GPGKey, error) }
GPGKey implements functions related to Tharsis GPG keys.
type GetWorkspacesPaginator ¶
type GetWorkspacesPaginator struct {
// contains filtered or unexported fields
}
GetWorkspacesPaginator is a type-specific paginator.
func (*GetWorkspacesPaginator) HasMore ¶
func (wp *GetWorkspacesPaginator) HasMore() bool
HasMore returns a boolean, whether there is another page (or more):
func (*GetWorkspacesPaginator) Next ¶
func (wp *GetWorkspacesPaginator) Next(ctx context.Context) (*types.GetWorkspacesOutput, error)
Next returns the next page of results:
type GraphQLManagedIdentity ¶
type GraphQLManagedIdentity struct { AliasSourceID *graphql.String Metadata internal.GraphQLMetadata ID graphql.String Type graphql.String GroupPath graphql.String ResourcePath graphql.String Name graphql.String Description graphql.String Data graphql.String CreatedBy graphql.String IsAlias graphql.Boolean }
GraphQLManagedIdentity represents the insides of the query structure, everything in the managed identity object, and with graphql types.
type GraphQLStateVersion ¶
type GraphQLStateVersion struct { Metadata internal.GraphQLMetadata ID graphql.String Run struct { ID graphql.String } Outputs []GraphQLStateVersionOutput }
GraphQLStateVersion represents the insides of the query structure, everything in the state version object, and with graphql types.
type GraphQLStateVersionOutput ¶
type GraphQLStateVersionOutput struct { Metadata internal.GraphQLMetadata ID graphql.String Name graphql.String Value graphql.String Type graphql.String Sensitive graphql.Boolean }
GraphQLStateVersionOutput represents the insides of the query structure, everything in the state version output object, and with graphql types.
type Group ¶
type Group interface { GetGroup(ctx context.Context, input *types.GetGroupInput) (*types.Group, error) GetGroups(ctx context.Context, input *types.GetGroupsInput) (*types.GetGroupsOutput, error) GetGroupPaginator(ctx context.Context, input *types.GetGroupsInput) (*GroupPaginator, error) CreateGroup(ctx context.Context, input *types.CreateGroupInput) (*types.Group, error) UpdateGroup(ctx context.Context, input *types.UpdateGroupInput) (*types.Group, error) DeleteGroup(ctx context.Context, input *types.DeleteGroupInput) error }
Group implements functions related to Tharsis groups.
type GroupPaginator ¶
type GroupPaginator struct {
// contains filtered or unexported fields
}
GroupPaginator is a type-specific paginator.
func (*GroupPaginator) HasMore ¶
func (gp *GroupPaginator) HasMore() bool
HasMore returns a boolean, whether there is another page (or more):
func (*GroupPaginator) Next ¶
func (gp *GroupPaginator) Next(ctx context.Context) (*types.GetGroupsOutput, error)
Next returns the next page of results:
type Job ¶
type Job interface { GetJob(ctx context.Context, input *types.GetJobInput) (*types.Job, error) SubscribeToJobCancellationEvent(ctx context.Context, input *types.JobCancellationEventSubscriptionInput) (<-chan *types.CancellationEvent, error) SaveJobLogs(ctx context.Context, input *types.SaveJobLogsInput) error SubscribeToJobLogs(ctx context.Context, input *types.JobLogsSubscriptionInput) (<-chan *types.JobLogsEvent, error) }
Job implements functions related to Tharsis jobs.
type JobLogSubscriptionInput ¶ added in v0.19.0
type JobLogSubscriptionInput struct {
JobID string `json:"jobId"`
}
JobLogSubscriptionInput is the input for subscribing to job log events.
type ManagedIdentity ¶
type ManagedIdentity interface { CreateManagedIdentity(ctx context.Context, input *types.CreateManagedIdentityInput) (*types.ManagedIdentity, error) GetManagedIdentity(ctx context.Context, input *types.GetManagedIdentityInput) (*types.ManagedIdentity, error) UpdateManagedIdentity(ctx context.Context, input *types.UpdateManagedIdentityInput) (*types.ManagedIdentity, error) DeleteManagedIdentity(ctx context.Context, input *types.DeleteManagedIdentityInput) error CreateManagedIdentityCredentials(ctx context.Context, input *types.CreateManagedIdentityCredentialsInput) ([]byte, error) AssignManagedIdentityToWorkspace(ctx context.Context, input *types.AssignManagedIdentityInput) (*types.Workspace, error) UnassignManagedIdentityFromWorkspace(ctx context.Context, input *types.AssignManagedIdentityInput) (*types.Workspace, error) GetManagedIdentityAccessRules(ctx context.Context, input *types.GetManagedIdentityInput) ([]types.ManagedIdentityAccessRule, error) CreateManagedIdentityAccessRule(ctx context.Context, input *types.CreateManagedIdentityAccessRuleInput) (*types.ManagedIdentityAccessRule, error) GetManagedIdentityAccessRule(ctx context.Context, input *types.GetManagedIdentityAccessRuleInput) (*types.ManagedIdentityAccessRule, error) UpdateManagedIdentityAccessRule(ctx context.Context, input *types.UpdateManagedIdentityAccessRuleInput) (*types.ManagedIdentityAccessRule, error) DeleteManagedIdentityAccessRule(ctx context.Context, input *types.DeleteManagedIdentityAccessRuleInput) error CreateManagedIdentityAlias(ctx context.Context, input *types.CreateManagedIdentityAliasInput) (*types.ManagedIdentity, error) DeleteManagedIdentityAlias(ctx context.Context, input *types.DeleteManagedIdentityAliasInput) error }
ManagedIdentity implements functions related to Tharsis ManagedIdentity.
func NewManagedIdentity ¶
func NewManagedIdentity(client *Client) ManagedIdentity
NewManagedIdentity returns a new ManagedIdentity.
type Plan ¶
type Plan interface { UpdatePlan(ctx context.Context, input *types.UpdatePlanInput) (*types.Plan, error) DownloadPlanCache(ctx context.Context, id string, writer io.WriterAt) error UploadPlanCache(ctx context.Context, id string, body io.Reader) error }
Plan implements functions related to Tharsis Plan.
type Run ¶
type Run interface { GetRun(ctx context.Context, input *types.GetRunInput) (*types.Run, error) GetRuns(ctx context.Context, input *types.GetRunsInput) (*types.GetRunsOutput, error) GetRunVariables(ctx context.Context, input *types.GetRunInput) ([]types.RunVariable, error) GetRunPaginator(ctx context.Context, input *types.GetRunsInput) (*RunPaginator, error) CreateRun(ctx context.Context, input *types.CreateRunInput) (*types.Run, error) ApplyRun(ctx context.Context, input *types.ApplyRunInput) (*types.Run, error) CancelRun(ctx context.Context, input *types.CancelRunInput) (*types.Run, error) SubscribeToWorkspaceRunEvents(ctx context.Context, input *types.RunSubscriptionInput) (<-chan *types.Run, error) }
Run implements functions related to Tharsis runs.
type RunPaginator ¶
type RunPaginator struct {
// contains filtered or unexported fields
}
RunPaginator is a type-specific paginator.
func (*RunPaginator) HasMore ¶
func (rp *RunPaginator) HasMore() bool
HasMore returns a boolean, whether there is another page (or more):
func (*RunPaginator) Next ¶
func (rp *RunPaginator) Next(ctx context.Context) (*types.GetRunsOutput, error)
Next returns the next page of results:
type ServiceAccount ¶ added in v0.6.0
type ServiceAccount interface { CreateServiceAccount(ctx context.Context, input *types.CreateServiceAccountInput) (*types.ServiceAccount, error) GetServiceAccount(ctx context.Context, input *types.GetServiceAccountInput) (*types.ServiceAccount, error) UpdateServiceAccount(ctx context.Context, input *types.UpdateServiceAccountInput) (*types.ServiceAccount, error) DeleteServiceAccount(ctx context.Context, input *types.DeleteServiceAccountInput) error CreateToken(ctx context.Context, input *types.ServiceAccountCreateTokenInput) (*types.ServiceAccountCreateTokenResponse, error) }
ServiceAccount implements functions related to Tharsis ServiceAccount.
func NewServiceAccount ¶ added in v0.6.0
func NewServiceAccount(client *Client) ServiceAccount
NewServiceAccount returns a new ServiceAccount.
type StateVersion ¶
type StateVersion interface { CreateStateVersion(ctx context.Context, input *types.CreateStateVersionInput) (*types.StateVersion, error) DownloadStateVersion(ctx context.Context, input *types.DownloadStateVersionInput, writer io.WriterAt) error }
StateVersion implements functions related to a Tharsis state version.
func NewStateVersion ¶
func NewStateVersion(client *Client) StateVersion
NewStateVersion returns a StateVersion.
type TerraformCLIVersion ¶
type TerraformCLIVersion interface {
CreateTerraformCLIDownloadURL(ctx context.Context, input *types.CreateTerraformCLIDownloadURLInput) (string, error)
}
TerraformCLIVersion implements the function related to Terraform CLI Versions.
func NewTerraformCLIVersion ¶
func NewTerraformCLIVersion(client *Client) TerraformCLIVersion
NewTerraformCLIVersion returns a TerraformCLIVersion object.
type TerraformModule ¶ added in v0.5.0
type TerraformModule interface { GetModule(ctx context.Context, input *types.GetTerraformModuleInput) (*types.TerraformModule, error) GetModules(ctx context.Context, input *types.GetTerraformModulesInput) (*types.GetTerraformModulesOutput, error) CreateModule(ctx context.Context, input *types.CreateTerraformModuleInput) (*types.TerraformModule, error) UpdateModule(ctx context.Context, input *types.UpdateTerraformModuleInput) (*types.TerraformModule, error) DeleteModule(ctx context.Context, input *types.DeleteTerraformModuleInput) error }
TerraformModule implements functions related to Tharsis modules.
func NewTerraformModule ¶ added in v0.5.0
func NewTerraformModule(client *Client) TerraformModule
NewTerraformModule returns a TerraformModule.
type TerraformModuleAttestation ¶ added in v0.14.0
type TerraformModuleAttestation interface { GetModuleAttestations(ctx context.Context, input *types.GetTerraformModuleAttestationsInput) (*types.GetTerraformModuleAttestationsOutput, error) CreateModuleAttestation(ctx context.Context, input *types.CreateTerraformModuleAttestationInput) (*types.TerraformModuleAttestation, error) UpdateModuleAttestation(ctx context.Context, input *types.UpdateTerraformModuleAttestationInput) (*types.TerraformModuleAttestation, error) DeleteModuleAttestation(ctx context.Context, input *types.DeleteTerraformModuleAttestationInput) error }
TerraformModuleAttestation implements functions related to Tharsis module attestations.
func NewTerraformModuleAttestation ¶ added in v0.14.0
func NewTerraformModuleAttestation(client *Client) TerraformModuleAttestation
NewTerraformModuleAttestation returns a TerraformModuleAttestation.
type TerraformModuleVersion ¶ added in v0.5.0
type TerraformModuleVersion interface { GetModuleVersion(ctx context.Context, input *types.GetTerraformModuleVersionInput) (*types.TerraformModuleVersion, error) GetModuleVersions(ctx context.Context, input *types.GetTerraformModuleVersionsInput) (*types.GetTerraformModuleVersionsOutput, error) CreateModuleVersion(ctx context.Context, input *types.CreateTerraformModuleVersionInput) (*types.TerraformModuleVersion, error) UploadModuleVersion(ctx context.Context, moduleVersionID string, reader io.Reader) error DeleteModuleVersion(ctx context.Context, input *types.DeleteTerraformModuleVersionInput) error }
TerraformModuleVersion implements functions related to Tharsis module versions.
func NewTerraformModuleVersion ¶ added in v0.5.0
func NewTerraformModuleVersion(client *Client) TerraformModuleVersion
NewTerraformModuleVersion returns a TerraformModuleVersion.
type TerraformProvider ¶
type TerraformProvider interface { GetProvider(ctx context.Context, input *types.GetTerraformProviderInput) (*types.TerraformProvider, error) CreateProvider(ctx context.Context, input *types.CreateTerraformProviderInput) (*types.TerraformProvider, error) UpdateProvider(ctx context.Context, input *types.UpdateTerraformProviderInput) (*types.TerraformProvider, error) DeleteProvider(ctx context.Context, input *types.DeleteTerraformProviderInput) (*types.TerraformProvider, error) }
TerraformProvider implements functions related to Tharsis providers.
func NewTerraformProvider ¶
func NewTerraformProvider(client *Client) TerraformProvider
NewTerraformProvider returns a TerraformProvider.
type TerraformProviderPlatform ¶
type TerraformProviderPlatform interface { GetProviderPlatform(ctx context.Context, input *types.GetTerraformProviderPlatformInput) (*types.TerraformProviderPlatform, error) CreateProviderPlatform(ctx context.Context, input *types.CreateTerraformProviderPlatformInput) (*types.TerraformProviderPlatform, error) UploadProviderPlatformBinary(ctx context.Context, providerPlatformID string, reader io.Reader) error }
TerraformProviderPlatform implements functions related to Tharsis provider platforms.
func NewTerraformProviderPlatform ¶
func NewTerraformProviderPlatform(client *Client) TerraformProviderPlatform
NewTerraformProviderPlatform returns a TerraformProviderPlatform.
type TerraformProviderVersion ¶
type TerraformProviderVersion interface { GetProviderVersion(ctx context.Context, input *types.GetTerraformProviderVersionInput) (*types.TerraformProviderVersion, error) CreateProviderVersion(ctx context.Context, input *types.CreateTerraformProviderVersionInput) (*types.TerraformProviderVersion, error) UploadProviderReadme(ctx context.Context, providerVersionID string, reader io.Reader) error UploadProviderChecksums(ctx context.Context, providerVersionID string, reader io.Reader) error UploadProviderChecksumSignature(ctx context.Context, providerVersionID string, reader io.Reader) error }
TerraformProviderVersion implements functions related to Tharsis providerVersions.
func NewTerraformProviderVersion ¶
func NewTerraformProviderVersion(client *Client) TerraformProviderVersion
NewTerraformProviderVersion returns a TerraformProviderVersion.
type VCSProvider ¶ added in v0.15.0
type VCSProvider interface { GetProvider(ctx context.Context, input *types.GetVCSProviderInput) (*types.VCSProvider, error) CreateProvider(ctx context.Context, input *types.CreateVCSProviderInput) (*types.CreateVCSProviderResponse, error) UpdateProvider(ctx context.Context, input *types.UpdateVCSProviderInput) (*types.VCSProvider, error) DeleteProvider(ctx context.Context, input *types.DeleteVCSProviderInput) (*types.VCSProvider, error) }
VCSProvider implements functions related to Tharsis VCS Providers.
func NewVCSProvider ¶ added in v0.15.0
func NewVCSProvider(client *Client) VCSProvider
NewVCSProvider returns a VCS provider.
type Variable ¶ added in v0.6.0
type Variable interface { CreateVariable(ctx context.Context, input *types.CreateNamespaceVariableInput) (*types.NamespaceVariable, error) GetVariable(ctx context.Context, input *types.GetNamespaceVariableInput) (*types.NamespaceVariable, error) UpdateVariable(ctx context.Context, input *types.UpdateNamespaceVariableInput) (*types.NamespaceVariable, error) DeleteVariable(ctx context.Context, input *types.DeleteNamespaceVariableInput) error SetVariables(ctx context.Context, input *types.SetNamespaceVariablesInput) error }
Variable implements functions related to Tharsis Variable.
func NewVariable ¶ added in v0.6.0
NewVariable returns a new Variable.
type WorkspaceVCSProviderLink ¶ added in v0.15.0
type WorkspaceVCSProviderLink interface { GetLink(ctx context.Context, input *types.GetWorkspaceVCSProviderLinkInput) (*types.WorkspaceVCSProviderLink, error) CreateLink(ctx context.Context, input *types.CreateWorkspaceVCSProviderLinkInput) (*types.CreateWorkspaceVCSProviderLinkResponse, error) UpdateLink(ctx context.Context, input *types.UpdateWorkspaceVCSProviderLinkInput) (*types.WorkspaceVCSProviderLink, error) DeleteLink(ctx context.Context, input *types.DeleteWorkspaceVCSProviderLinkInput) (*types.WorkspaceVCSProviderLink, error) }
WorkspaceVCSProviderLink implements functions related to Tharsis workspace VCS provider links.
func NewWorkspaceVCSProviderLink ¶ added in v0.15.0
func NewWorkspaceVCSProviderLink(client *Client) WorkspaceVCSProviderLink
NewWorkspaceVCSProviderLink returns a workspace VCS provider link.
type Workspaces ¶
type Workspaces interface { GetWorkspace(ctx context.Context, input *types.GetWorkspaceInput) (*types.Workspace, error) GetWorkspaces(ctx context.Context, input *types.GetWorkspacesInput) (*types.GetWorkspacesOutput, error) GetWorkspacePaginator(ctx context.Context, input *types.GetWorkspacesInput) (*GetWorkspacesPaginator, error) CreateWorkspace(ctx context.Context, workspace *types.CreateWorkspaceInput) (*types.Workspace, error) UpdateWorkspace(ctx context.Context, workspace *types.UpdateWorkspaceInput) (*types.Workspace, error) DeleteWorkspace(ctx context.Context, workspace *types.DeleteWorkspaceInput) error GetAssignedManagedIdentities(ctx context.Context, input *types.GetAssignedManagedIdentitiesInput) ([]types.ManagedIdentity, error) }
Workspaces implements functions related to Tharsis workspaces.
func NewWorkspaces ¶
func NewWorkspaces(client *Client) Workspaces
NewWorkspaces returns a Workspaces.
Source Files ¶
- apply.go
- cli.go
- configuration_version.go
- error.go
- gpgkey.go
- graphqlclient.go
- group.go
- job.go
- managedidentity.go
- plan.go
- run.go
- serviceaccount.go
- state_version.go
- subscription.go
- team.go
- terraform_module.go
- terraform_module_attestation.go
- terraform_module_version.go
- terraform_provider.go
- terraform_provider_platform.go
- terraform_provider_version.go
- test.go
- tharsis.go
- user.go
- variable.go
- vcs_provider.go
- workspace_vcs_provider_link.go
- workspaces.go