lifecycles

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 5 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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