Documentation ¶
Index ¶
- func IsNil(i interface{}) bool
- func List(client newclient.Client, spaceID string, projectID string, filter string, ...) (*resources.Resources[*Runbook], error)
- func ListEnvironments(client newclient.Client, spaceID string, projectID string, runbookID string) ([]*environments.Environment, error)
- func ListSnapshots(client newclient.Client, spaceID string, projectID string, runbookID string, ...) (*resources.Resources[*RunbookSnapshot], error)
- type RunPreview
- type Runbook
- type RunbookProcess
- type RunbookProcessService
- type RunbookProcessesQuery
- type RunbookRetentionPeriod
- type RunbookRunCommandV1
- type RunbookRunResponseV1
- type RunbookRunServerTask
- type RunbookRunService
- type RunbookRunsQuery
- type RunbookService
- func (s *RunbookService) Add(runbook *Runbook) (*Runbook, error)
- func (s *RunbookService) GetAll() ([]*Runbook, error)
- func (s *RunbookService) GetByID(id string) (*Runbook, error)
- func (s *RunbookService) GetRunbookSnapshotTemplate(runbook *Runbook) (*RunbookSnapshotTemplate, error)
- func (s *RunbookService) Update(runbook *Runbook) (*Runbook, error)
- type RunbookSnapshot
- type RunbookSnapshotService
- type RunbookSnapshotTemplate
- type RunbookSnapshotUsage
- type RunbookSnapshotUsageEntry
- type RunbookSnapshotsQuery
- type RunbookStepUsage
- type RunbooksQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶ added in v2.6.1
func List(client newclient.Client, spaceID string, projectID string, filter string, limit int) (*resources.Resources[*Runbook], error)
List returns a list of runbooks from the server, in a standard Octopus paginated result structure. If you don't specify --limit the server will use a default limit (typically 30)
func ListEnvironments ¶ added in v2.6.1
func ListEnvironments(client newclient.Client, spaceID string, projectID string, runbookID string) ([]*environments.Environment, error)
ListEnvironments returns the list of valid environments for a given runbook
func ListSnapshots ¶ added in v2.6.1
func ListSnapshots(client newclient.Client, spaceID string, projectID string, runbookID string, limit int) (*resources.Resources[*RunbookSnapshot], error)
ListSnapshots returns a list of runbook snapshots from the server, in a standard Octopus paginated result structure. If you don't specify --limit the server will use a default limit (typically 30)
Types ¶
type RunPreview ¶ added in v2.6.1
type RunPreview struct { StepsToExecute []*deployments.DeploymentTemplateStep `json:"StepsToExecute,omitempty"` UseGuidedFailureModeByDefault bool `json:"UseGuidedFailureModeByDefault"` }
func GetRunbookSnapshotRunPreview ¶ added in v2.6.1
func GetRunbookSnapshotRunPreview(client newclient.Client, spaceID string, snapshotID string, environmentID string, includeDisabledSteps bool) (*RunPreview, error)
GetRunbookSnapshotRunPreview gets a preview of a snapshot run for a given environment. This is used by the portal to show which machines would be deployed to, and other information about the deployment, before proceeding with it. The CLI uses it to build the selector for picking specific machines to deploy to
type Runbook ¶
type Runbook struct { ConnectivityPolicy *core.ConnectivityPolicy `json:"ConnectivityPolicy,omitempty"` DefaultGuidedFailureMode string `json:"DefaultGuidedFailureMode" validate:"required,oneof=EnvironmentDefault Off On"` Description string `json:"Description,omitempty"` EnvironmentScope string `json:"EnvironmentScope" validate:"required,oneof=All FromProjectLifecycles Specified"` Environments []string `json:"Environments,omitempty"` MultiTenancyMode core.TenantedDeploymentMode `json:"MultiTenancyMode" validate:"required,oneof=Untenanted TenantedOrUntenanted Tenanted"` Name string `json:"Name,omitempty"` ProjectID string `json:"ProjectId,omitempty"` PublishedRunbookSnapshotID string `json:"PublishedRunbookSnapshotId,omitempty"` RunRetentionPolicy *RunbookRetentionPeriod `json:"RunRetentionPolicy,omitempty"` RunbookProcessID string `json:"RunbookProcessId,omitempty"` SpaceID string `json:"SpaceId,omitempty"` ForcePackageDownload bool `json:"ForcePackageDownload"` resources.Resource }
func GetByName ¶ added in v2.6.1
func GetByName(client newclient.Client, spaceID string, projectID string, name string) (*Runbook, error)
GetByName searches for a single runbook with name of 'name'. If no such runbook can be found, will return nil, nil
func NewRunbook ¶
NewRunbook creates and initializes a runbook.
type RunbookProcess ¶
type RunbookProcess struct { LastSnapshotID string `json:"LastSnapshotId,omitempty"` ProjectID string `json:"ProjectId,omitempty"` RunbookID string `json:"RunbookId,omitempty"` SpaceID string `json:"SpaceId,omitempty"` Steps []*deployments.DeploymentStep `json:"Steps"` Version *int32 `json:"Version"` resources.Resource }
func GetProcess ¶ added in v2.6.1
func GetProcess(client newclient.Client, spaceID string, projectID string, ID string) (*RunbookProcess, error)
GetProcess fetches a runbook process. This may either be the project level process (template), or a snapshot, depending on the value of ID
func NewRunbookProcess ¶
func NewRunbookProcess() *RunbookProcess
type RunbookProcessService ¶
func NewRunbookProcessService ¶
func NewRunbookProcessService(sling *sling.Sling, uriTemplate string) *RunbookProcessService
func (*RunbookProcessService) GetByID ¶
func (s *RunbookProcessService) GetByID(id string) (*RunbookProcess, error)
GetByID returns the runbook process that matches the input ID. If one cannot be found, it returns nil and an error.
func (*RunbookProcessService) Update ¶ added in v2.24.0
func (s *RunbookProcessService) Update(runbook *RunbookProcess) (*RunbookProcess, error)
Update modifies a runbook process based on the one provided as input.
type RunbookProcessesQuery ¶
type RunbookRetentionPeriod ¶
type RunbookRetentionPeriod struct { QuantityToKeep int32 `json:"QuantityToKeep"` ShouldKeepForever bool `json:"ShouldKeepForever"` }
func NewRunbookRetentionPeriod ¶
func NewRunbookRetentionPeriod() *RunbookRetentionPeriod
type RunbookRunCommandV1 ¶ added in v2.4.0
type RunbookRunCommandV1 struct { RunbookName string `json:"runbookName"` // required EnvironmentNames []string `json:"environmentNames,omitempty"` Tenants []string `json:"tenants,omitempty"` TenantTags []string `json:"tenantTags,omitempty"` Snapshot string `json:"snapshot,omitempty"` deployments.CreateExecutionAbstractCommandV1 }
func NewRunbookRunCommandV1 ¶ added in v2.4.0
func NewRunbookRunCommandV1(spaceID string, projectIDOrName string) *RunbookRunCommandV1
func (*RunbookRunCommandV1) MarshalJSON ¶ added in v2.4.0
func (r *RunbookRunCommandV1) MarshalJSON() ([]byte, error)
MarshalJSON adds the redundant 'spaceIdOrName' parameter which is required by the server
type RunbookRunResponseV1 ¶ added in v2.4.0
type RunbookRunResponseV1 struct {
RunbookRunServerTasks []*RunbookRunServerTask `json:"RunbookRunServerTasks,omitempty"`
}
func RunbookRunV1 ¶ added in v2.4.0
func RunbookRunV1(client newclient.Client, command *RunbookRunCommandV1) (*RunbookRunResponseV1, error)
type RunbookRunServerTask ¶ added in v2.6.1
type RunbookRunService ¶
type RunbookRunService struct {
services.CanDeleteService
}
func NewRunbookRunService ¶
func NewRunbookRunService(sling *sling.Sling, uriTemplate string) *RunbookRunService
type RunbookRunsQuery ¶
type RunbookRunsQuery struct { Environments []string `uri:"environments,omitempty" url:"environments,omitempty"` IDs []string `uri:"ids,omitempty" url:"ids,omitempty"` PartialName string `uri:"partialName,omitempty" url:"partialName,omitempty"` Projects []string `uri:"projects,omitempty" url:"projects,omitempty"` Runbooks []string `uri:"runbooks,omitempty" url:"runbooks,omitempty"` Skip int `uri:"skip,omitempty" url:"skip,omitempty"` Take int `uri:"take,omitempty" url:"take,omitempty"` TaskState string `uri:"taskState,omitempty" url:"taskState,omitempty"` Tenants []string `uri:"tenants,omitempty" url:"tenants,omitempty"` }
type RunbookService ¶
type RunbookService struct {
services.CanDeleteService
}
func NewRunbookService ¶
func NewRunbookService(sling *sling.Sling, uriTemplate string) *RunbookService
func (*RunbookService) Add ¶
func (s *RunbookService) Add(runbook *Runbook) (*Runbook, error)
Add returns the runbook that matches the input ID.
func (*RunbookService) GetAll ¶
func (s *RunbookService) GetAll() ([]*Runbook, error)
GetAll returns all runbooks. If none can be found or an error occurs, it returns an empty collection.
func (*RunbookService) GetByID ¶
func (s *RunbookService) GetByID(id string) (*Runbook, error)
GetByID returns the runbook that matches the input ID. If one cannot be found, it returns nil and an error.
func (*RunbookService) GetRunbookSnapshotTemplate ¶
func (s *RunbookService) GetRunbookSnapshotTemplate(runbook *Runbook) (*RunbookSnapshotTemplate, error)
type RunbookSnapshot ¶
type RunbookSnapshot struct { Assembled *time.Time `json:"Assembled,omitempty"` FrozenProjectVariableSetID string `json:"FrozenProjectVariableSetId,omitempty"` FrozenRunbookProcessID string `json:"FrozenRunbookProcessId,omitempty"` LibraryVariableSetSnapshotIDs []string `json:"LibraryVariableSetSnapshotIds"` Name string `json:"Name,omitempty"` Notes string `json:"Notes,omitempty"` ProjectID string `json:"ProjectId" validate:"required,notblank"` ProjectVariableSetSnapshotID string `json:"ProjectVariableSetSnapshotId,omitempty"` RunbookID string `json:"RunbookId" validate:"required,notblank"` SelectedPackages []*packages.SelectedPackage `json:"SelectedPackages"` SpaceID string `json:"SpaceId,omitempty"` resources.Resource }
RunbookSnapshot represents a runbook snapshot.
func GetSnapshot ¶ added in v2.6.1
func GetSnapshot(client newclient.Client, spaceID string, projectID string, snapshotIDorName string) (*RunbookSnapshot, error)
GetSnapshot loads a single runbook snapshot. You can supply either a name "Snapshot FWKMLUX" or an ID "RunbookSnapshots-41" for snapshotIDorName
func NewRunbookSnapshot ¶
func NewRunbookSnapshot(name string, projectID string, runbookID string) *RunbookSnapshot
NewRunbookSnapshot creates and initializes a runbook snapshot.
func (RunbookSnapshot) Validate ¶
func (c RunbookSnapshot) Validate() error
Validate checks the state of the runbook snapshot and returns an error if invalid.
type RunbookSnapshotService ¶
type RunbookSnapshotService struct {
services.CanDeleteService
}
func NewRunbookSnapshotService ¶
func NewRunbookSnapshotService(sling *sling.Sling, uriTemplate string) *RunbookSnapshotService
func (*RunbookSnapshotService) Add ¶
func (s *RunbookSnapshotService) Add(runbookSnapshot *RunbookSnapshot) (*RunbookSnapshot, error)
Add creates a new runbook snapshot.
func (*RunbookSnapshotService) GetByID ¶
func (s *RunbookSnapshotService) GetByID(id string) (*RunbookSnapshot, error)
GetByID returns the release that matches the input ID. If one cannot be found, it returns nil and an error.
type RunbookSnapshotTemplate ¶
type RunbookSnapshotUsage ¶
type RunbookSnapshotUsage struct { ProjectID string `json:"ProjectId,omitempty"` ProjectName string `json:"ProjectName,omitempty"` RunbookID string `json:"RunbookId,omitempty"` RunbookName string `json:"RunbookName,omitempty"` Snapshots []*RunbookSnapshotUsageEntry `json:"Snapshots"` }
type RunbookSnapshotsQuery ¶
type RunbookStepUsage ¶
type RunbookStepUsage struct { ProcessID string `json:"ProcessId,omitempty"` ProjectID string `json:"ProjectId,omitempty"` ProjectName string `json:"ProjectName,omitempty"` ProjectSlug string `json:"ProjectSlug,omitempty"` RunbookID string `json:"RunbookId,omitempty"` RunbookName string `json:"RunbookName,omitempty"` Steps []*deployments.StepUsageEntry `json:"Steps"` }
type RunbooksQuery ¶
type RunbooksQuery struct { IDs []string `uri:"ids,omitempty" url:"ids,omitempty"` IsClone bool `uri:"clone,omitempty" url:"clone,omitempty"` PartialName string `uri:"partialName,omitempty" url:"partialName,omitempty"` ProjectIDs []string `uri:"projectIds,omitempty" url:"projectIds,omitempty"` Skip int `uri:"skip,omitempty" url:"skip,omitempty"` Take int `uri:"take,omitempty" url:"take,omitempty"` }
Source Files ¶
- is_nil.go
- run_preview.go
- run_runbook_v1.go
- runbook.go
- runbook_process.go
- runbook_process_service.go
- runbook_processes_query.go
- runbook_retention_period.go
- runbook_run_service.go
- runbook_runs_query.go
- runbook_service.go
- runbook_snapshot.go
- runbook_snapshot_query.go
- runbook_snapshot_service.go
- runbook_snapshot_template.go
- runbook_snapshot_usage.go
- runbook_snapshot_usage_entry.go
- runbook_step_usage.go
- runbooks_query.go