runbooks

package
v2.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 13 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

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           string                   `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"`

	resources.Resource
}

func NewRunbook

func NewRunbook(name string, projectID string) *Runbook

NewRunbook creates and initializes a runbook.

func (*Runbook) Validate

func (r *Runbook) Validate() error

Validate checks the state of the runbook and returns an error if invalid.

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 NewRunbookProcess

func NewRunbookProcess() *RunbookProcess

type RunbookProcessService

type RunbookProcessService struct {
	services.Service
}

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.

type RunbookProcessesQuery

type RunbookProcessesQuery struct {
	IDs  []string `uri:"ids,omitempty" url:"ids,omitempty"`
	Skip int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take int      `uri:"take,omitempty" url:"take,omitempty"`
}

type RunbookRetentionPeriod

type RunbookRetentionPeriod struct {
	QuantityToKeep    int32 `json:"QuantityToKeep"`
	ShouldKeepForever bool  `json:"ShouldKeepForever"`
}

func NewRunbookRetentionPeriod

func NewRunbookRetentionPeriod() *RunbookRetentionPeriod

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)

func (*RunbookService) Update

func (s *RunbookService) Update(runbook *Runbook) (*Runbook, error)

Update modifies a runbook based on the one provided as input.

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 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

GetByID returns the release that matches the input ID. If one cannot be found, it returns nil and an error.

type RunbookSnapshotTemplate

type RunbookSnapshotTemplate struct {
	NextNameIncrement string                             `json:"NextNameIncrement,omitempty"`
	Packages          []*releases.ReleaseTemplatePackage `json:"Packages"`
	RunbookID         string                             `json:"RunbookId,omitempty"`
	RunbookProcessID  string                             `json:"RunbookProcessId,omitempty"`

	resources.Resource
}

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 RunbookSnapshotUsageEntry

type RunbookSnapshotUsageEntry struct {
	SnapshotID   string `json:"SnapshotId,omitempty"`
	SnapshotName string `json:"SnapshotName,omitempty"`
}

type RunbookSnapshotsQuery

type RunbookSnapshotsQuery struct {
	IDs     []string `uri:"ids,omitempty" url:"ids,omitempty"`
	Publish bool     `uri:"publish,omitempty" url:"publish,omitempty"`
	Skip    int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take    int      `uri:"take,omitempty" url:"take,omitempty"`
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL