environments

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 7 modules, 24 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

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type Environment

type Environment struct {
	AllowDynamicInfrastructure bool   `json:"AllowDynamicInfrastructure"`
	Description                string `json:"Description,omitempty"`
	Name                       string `json:"Name" validate:"required"`
	SortOrder                  int    `json:"SortOrder"`
	UseGuidedFailure           bool   `json:"UseGuidedFailure"`

	resources.Resource
}

func NewEnvironment

func NewEnvironment(name string) *Environment

func (*Environment) Validate

func (e *Environment) Validate() error

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

type EnvironmentService

type EnvironmentService struct {
	services.CanDeleteService
	// contains filtered or unexported fields
}

func NewEnvironmentService

func NewEnvironmentService(sling *sling.Sling, uriTemplate string, sortOrderPath string, summaryPath string) *EnvironmentService

NewEnvironmentService returns an EnvironmentService with a preconfigured client.

func (*EnvironmentService) Add

func (s *EnvironmentService) Add(environment *Environment) (*Environment, error)

Add creates a new environment.

func (*EnvironmentService) Get

func (s *EnvironmentService) Get(environmentsQuery EnvironmentsQuery) (*Environments, error)

Get returns a collection of environments 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 (*EnvironmentService) GetAll

func (s *EnvironmentService) GetAll() ([]*Environment, error)

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

func (*EnvironmentService) GetByID

func (s *EnvironmentService) GetByID(id string) (*Environment, error)

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

func (*EnvironmentService) GetByIDs

func (s *EnvironmentService) GetByIDs(ids []string) ([]*Environment, error)

GetByIDs returns the environments that match the input IDs.

func (*EnvironmentService) GetByName

func (s *EnvironmentService) GetByName(name string) ([]*Environment, error)

GetByName returns the environments with a matching partial name.

func (*EnvironmentService) GetByPartialName

func (s *EnvironmentService) GetByPartialName(partialName string) ([]*Environment, error)

GetByPartialName performs a lookup and returns enironments with a matching partial name.

func (*EnvironmentService) Update

func (s *EnvironmentService) Update(environment *Environment) (*Environment, error)

Update modifies an environment based on the one provided as input.

type Environments

type Environments struct {
	Items []*Environment `json:"Items"`
	resources.PagedResults
}

type EnvironmentsQuery

type EnvironmentsQuery struct {
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	Name        string   `uri:"name,omitempty" url:"name,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"`
}

type EnvironmentsSummaryQuery

type EnvironmentsSummaryQuery struct {
	CommunicationStyles   []string `uri:"commStyles,omitempty" url:"commStyles,omitempty"`
	HealthStatuses        []string `uri:"healthStatuses,omitempty" url:"healthStatuses,omitempty"`
	HideEmptyEnvironments bool     `uri:"hideEmptyEnvironments,omitempty" url:"hideEmptyEnvironments,omitempty"`
	IDs                   []string `uri:"ids,omitempty" url:"ids,omitempty"`
	IsDisabled            bool     `uri:"isDisabled,omitempty" url:"isDisabled,omitempty"`
	MachinePartialName    string   `uri:"machinePartialName,omitempty" url:"machinePartialName,omitempty"`
	PartialName           string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Roles                 []string `uri:"roles,omitempty" url:"roles,omitempty"`
	ShellNames            []string `uri:"shellNames,omitempty" url:"shellNames,omitempty"`
	TenantIDs             []string `uri:"tenantIds,omitempty" url:"tenantIds,omitempty"`
	TenantTags            []string `uri:"tenantTags,omitempty" url:"tenantTags,omitempty"`
}

Jump to

Keyboard shortcuts

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