lifecycles

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	RetentionUnitDays  string = "Days"
	RetentionUnitItems string = "Items"
)

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type Lifecycle

type Lifecycle struct {
	Description             string                `json:"Description,omitempty"`
	Name                    string                `json:"Name" validate:"required"`
	Phases                  []*Phase              `json:"Phases,omitempty"`
	ReleaseRetentionPolicy  *core.RetentionPeriod `json:"ReleaseRetentionPolicy,omitempty"`
	SpaceID                 string                `json:"SpaceId,omitempty"`
	TentacleRetentionPolicy *core.RetentionPeriod `json:"TentacleRetentionPolicy,omitempty"`

	resources.Resource
}

func NewLifecycle

func NewLifecycle(name string) *Lifecycle

func (*Lifecycle) Validate

func (l *Lifecycle) Validate() error

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

type LifecycleService

type LifecycleService struct {
	services.CanDeleteService
}

func NewLifecycleService

func NewLifecycleService(sling *sling.Sling, uriTemplate string) *LifecycleService

func (*LifecycleService) Add

func (s *LifecycleService) Add(lifecycle *Lifecycle) (*Lifecycle, error)

Add creates a new lifecycle.

func (*LifecycleService) Get

func (s *LifecycleService) Get(lifecyclesQuery Query) (*resources.Resources[*Lifecycle], error)

Get returns a collection of lifecycles based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

func (*LifecycleService) GetAll

func (s *LifecycleService) GetAll() ([]*Lifecycle, error)

GetAll returns all lifecycles. If none can be found or an error occurs, it returns an empty collection.

func (*LifecycleService) GetByID

func (s *LifecycleService) GetByID(id string) (*Lifecycle, error)

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

func (*LifecycleService) GetByIDOrName added in v2.8.0

func (s *LifecycleService) GetByIDOrName(idOrName string) (*Lifecycle, error)

func (*LifecycleService) GetByName added in v2.8.0

func (s *LifecycleService) GetByName(name string) (*Lifecycle, error)

func (*LifecycleService) GetByPartialName

func (s *LifecycleService) GetByPartialName(partialName string) ([]*Lifecycle, error)

GetByPartialName performs a lookup and returns a collection of lifecycles with a matching partial name.

func (*LifecycleService) GetProjects

func (s *LifecycleService) GetProjects(lifecycle *Lifecycle) ([]*projects.Project, error)

func (*LifecycleService) Update

func (s *LifecycleService) Update(lifecycle *Lifecycle) (*Lifecycle, error)

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

type Phase

type Phase struct {
	AutomaticDeploymentTargets         []string              `json:"AutomaticDeploymentTargets"`
	ID                                 string                `json:"Id,omitempty"`
	IsOptionalPhase                    bool                  `json:"IsOptionalPhase"`
	MinimumEnvironmentsBeforePromotion int32                 `json:"MinimumEnvironmentsBeforePromotion"`
	Name                               string                `json:"Name" validate:"required"`
	OptionalDeploymentTargets          []string              `json:"OptionalDeploymentTargets"`
	ReleaseRetentionPolicy             *core.RetentionPeriod `json:"ReleaseRetentionPolicy"`
	TentacleRetentionPolicy            *core.RetentionPeriod `json:"TentacleRetentionPolicy"`
}

func NewPhase added in v2.11.0

func NewPhase(name string) *Phase

type Query

type Query struct {
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	PartialName string   `uri:"partialName,omitempty" url:"partialName,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