tenants

package
v2.30.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type Tenant

type Tenant struct {
	ClonedFromTenantID  string              `json:"ClonedFromTenantId"`
	Description         string              `json:"Description"`
	Name                string              `json:"Name" validate:"required"`
	ProjectEnvironments map[string][]string `json:"ProjectEnvironments,omitempty"`
	SpaceID             string              `json:"SpaceId"`
	TenantTags          []string            `json:"TenantTags,omitempty"`

	resources.Resource
}

func NewTenant

func NewTenant(name string) *Tenant

NewTenant initializes a Tenant with a name.

func (Tenant) Validate

func (t Tenant) Validate() error

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

type TenantCloneQuery added in v2.18.1

type TenantCloneQuery struct {
	CloneTenantID string `uri:"clone" url:"clone"`
}

type TenantCloneRequest added in v2.18.1

type TenantCloneRequest struct {
	Name        string `json:"Name"`
	Description string `json:"Description"`
}

type TenantService

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

func NewTenantService

func NewTenantService(sling *sling.Sling, uriTemplate string, missingVariablesPath string, statusPath string, tagTestPath string) *TenantService

func (*TenantService) Add

func (s *TenantService) Add(tenant *Tenant) (*Tenant, error)

Add creates a new Tenant.

func (*TenantService) Clone added in v2.18.1

func (s *TenantService) Clone(sourceTenant *Tenant, request TenantCloneRequest) (*Tenant, error)

func (*TenantService) CreateVariables

func (s *TenantService) CreateVariables(tenant *Tenant, tenantVariable *variables.TenantVariables) (*variables.TenantVariables, error)

func (*TenantService) Get

func (s *TenantService) Get(tenantsQuery TenantsQuery) (*resources.Resources[*Tenant], error)

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

func (s *TenantService) GetAll() ([]*Tenant, error)

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

func (*TenantService) GetByID

func (s *TenantService) GetByID(id string) (*Tenant, error)

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

func (*TenantService) GetByIDs

func (s *TenantService) GetByIDs(ids []string) ([]*Tenant, error)

GetByIDs returns the accounts that match the input IDs.

func (*TenantService) GetByIdentifier added in v2.11.0

func (s *TenantService) GetByIdentifier(identifier string) (*Tenant, error)

func (*TenantService) GetByName added in v2.11.0

func (s *TenantService) GetByName(name string) (*Tenant, error)

func (*TenantService) GetByPartialName

func (s *TenantService) GetByPartialName(partialName string) ([]*Tenant, error)

GetByPartialName performs a lookup and returns all tenants with a matching partial name.

func (*TenantService) GetByProjectID

func (s *TenantService) GetByProjectID(id string) ([]*Tenant, error)

GetByProjectID performs a lookup and returns all tenants with a matching project ID.

func (*TenantService) GetMissingVariables

func (s *TenantService) GetMissingVariables(missibleVariablesQuery variables.MissingVariablesQuery) (*[]variables.TenantsMissingVariables, error)

func (*TenantService) GetVariables

func (s *TenantService) GetVariables(tenant *Tenant) (*variables.TenantVariables, error)

func (*TenantService) Update

func (s *TenantService) Update(resource *Tenant) (*Tenant, error)

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

func (*TenantService) UpdateVariables

func (s *TenantService) UpdateVariables(tenant *Tenant, tenantVariables *variables.TenantVariables) (*variables.TenantVariables, error)

type TenantVariablesQuery

type TenantVariablesQuery struct {
	ProjectID string `uri:"projectId,omitempty" url:"projectId,omitempty"`
}

type TenantsMissingVariablesQuery

type TenantsMissingVariablesQuery struct {
	EnvironmentID  []string `uri:"environmentId,omitempty" url:"environmentId,omitempty"`
	IncludeDetails bool     `uri:"includeDetails,omitempty" url:"includeDetails,omitempty"`
	ProjectID      string   `uri:"projectId,omitempty" url:"projectId,omitempty"`
	TenantID       string   `uri:"tenantId,omitempty" url:"tenantId,omitempty"`
}

type TenantsQuery

type TenantsQuery struct {
	ClonedFromTenantID string   `uri:"clonedFromTenantId,omitempty" url:"clonedFromTenantId,omitempty"`
	IDs                []string `uri:"ids,omitempty" url:"ids,omitempty"`
	IsClone            bool     `uri:"clone,omitempty" url:"clone,omitempty"`
	Name               string   `uri:"name,omitempty" url:"name,omitempty"`
	PartialName        string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	ProjectID          string   `uri:"projectId,omitempty" url:"projectId,omitempty"`
	Skip               int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Tags               []string `uri:"tags,omitempty" url:"tags,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