Documentation
¶
Overview ¶
Package mock implements mocked services.
Index ¶
- func NewOrganization(name, email string) *otf.Organization
- func NewOrganizationList(name, email string, opts tfe.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 *tfe.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 tfe.ConfigurationVersionListOptions) (*otf.ConfigurationVersionList, error)
- func (s ConfigurationVersionService) Upload(id string, payload []byte) error
- type EventService
- type OrganizationService
- func (s OrganizationService) Create(opts *tfe.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 tfe.OrganizationListOptions) (*otf.OrganizationList, error)
- func (s OrganizationService) Update(name string, opts *tfe.OrganizationUpdateOptions) (*otf.Organization, error)
- type PlanService
- type Queue
- type RunService
- func (s RunService) Apply(id string, opts *tfe.RunApplyOptions) error
- func (s RunService) Cancel(id string, opts *tfe.RunCancelOptions) error
- func (s RunService) Create(opts *tfe.RunCreateOptions) (*otf.Run, error)
- func (s RunService) Discard(id string, opts *tfe.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 *tfe.RunForceCancelOptions) error
- func (s RunService) Get(id string) (*otf.Run, error)
- func (s RunService) GetApplyLogs(id string, opts otf.GetChunkOptions) ([]byte, error)
- func (s RunService) GetPlanFile(id string) ([]byte, error)
- func (s RunService) GetPlanJSON(id string) ([]byte, error)
- func (s RunService) GetPlanLogs(id string, opts otf.GetChunkOptions) ([]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 tfe.RunStatus) (*otf.Run, error)
- func (s RunService) UploadLogs(id string, logs []byte, opts otf.PutChunkOptions) error
- func (s RunService) UploadPlan(id string, plan []byte, json bool) error
- type StateVersionService
- func (s StateVersionService) Create(workspaceID string, opts tfe.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 tfe.StateVersionListOptions) (*otf.StateVersionList, error)
- type WorkspaceService
- func (s WorkspaceService) Create(org string, opts *tfe.WorkspaceCreateOptions) (*otf.Workspace, error)
- func (s WorkspaceService) Delete(spec otf.WorkspaceSpecifier) error
- func (s WorkspaceService) Get(spec otf.WorkspaceSpecifier) (*otf.Workspace, error)
- func (s WorkspaceService) List(opts otf.WorkspaceListOptions) (*otf.WorkspaceList, error)
- func (s WorkspaceService) Lock(id string, opts tfe.WorkspaceLockOptions) (*otf.Workspace, error)
- func (s WorkspaceService) Unlock(id string) (*otf.Workspace, error)
- func (s WorkspaceService) Update(spec otf.WorkspaceSpecifier, opts *tfe.WorkspaceUpdateOptions) (*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 tfe.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 *tfe.ConfigurationVersionCreateOptions) (*otf.ConfigurationVersion, error)
GetFn func(id string) (*otf.ConfigurationVersion, error)
GetLatestFn func(workspaceID string) (*otf.ConfigurationVersion, error)
ListFn func(workspaceID string, opts tfe.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 *tfe.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 tfe.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
type OrganizationService ¶
type OrganizationService struct {
CreateOrganizationFn func(opts *tfe.OrganizationCreateOptions) (*otf.Organization, error)
UpdateOrganizationFn func(name string, opts *tfe.OrganizationUpdateOptions) (*otf.Organization, error)
GetOrganizationFn func(name string) (*otf.Organization, error)
ListOrganizationFn func(opts tfe.OrganizationListOptions) (*otf.OrganizationList, error)
DeleteOrganizationFn func(name string) error
GetEntitlementsFn func(name string) (*otf.Entitlements, error)
}
func (OrganizationService) Create ¶
func (s OrganizationService) Create(opts *tfe.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 tfe.OrganizationListOptions) (*otf.OrganizationList, error)
func (OrganizationService) Update ¶
func (s OrganizationService) Update(name string, opts *tfe.OrganizationUpdateOptions) (*otf.Organization, error)
type PlanService ¶
type PlanService struct {
GetFn func(id string) (*otf.Plan, error)
GetPlanJSONFn func(id string) ([]byte, error)
}
func (PlanService) GetPlanJSON ¶
func (s PlanService) GetPlanJSON(id string) ([]byte, error)
type RunService ¶
type RunService struct {
CreateFn func(opts *tfe.RunCreateOptions) (*otf.Run, error)
GetFn func(id string) (*otf.Run, error)
ListFn func(opts otf.RunListOptions) (*otf.RunList, error)
ApplyFn func(id string, opts *tfe.RunApplyOptions) error
DiscardFn func(id string, opts *tfe.RunDiscardOptions) error
CancelFn func(id string, opts *tfe.RunCancelOptions) error
ForceCancelFn func(id string, opts *tfe.RunForceCancelOptions) error
GetPlanLogsFn func(id string, opts otf.GetChunkOptions) ([]byte, error)
GetApplyLogsFn func(id string, opts otf.GetChunkOptions) ([]byte, error)
EnqueuePlanFn func(id string) error
UpdateStatusFn func(id string, status tfe.RunStatus) (*otf.Run, error)
UploadLogsFn func(id string, logs []byte, opts otf.PutChunkOptions) error
StartFn func(id string, opts otf.JobStartOptions) (otf.Job, error)
FinishFn func(id string, opts otf.JobFinishOptions) (otf.Job, error)
GetPlanJSONFn func(id string) ([]byte, error)
GetPlanFileFn func(id string) ([]byte, error)
UploadPlanFn func(id string, plan []byte, json bool) error
}
func (RunService) Apply ¶
func (s RunService) Apply(id string, opts *tfe.RunApplyOptions) error
func (RunService) Cancel ¶
func (s RunService) Cancel(id string, opts *tfe.RunCancelOptions) error
func (RunService) Create ¶
func (s RunService) Create(opts *tfe.RunCreateOptions) (*otf.Run, error)
func (RunService) Discard ¶
func (s RunService) Discard(id string, opts *tfe.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 *tfe.RunForceCancelOptions) error
func (RunService) GetApplyLogs ¶
func (s RunService) GetApplyLogs(id string, opts otf.GetChunkOptions) ([]byte, error)
func (RunService) GetPlanFile ¶
func (s RunService) GetPlanFile(id string) ([]byte, error)
func (RunService) GetPlanJSON ¶
func (s RunService) GetPlanJSON(id string) ([]byte, error)
func (RunService) GetPlanLogs ¶
func (s RunService) GetPlanLogs(id string, opts otf.GetChunkOptions) ([]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) UploadLogs ¶
func (s RunService) UploadLogs(id string, logs []byte, opts otf.PutChunkOptions) error
func (RunService) UploadPlan ¶
func (s RunService) UploadPlan(id string, plan []byte, json bool) error
type StateVersionService ¶
type StateVersionService struct {
CreateFn func(workspaceID string, opts tfe.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 tfe.StateVersionListOptions) (*otf.StateVersionList, error)
}
func (StateVersionService) Create ¶
func (s StateVersionService) Create(workspaceID string, opts tfe.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 tfe.StateVersionListOptions) (*otf.StateVersionList, error)
type WorkspaceService ¶
type WorkspaceService struct {
CreateWorkspaceFn func(org string, opts *tfe.WorkspaceCreateOptions) (*otf.Workspace, error)
UpdateWorkspaceFn func(spec otf.WorkspaceSpecifier, opts *tfe.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 tfe.WorkspaceLockOptions) (*otf.Workspace, error)
UnlockWorkspaceFn func(id string) (*otf.Workspace, error)
}
func (WorkspaceService) Create ¶
func (s WorkspaceService) Create(org string, opts *tfe.WorkspaceCreateOptions) (*otf.Workspace, error)
func (WorkspaceService) Delete ¶
func (s WorkspaceService) Delete(spec otf.WorkspaceSpecifier) error
func (WorkspaceService) Get ¶
func (s WorkspaceService) Get(spec otf.WorkspaceSpecifier) (*otf.Workspace, error)
func (WorkspaceService) List ¶
func (s WorkspaceService) List(opts otf.WorkspaceListOptions) (*otf.WorkspaceList, error)
func (WorkspaceService) Lock ¶
func (s WorkspaceService) Lock(id string, opts tfe.WorkspaceLockOptions) (*otf.Workspace, error)
func (WorkspaceService) Unlock ¶
func (s WorkspaceService) Unlock(id string) (*otf.Workspace, error)
func (WorkspaceService) Update ¶
func (s WorkspaceService) Update(spec otf.WorkspaceSpecifier, opts *tfe.WorkspaceUpdateOptions) (*otf.Workspace, error)
Click to show internal directories.
Click to hide internal directories.