Documentation ¶
Index ¶
- func DeleteByID(client newclient.Client, spaceID string, ID string) error
- func Get(client newclient.Client, spaceID string, tenantsQuery TenantsQuery) (*resources.Resources[*Tenant], error)
- func IsNil(i interface{}) bool
- type Tenant
- func Add(client newclient.Client, tenant *Tenant) (*Tenant, error)
- func GetAll(client newclient.Client, spaceID string) ([]*Tenant, error)
- func GetByID(client newclient.Client, spaceID string, ID string) (*Tenant, error)
- func NewTenant(name string) *Tenant
- func Update(client newclient.Client, resource *Tenant) (*Tenant, error)
- type TenantCloneQuery
- type TenantCloneRequest
- type TenantService
- func (s *TenantService) Add(tenant *Tenant) (*Tenant, error)deprecated
- func (s *TenantService) Clone(sourceTenant *Tenant, request TenantCloneRequest) (*Tenant, error)
- func (s *TenantService) CreateVariables(tenant *Tenant, tenantVariable *variables.TenantVariables) (*variables.TenantVariables, error)
- func (s *TenantService) Get(tenantsQuery TenantsQuery) (*resources.Resources[*Tenant], error)deprecated
- func (s *TenantService) GetAll() ([]*Tenant, error)deprecated
- func (s *TenantService) GetByID(id string) (*Tenant, error)deprecated
- func (s *TenantService) GetByIDs(ids []string) ([]*Tenant, error)
- func (s *TenantService) GetByIdentifier(identifier string) (*Tenant, error)
- func (s *TenantService) GetByName(name string) (*Tenant, error)
- func (s *TenantService) GetByPartialName(partialName string) ([]*Tenant, error)
- func (s *TenantService) GetByProjectID(id string) ([]*Tenant, error)
- func (s *TenantService) GetMissingVariables(missibleVariablesQuery variables.MissingVariablesQuery) (*[]variables.TenantsMissingVariables, error)
- func (s *TenantService) GetVariables(tenant *Tenant) (*variables.TenantVariables, error)
- func (s *TenantService) Update(resource *Tenant) (*Tenant, error)deprecated
- func (s *TenantService) UpdateVariables(tenant *Tenant, tenantVariables *variables.TenantVariables) (*variables.TenantVariables, error)
- type TenantVariablesQuery
- type TenantsMissingVariablesQuery
- type TenantsQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByID ¶ added in v2.33.0
DeleteByID deletes the tenant that matches the input ID.
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"` IsDisabled bool `json:"IsDisabled"` resources.Resource }
type TenantCloneQuery ¶ added in v2.18.1
type TenantCloneQuery struct {
CloneTenantID string `uri:"clone" url:"clone"`
}
type TenantCloneRequest ¶ added in v2.18.1
type TenantService ¶
type TenantService struct { services.CanDeleteService // contains filtered or unexported fields }
func NewTenantService ¶
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"` IsDisabled bool `uri:"isDisabled,omitempty" url:"isDisabled,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"` }