tenant

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TenantListParamParser

type TenantListParamParser struct{}

func (TenantListParamParser) GetDefaultSortBy

func (parser TenantListParamParser) GetDefaultSortBy() string

func (TenantListParamParser) GetSupportedSortBys

func (parser TenantListParamParser) GetSupportedSortBys() []string

func (TenantListParamParser) ParseValue

func (parser TenantListParamParser) ParseValue(val string, sortBy string) (interface{}, error)

type TenantService

type TenantService struct {
	service.BaseService
	// contains filtered or unexported fields
}

func NewService

func NewService(env service.Env, objectSvc object.Service) *TenantService

func (TenantService) Create

func (svc TenantService) Create(ctx context.Context, tenantSpec TenantSpec) (*TenantSpec, error)

func (TenantService) DeleteByTenantId

func (svc TenantService) DeleteByTenantId(ctx context.Context, tenantId string) error

func (TenantService) GetByTenantId

func (svc TenantService) GetByTenantId(ctx context.Context, tenantId string) (*TenantSpec, error)

func (TenantService) List

func (svc TenantService) List(ctx context.Context, listParams service.ListParams) ([]TenantSpec, error)

func (TenantService) Routes

func (svc TenantService) Routes() ([]service.Route, error)

func (TenantService) UpdateByTenantId

func (svc TenantService) UpdateByTenantId(ctx context.Context, tenantId string, tenantSpec UpdateTenantSpec) (*TenantSpec, error)

type TenantSpec

type TenantSpec struct {
	TenantId  string    `json:"tenantId"  validate:"omitempty,valid_object_id"`
	Name      *string   `json:"name"`
	CreatedAt time.Time `json:"createdAt"`
}

func NewTenantSpecFromObjectSpec

func NewTenantSpecFromObjectSpec(objectSpec *object.ObjectSpec) (*TenantSpec, error)

func (TenantSpec) ToCreateObjectSpec

func (spec TenantSpec) ToCreateObjectSpec() (*object.CreateObjectSpec, error)

type UpdateTenantSpec

type UpdateTenantSpec struct {
	Name *string `json:"name"`
}

func (UpdateTenantSpec) ToUpdateObjectSpec

func (updateSpec UpdateTenantSpec) ToUpdateObjectSpec() *object.UpdateObjectSpec

Jump to

Keyboard shortcuts

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