commands

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTenantIDRequired = errors.New("tenant id is required")
	ErrDeleteTenant     = errors.New("failed to delete tenant")
	ErrTenantNotFound   = errors.New("tenant not found")
)

Functions

func DropSchema

func DropSchema(db *multitenancy.DB, schemaName string) error

func FormatTenant

func FormatTenant(tenant *model.Tenant, cmd *cobra.Command) error

Types

type CommandFactory

type CommandFactory struct {
	// contains filtered or unexported fields
}

func NewCommandFactory

func NewCommandFactory(
	ctx context.Context,
	cfg *config.Config,
	dbCon *multitenancy.DB,
	ctlg *plugincatalog.Catalog,
) (*CommandFactory, error)

func (*CommandFactory) NewCreateGroupsCmd

func (f *CommandFactory) NewCreateGroupsCmd(ctx context.Context) *cobra.Command

NewCreateGroupsCmd creates a Cobra command that creates tenant groups

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 (f *CommandFactory) NewRootCmd(ctx context.Context) *cobra.Command

func (*CommandFactory) NewUpdateTenantCmd

func (f *CommandFactory) NewUpdateTenantCmd(ctx context.Context) *cobra.Command

NewUpdateTenantCmd creates a Cobra command that updates single tenant.

Jump to

Keyboard shortcuts

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