Documentation
¶
Overview ¶
Package mock implements mocked services.
Index ¶
- func NewOrganization(name, email string) *otf.Organization
- func NewOrganizationList(name, email string, opts otf.OrganizationListOptions) *otf.OrganizationList
- func NewWorkspace(name, id, org string) *otf.Workspace
- func NewWorkspaceList(name, id, org string, opts otf.WorkspaceListOptions) *otf.WorkspaceList
- type ConfigurationVersionService
- func (s ConfigurationVersionService) Create(workspaceID string, opts otf.ConfigurationVersionCreateOptions) (*otf.ConfigurationVersion, error)
- func (s ConfigurationVersionService) Download(id string) ([]byte, error)
- func (s ConfigurationVersionService) Get(id string) (*otf.ConfigurationVersion, error)
- func (s ConfigurationVersionService) GetLatest(workspaceID string) (*otf.ConfigurationVersion, error)
- func (s ConfigurationVersionService) List(workspaceID string, opts otf.ConfigurationVersionListOptions) (*otf.ConfigurationVersionList, error)
- func (s ConfigurationVersionService) Upload(id string, payload []byte) error
- type EventService
- type OrganizationService
- func (s OrganizationService) Create(ctx context.Context, opts otf.OrganizationCreateOptions) (*otf.Organization, error)
- func (s OrganizationService) Delete(name string) error
- func (s OrganizationService) Get(name string) (*otf.Organization, error)
- func (s OrganizationService) GetEntitlements(name string) (*otf.Entitlements, error)
- func (s OrganizationService) List(opts otf.OrganizationListOptions) (*otf.OrganizationList, error)
- func (s OrganizationService) Update(name string, opts *otf.OrganizationUpdateOptions) (*otf.Organization, error)
- type PlanService
- func (s PlanService) Finish(ctx context.Context, id string, opts otf.JobFinishOptions) (*otf.Run, error)
- func (s PlanService) Get(id string) (*otf.Plan, error)
- func (s PlanService) GetChunk(ctx context.Context, id string, opts otf.GetChunkOptions) ([]byte, error)
- func (s PlanService) GetPlanJSON(id string) ([]byte, error)
- func (s PlanService) PutChunk(ctx context.Context, id string, chunk []byte, opts otf.PutChunkOptions) error
- func (s PlanService) Start(ctx context.Context, id string, opts otf.JobStartOptions) (*otf.Run, error)
- type Queue
- type RunService
- func (s RunService) Apply(id string, opts otf.RunApplyOptions) error
- func (s RunService) Cancel(id string, opts otf.RunCancelOptions) error
- func (s RunService) Create(ctx context.Context, opts otf.RunCreateOptions) (*otf.Run, error)
- func (s RunService) Discard(id string, opts otf.RunDiscardOptions) error
- func (s RunService) EnqueuePlan(id string) error
- func (s RunService) Finish(id string, opts otf.JobFinishOptions) (otf.Job, error)
- func (s RunService) ForceCancel(id string, opts otf.RunForceCancelOptions) error
- func (s RunService) Get(id string) (*otf.Run, error)
- func (s RunService) GetLogs(ctx context.Context, id string) (io.Reader, error)
- func (s RunService) GetPlanFile(ctx context.Context, id string, opts otf.PlanFileOptions) ([]byte, error)
- func (s RunService) List(opts otf.RunListOptions) (*otf.RunList, error)
- func (s RunService) Start(id string, opts otf.JobStartOptions) (otf.Job, error)
- func (s RunService) UpdateStatus(id string, status otf.RunStatus) (*otf.Run, error)
- func (s RunService) UploadPlanFile(ctx context.Context, id string, plan []byte, opts otf.PlanFileOptions) error
- type StateVersionService
- func (s StateVersionService) Create(workspaceID string, opts otf.StateVersionCreateOptions) (*otf.StateVersion, error)
- func (s StateVersionService) Current(workspaceID string) (*otf.StateVersion, error)
- func (s StateVersionService) Download(id string) ([]byte, error)
- func (s StateVersionService) Get(id string) (*otf.StateVersion, error)
- func (s StateVersionService) List(opts otf.StateVersionListOptions) (*otf.StateVersionList, error)
- type WorkspaceService
- func (s WorkspaceService) Create(ctx context.Context, org string, opts otf.WorkspaceCreateOptions) (*otf.Workspace, error)
- func (s WorkspaceService) Delete(ctx context.Context, spec otf.WorkspaceSpecifier) error
- func (s WorkspaceService) Get(ctx context.Context, spec otf.WorkspaceSpecifier) (*otf.Workspace, error)
- func (s WorkspaceService) List(ctx context.Context, opts otf.WorkspaceListOptions) (*otf.WorkspaceList, error)
- func (s WorkspaceService) Lock(ctx context.Context, id string, opts otf.WorkspaceLockOptions) (*otf.Workspace, error)
- func (s WorkspaceService) Unlock(ctx context.Context, id string) (*otf.Workspace, error)
- func (s WorkspaceService) Update(ctx context.Context, spec otf.WorkspaceSpecifier, ...) (*otf.Workspace, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOrganization ¶
func NewOrganization(name, email string) *otf.Organization
func NewOrganizationList ¶
func NewOrganizationList(name, email string, opts otf.OrganizationListOptions) *otf.OrganizationList
func NewWorkspace ¶
func NewWorkspaceList ¶
func NewWorkspaceList(name, id, org string, opts otf.WorkspaceListOptions) *otf.WorkspaceList
Types ¶
type ConfigurationVersionService ¶
type ConfigurationVersionService struct {
CreateFn func(workspaceID string, opts otf.ConfigurationVersionCreateOptions) (*otf.ConfigurationVersion, error)
GetFn func(id string) (*otf.ConfigurationVersion, error)
GetLatestFn func(workspaceID string) (*otf.ConfigurationVersion, error)
ListFn func(workspaceID string, opts otf.ConfigurationVersionListOptions) (*otf.ConfigurationVersionList, error)
UploadFn func(id string, payload []byte) error
DownloadFn func(id string) ([]byte, error)
}
func (ConfigurationVersionService) Create ¶
func (s ConfigurationVersionService) Create(workspaceID string, opts otf.ConfigurationVersionCreateOptions) (*otf.ConfigurationVersion, error)
func (ConfigurationVersionService) Download ¶
func (s ConfigurationVersionService) Download(id string) ([]byte, error)
func (ConfigurationVersionService) Get ¶
func (s ConfigurationVersionService) Get(id string) (*otf.ConfigurationVersion, error)
func (ConfigurationVersionService) GetLatest ¶
func (s ConfigurationVersionService) GetLatest(workspaceID string) (*otf.ConfigurationVersion, error)
func (ConfigurationVersionService) List ¶
func (s ConfigurationVersionService) List(workspaceID string, opts otf.ConfigurationVersionListOptions) (*otf.ConfigurationVersionList, error)
type EventService ¶
type EventService struct {
PublishFn func(event otf.Event)
SubscribeFn func(id string) otf.Subscription
}
func (EventService) Publish ¶
func (s EventService) Publish(event otf.Event)
func (EventService) Subscribe ¶
func (s EventService) Subscribe(id string) (otf.Subscription, error)
type OrganizationService ¶
type OrganizationService struct {
CreateOrganizationFn func(opts otf.OrganizationCreateOptions) (*otf.Organization, error)
UpdateOrganizationFn func(name string, opts *otf.OrganizationUpdateOptions) (*otf.Organization, error)
GetOrganizationFn func(name string) (*otf.Organization, error)
ListOrganizationFn func(opts otf.OrganizationListOptions) (*otf.OrganizationList, error)
DeleteOrganizationFn func(name string) error
GetEntitlementsFn func(name string) (*otf.Entitlements, error)
}
func (OrganizationService) Create ¶
func (s OrganizationService) Create(ctx context.Context, opts otf.OrganizationCreateOptions) (*otf.Organization, error)
func (OrganizationService) Delete ¶
func (s OrganizationService) Delete(name string) error
func (OrganizationService) Get ¶
func (s OrganizationService) Get(name string) (*otf.Organization, error)
func (OrganizationService) GetEntitlements ¶
func (s OrganizationService) GetEntitlements(name string) (*otf.Entitlements, error)
func (OrganizationService) List ¶
func (s OrganizationService) List(opts otf.OrganizationListOptions) (*otf.OrganizationList, error)
func (OrganizationService) Update ¶
func (s OrganizationService) Update(name string, opts *otf.OrganizationUpdateOptions) (*otf.Organization, error)
type PlanService ¶
type PlanService struct {
GetFn func(id string) (*otf.Plan, error)
GetPlanJSONFn func(id string) ([]byte, error)
StartFn func(ctx context.Context, id string, opts otf.JobStartOptions) (*otf.Run, error)
FinishFn func(ctx context.Context, id string, opts otf.JobFinishOptions) (*otf.Run, error)
GetChunkFn func(ctx context.Context, id string, opts otf.GetChunkOptions) ([]byte, error)
PutChunkFn func(ctx context.Context, id string, chunk []byte, opts otf.PutChunkOptions) error
}
func (PlanService) Finish ¶ added in v0.0.8
func (s PlanService) Finish(ctx context.Context, id string, opts otf.JobFinishOptions) (*otf.Run, error)
func (PlanService) GetChunk ¶ added in v0.0.8
func (s PlanService) GetChunk(ctx context.Context, id string, opts otf.GetChunkOptions) ([]byte, error)
func (PlanService) GetPlanJSON ¶
func (s PlanService) GetPlanJSON(id string) ([]byte, error)
func (PlanService) PutChunk ¶ added in v0.0.8
func (s PlanService) PutChunk(ctx context.Context, id string, chunk []byte, opts otf.PutChunkOptions) error
type RunService ¶
type RunService struct {
CreateFn func(ctx context.Context, opts otf.RunCreateOptions) (*otf.Run, error)
GetFn func(id string) (*otf.Run, error)
ListFn func(opts otf.RunListOptions) (*otf.RunList, error)
ApplyFn func(id string, opts otf.RunApplyOptions) error
DiscardFn func(id string, opts otf.RunDiscardOptions) error
CancelFn func(id string, opts otf.RunCancelOptions) error
ForceCancelFn func(id string, opts otf.RunForceCancelOptions) error
EnqueuePlanFn func(id string) error
UpdateStatusFn func(id string, status otf.RunStatus) (*otf.Run, error)
StartFn func(id string, opts otf.JobStartOptions) (otf.Job, error)
FinishFn func(id string, opts otf.JobFinishOptions) (otf.Job, error)
GetPlanFileFn func(ctx context.Context, id string, opts otf.PlanFileOptions) ([]byte, error)
UploadPlanFileFn func(ctx context.Context, id string, plan []byte, opts otf.PlanFileOptions) error
GetLogsFn func(ctx context.Context, runID string) (io.Reader, error)
}
func (RunService) Apply ¶
func (s RunService) Apply(id string, opts otf.RunApplyOptions) error
func (RunService) Cancel ¶
func (s RunService) Cancel(id string, opts otf.RunCancelOptions) error
func (RunService) Create ¶
func (s RunService) Create(ctx context.Context, opts otf.RunCreateOptions) (*otf.Run, error)
func (RunService) Discard ¶
func (s RunService) Discard(id string, opts otf.RunDiscardOptions) error
func (RunService) EnqueuePlan ¶
func (s RunService) EnqueuePlan(id string) error
func (RunService) Finish ¶
func (s RunService) Finish(id string, opts otf.JobFinishOptions) (otf.Job, error)
func (RunService) ForceCancel ¶
func (s RunService) ForceCancel(id string, opts otf.RunForceCancelOptions) error
func (RunService) GetPlanFile ¶
func (s RunService) GetPlanFile(ctx context.Context, id string, opts otf.PlanFileOptions) ([]byte, error)
func (RunService) List ¶
func (s RunService) List(opts otf.RunListOptions) (*otf.RunList, error)
func (RunService) Start ¶
func (s RunService) Start(id string, opts otf.JobStartOptions) (otf.Job, error)
func (RunService) UpdateStatus ¶
func (RunService) UploadPlanFile ¶ added in v0.0.8
func (s RunService) UploadPlanFile(ctx context.Context, id string, plan []byte, opts otf.PlanFileOptions) error
type StateVersionService ¶
type StateVersionService struct {
CreateFn func(workspaceID string, opts otf.StateVersionCreateOptions) (*otf.StateVersion, error)
CurrentFn func(workspaceID string) (*otf.StateVersion, error)
GetFn func(id string) (*otf.StateVersion, error)
DownloadFn func(id string) ([]byte, error)
ListFn func(opts otf.StateVersionListOptions) (*otf.StateVersionList, error)
}
func (StateVersionService) Create ¶
func (s StateVersionService) Create(workspaceID string, opts otf.StateVersionCreateOptions) (*otf.StateVersion, error)
func (StateVersionService) Current ¶
func (s StateVersionService) Current(workspaceID string) (*otf.StateVersion, error)
func (StateVersionService) Download ¶
func (s StateVersionService) Download(id string) ([]byte, error)
func (StateVersionService) Get ¶
func (s StateVersionService) Get(id string) (*otf.StateVersion, error)
func (StateVersionService) List ¶
func (s StateVersionService) List(opts otf.StateVersionListOptions) (*otf.StateVersionList, error)
type WorkspaceService ¶
type WorkspaceService struct {
CreateWorkspaceFn func(org string, opts otf.WorkspaceCreateOptions) (*otf.Workspace, error)
UpdateWorkspaceFn func(spec otf.WorkspaceSpecifier, opts otf.WorkspaceUpdateOptions) (*otf.Workspace, error)
GetWorkspaceFn func(spec otf.WorkspaceSpecifier) (*otf.Workspace, error)
ListWorkspaceFn func(opts otf.WorkspaceListOptions) (*otf.WorkspaceList, error)
DeleteWorkspaceFn func(spec otf.WorkspaceSpecifier) error
LockWorkspaceFn func(id string, opts otf.WorkspaceLockOptions) (*otf.Workspace, error)
UnlockWorkspaceFn func(id string) (*otf.Workspace, error)
}
func (WorkspaceService) Create ¶
func (s WorkspaceService) Create(ctx context.Context, org string, opts otf.WorkspaceCreateOptions) (*otf.Workspace, error)
func (WorkspaceService) Delete ¶
func (s WorkspaceService) Delete(ctx context.Context, spec otf.WorkspaceSpecifier) error
func (WorkspaceService) Get ¶
func (s WorkspaceService) Get(ctx context.Context, spec otf.WorkspaceSpecifier) (*otf.Workspace, error)
func (WorkspaceService) List ¶
func (s WorkspaceService) List(ctx context.Context, opts otf.WorkspaceListOptions) (*otf.WorkspaceList, error)
func (WorkspaceService) Lock ¶
func (s WorkspaceService) Lock(ctx context.Context, id string, opts otf.WorkspaceLockOptions) (*otf.Workspace, error)
func (WorkspaceService) Update ¶
func (s WorkspaceService) Update(ctx context.Context, spec otf.WorkspaceSpecifier, opts otf.WorkspaceUpdateOptions) (*otf.Workspace, error)
Click to show internal directories.
Click to hide internal directories.