tenants

package
v2.38.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteByID added in v2.33.0

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

DeleteByID deletes the tenant that matches the input ID.

func Get added in v2.33.0

func Get(client newclient.Client, spaceID string, tenantsQuery TenantsQuery) (*resources.Resources[*Tenant], error)

Get returns a collection of tenants based on the criteria defined by its input query parameter.

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 Add added in v2.33.0

func Add(client newclient.Client, tenant *Tenant) (*Tenant, error)

Add creates a new Tenant.

func GetAll added in v2.34.0

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

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

func GetByID added in v2.33.0

func GetByID(client newclient.Client, spaceID string, ID string) (*Tenant, error)

GetByID returns the tenant that matches the input ID.

func NewTenant

func NewTenant(name string) *Tenant

NewTenant initializes a Tenant with a name.

func Update added in v2.33.0

func Update(client newclient.Client, resource *Tenant) (*Tenant, error)

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

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 deprecated

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

Add creates a new Tenant.

Deprecated: use tenants.Add

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 deprecated

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.

Deprecated: use tenants.Get

func (*TenantService) GetAll deprecated

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

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

Deprecated: use tenants.GetAll

func (*TenantService) GetByID deprecated

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.

Deprecated: use tenants.GetByID

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 deprecated

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

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

Deprecated: use tenant.Update

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