lifecycles

package
v2.41.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func DeleteByID added in v2.33.0

func DeleteByID(client newclient.Client, spaceID string, ID string) error

func Get added in v2.33.0

func Get(client newclient.Client, spaceID string, 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 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 Add added in v2.33.0

func Add(client newclient.Client, lifecycle *Lifecycle) (*Lifecycle, error)

Add creates a new lifecycle.

func GetAll added in v2.34.0

func GetAll(client newclient.Client, spaceID string) ([]*Lifecycle, error)

GetAll returns all lifecycles. If an error occurs, it returns nil.

func GetByID added in v2.33.0

func GetByID(client newclient.Client, spaceID string, 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 NewLifecycle

func NewLifecycle(name string) *Lifecycle

func Update added in v2.33.0

func Update(client newclient.Client, lifecycle *Lifecycle) (*Lifecycle, error)

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

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 deprecated

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

Add creates a new lifecycle.

Deprecated: use lifecycles.Add

func (*LifecycleService) Get deprecated

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.

Deprecated: use lifecycles.Get

func (*LifecycleService) GetAll deprecated

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

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

Deprecated: use lifecycles.GetAll

func (*LifecycleService) GetByID deprecated

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.

Deprecated: use lifecycles.GetByID

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 deprecated

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

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

Deprecated: use lifecycles.Update

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