Documentation
¶
Overview ¶
Package jobclient package
Index ¶
- type Client
- type MockClient
- func (_m *MockClient) Close() error
- func (_m *MockClient) CreateManagedIdentityCredentials(ctx context.Context, managedIdentityID string) ([]byte, error)
- func (_m *MockClient) CreateServiceAccountToken(ctx context.Context, serviceAccountPath string, token string) (string, *time.Duration, error)
- func (_m *MockClient) CreateStateVersion(ctx context.Context, runID string, body io.Reader) (*types.StateVersion, error)
- func (_m *MockClient) CreateTerraformCLIDownloadURL(ctx context.Context, input *types.CreateTerraformCLIDownloadURLInput) (string, error)
- func (_m *MockClient) DownloadConfigurationVersion(ctx context.Context, configurationVersion *types.ConfigurationVersion, ...) error
- func (_m *MockClient) DownloadPlanCache(ctx context.Context, planID string, writer io.WriterAt) error
- func (_m *MockClient) DownloadStateVersion(ctx context.Context, stateVersion *types.StateVersion, writer io.WriterAt) error
- func (_m *MockClient) GetAssignedManagedIdentities(ctx context.Context, workspaceID string) ([]types.ManagedIdentity, error)
- func (_m *MockClient) GetConfigurationVersion(ctx context.Context, id string) (*types.ConfigurationVersion, error)
- func (_m *MockClient) GetJob(ctx context.Context, id string) (*types.Job, error)
- func (_m *MockClient) GetRun(ctx context.Context, id string) (*types.Run, error)
- func (_m *MockClient) GetRunVariables(ctx context.Context, runID string) ([]types.RunVariable, error)
- func (_m *MockClient) GetWorkspace(ctx context.Context, id string) (*types.Workspace, error)
- func (_m *MockClient) SaveJobLogs(ctx context.Context, jobID string, startOffset int, buffer []byte) error
- func (_m *MockClient) SubscribeToJobCancellationEvent(ctx context.Context, jobID string) (<-chan *types.CancellationEvent, error)
- func (_m *MockClient) UpdateApply(ctx context.Context, apply *types.Apply) (*types.Apply, error)
- func (_m *MockClient) UpdatePlan(ctx context.Context, apply *types.Plan) (*types.Plan, error)
- func (_m *MockClient) UploadPlanCache(ctx context.Context, plan *types.Plan, body io.Reader) error
- func (_m *MockClient) UploadPlanData(ctx context.Context, plan *types.Plan, tfPlan *tfjson.Plan, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetRun(ctx context.Context, id string) (*types.Run, error) GetJob(ctx context.Context, id string) (*types.Job, error) GetWorkspace(ctx context.Context, id string) (*types.Workspace, error) GetRunVariables(ctx context.Context, runID string) ([]types.RunVariable, error) GetAssignedManagedIdentities(ctx context.Context, workspaceID string) ([]types.ManagedIdentity, error) GetConfigurationVersion(ctx context.Context, id string) (*types.ConfigurationVersion, error) CreateStateVersion(ctx context.Context, runID string, body io.Reader) (*types.StateVersion, error) CreateManagedIdentityCredentials(ctx context.Context, managedIdentityID string) ([]byte, error) CreateTerraformCLIDownloadURL(ctx context.Context, input *types.CreateTerraformCLIDownloadURLInput) (string, error) SaveJobLogs(ctx context.Context, jobID string, startOffset int, buffer []byte) error SubscribeToJobCancellationEvent(ctx context.Context, jobID string) (<-chan *types.CancellationEvent, error) UpdateApply(ctx context.Context, apply *types.Apply) (*types.Apply, error) UpdatePlan(ctx context.Context, apply *types.Plan) (*types.Plan, error) UploadPlanCache(ctx context.Context, plan *types.Plan, body io.Reader) error UploadPlanData(ctx context.Context, plan *types.Plan, tfPlan *tfjson.Plan, tfProviderScheams *tfjson.ProviderSchemas) error DownloadConfigurationVersion(ctx context.Context, configurationVersion *types.ConfigurationVersion, writer io.WriterAt) error DownloadStateVersion(ctx context.Context, stateVersion *types.StateVersion, writer io.WriterAt) error DownloadPlanCache(ctx context.Context, planID string, writer io.WriterAt) error Close() error CreateServiceAccountToken(ctx context.Context, serviceAccountPath string, token string) (string, *time.Duration, error) }
Client interface is used by the Job Executor to interface with the Tharsis API
type MockClient ¶
MockClient is an autogenerated mock type for the Client type
func NewMockClient ¶
func NewMockClient(t mockConstructorTestingTNewMockClient) *MockClient
NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockClient) Close ¶
func (_m *MockClient) Close() error
Close provides a mock function with given fields:
func (*MockClient) CreateManagedIdentityCredentials ¶
func (_m *MockClient) CreateManagedIdentityCredentials(ctx context.Context, managedIdentityID string) ([]byte, error)
CreateManagedIdentityCredentials provides a mock function with given fields: ctx, managedIdentityID
func (*MockClient) CreateServiceAccountToken ¶
func (_m *MockClient) CreateServiceAccountToken(ctx context.Context, serviceAccountPath string, token string) (string, *time.Duration, error)
CreateServiceAccountToken provides a mock function with given fields: ctx, serviceAccountPath, token
func (*MockClient) CreateStateVersion ¶
func (_m *MockClient) CreateStateVersion(ctx context.Context, runID string, body io.Reader) (*types.StateVersion, error)
CreateStateVersion provides a mock function with given fields: ctx, runID, body
func (*MockClient) CreateTerraformCLIDownloadURL ¶
func (_m *MockClient) CreateTerraformCLIDownloadURL(ctx context.Context, input *types.CreateTerraformCLIDownloadURLInput) (string, error)
CreateTerraformCLIDownloadURL provides a mock function with given fields: ctx, input
func (*MockClient) DownloadConfigurationVersion ¶
func (_m *MockClient) DownloadConfigurationVersion(ctx context.Context, configurationVersion *types.ConfigurationVersion, writer io.WriterAt) error
DownloadConfigurationVersion provides a mock function with given fields: ctx, configurationVersion, writer
func (*MockClient) DownloadPlanCache ¶
func (_m *MockClient) DownloadPlanCache(ctx context.Context, planID string, writer io.WriterAt) error
DownloadPlanCache provides a mock function with given fields: ctx, planID, writer
func (*MockClient) DownloadStateVersion ¶
func (_m *MockClient) DownloadStateVersion(ctx context.Context, stateVersion *types.StateVersion, writer io.WriterAt) error
DownloadStateVersion provides a mock function with given fields: ctx, stateVersion, writer
func (*MockClient) GetAssignedManagedIdentities ¶
func (_m *MockClient) GetAssignedManagedIdentities(ctx context.Context, workspaceID string) ([]types.ManagedIdentity, error)
GetAssignedManagedIdentities provides a mock function with given fields: ctx, workspaceID
func (*MockClient) GetConfigurationVersion ¶
func (_m *MockClient) GetConfigurationVersion(ctx context.Context, id string) (*types.ConfigurationVersion, error)
GetConfigurationVersion provides a mock function with given fields: ctx, id
func (*MockClient) GetRunVariables ¶
func (_m *MockClient) GetRunVariables(ctx context.Context, runID string) ([]types.RunVariable, error)
GetRunVariables provides a mock function with given fields: ctx, runID
func (*MockClient) GetWorkspace ¶
GetWorkspace provides a mock function with given fields: ctx, id
func (*MockClient) SaveJobLogs ¶
func (_m *MockClient) SaveJobLogs(ctx context.Context, jobID string, startOffset int, buffer []byte) error
SaveJobLogs provides a mock function with given fields: ctx, jobID, startOffset, buffer
func (*MockClient) SubscribeToJobCancellationEvent ¶
func (_m *MockClient) SubscribeToJobCancellationEvent(ctx context.Context, jobID string) (<-chan *types.CancellationEvent, error)
SubscribeToJobCancellationEvent provides a mock function with given fields: ctx, jobID
func (*MockClient) UpdateApply ¶
UpdateApply provides a mock function with given fields: ctx, apply
func (*MockClient) UpdatePlan ¶
UpdatePlan provides a mock function with given fields: ctx, apply
func (*MockClient) UploadPlanCache ¶
UploadPlanCache provides a mock function with given fields: ctx, plan, body
func (*MockClient) UploadPlanData ¶
func (_m *MockClient) UploadPlanData(ctx context.Context, plan *types.Plan, tfPlan *tfjson.Plan, tfProviderScheams *tfjson.ProviderSchemas) error
UploadPlanData provides a mock function with given fields: ctx, plan, tfPlan, tfProviderScheams