Documentation ¶
Index ¶
- func IsNil(i interface{}) bool
- type Tenant
- type TenantService
- func (s *TenantService) Add(tenant *Tenant) (*Tenant, error)
- func (s *TenantService) CreateVariables(tenant *Tenant, tenantVariable *variables.TenantVariables) (*variables.TenantVariables, error)
- func (s *TenantService) Get(tenantsQuery TenantsQuery) (*resources.Resources[*Tenant], error)
- func (s *TenantService) GetAll() ([]*Tenant, error)
- func (s *TenantService) GetByID(id string) (*Tenant, error)
- 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)
- 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 ¶
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 }
type TenantService ¶
type TenantService struct { services.CanDeleteService // contains filtered or unexported fields }
func NewTenantService ¶
func (*TenantService) Add ¶
func (s *TenantService) Add(tenant *Tenant) (*Tenant, error)
Add creates a new Tenant.
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"` }