Documentation
¶
Index ¶
- Variables
- func FormatTenant(tenant *model.Tenant, cmd *cobra.Command) error
- type CommandFactory
- func (f *CommandFactory) NewCreateTenantCmd(ctx context.Context) *cobra.Command
- func (f *CommandFactory) NewDeleteTenantCmd(ctx context.Context) *cobra.Command
- func (f *CommandFactory) NewGetTenantCmd(ctx context.Context) *cobra.Command
- func (f *CommandFactory) NewListTenantsCmd(ctx context.Context) *cobra.Command
- func (f *CommandFactory) NewRootCmd(ctx context.Context, cfg *config.Config) *cobra.Command
- func (f *CommandFactory) NewUpdateTenantCmd(ctx context.Context) *cobra.Command
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCreateTenant = errors.New("failed to create tenant schema") ErrCreateGroups = errors.New("failed to create gropus") )
View Source
var ( ErrTenantIDRequired = errors.New("tenant id is required") ErrDeleteTenant = errors.New("failed to delete tenant") ErrTenantNotFound = errors.New("tenant not found") )
View Source
var ErrAuthzLoader = errors.New("error creating authz repo loader")
Functions ¶
Types ¶
type CommandFactory ¶
type CommandFactory struct {
// contains filtered or unexported fields
}
func NewCommandFactory ¶
func NewCommandFactory( ctx context.Context, cfg *config.Config, dbCon *multitenancy.DB, svcRegistry serviceapi.Registry, ) (*CommandFactory, error)
func (*CommandFactory) NewCreateTenantCmd ¶
func (f *CommandFactory) NewCreateTenantCmd(ctx context.Context) *cobra.Command
NewCreateTenantCmd creates a Cobra command that creates tenant.
func (*CommandFactory) NewDeleteTenantCmd ¶
func (f *CommandFactory) NewDeleteTenantCmd(ctx context.Context) *cobra.Command
NewDeleteTenantCmd creates a Cobra command that deletes a tenant.
func (*CommandFactory) NewGetTenantCmd ¶
func (f *CommandFactory) NewGetTenantCmd(ctx context.Context) *cobra.Command
NewGetTenantCmd creates a Cobra command that gets tenant information.
func (*CommandFactory) NewListTenantsCmd ¶
func (f *CommandFactory) NewListTenantsCmd(ctx context.Context) *cobra.Command
NewListTenantsCmd creates a Cobra command that gets tenant list.
func (*CommandFactory) NewRootCmd ¶
func (*CommandFactory) NewUpdateTenantCmd ¶
func (f *CommandFactory) NewUpdateTenantCmd(ctx context.Context) *cobra.Command
Click to show internal directories.
Click to hide internal directories.