tenancy_console

package
v0.0.0-...-8122643 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ActivateCmd string = "activate"
View Source
const ActivateDescription string = "Activate tenancy"
View Source
const AddCmd string = "add"
View Source
const AddDescription string = "Add tenancy"
View Source
const AddIpAddressCmd string = "ip-add"
View Source
const AddIpAddressDescription string = "Add allowed IP address to tenancy"
View Source
const ChangePoolOrDbCmd string = "pool-db"
View Source
const ChangePoolOrDbDescription string = "Change tenancy's pool and/or database name"
View Source
const CustomerCmd string = "customer"
View Source
const CustomerDescription string = "Move tenancy to other customer"
View Source
const DbRoleCmd string = "db-role"
View Source
const DbRoleDescription string = "Set role of database service to be used by tenancy"
View Source
const DeactivateCmd string = "deactivate"
View Source
const DeactivateDescription string = "Deactivate tenancy"
View Source
const DeleteCmd string = "delete"
View Source
const DeleteDescription string = "Delete tenancy"
View Source
const DeleteIpAddressCmd string = "ip-delete"
View Source
const DeleteIpAddressDescription string = "Delete allowed IP address to tenancy"
View Source
const FindCmd string = "show"
View Source
const FindDescription string = "Show tenancy"
View Source
const ListCmd string = "list"
View Source
const ListDescription string = "List tenancies"
View Source
const ListIpAddressesCmd string = "ip-list"
View Source
const ListIpAddressesDescription string = "List IP addresses"
View Source
const PathCmd string = "path"
View Source
const PathDescription string = "Set new tenancy's path"
View Source
const RoleCmd string = "role"
View Source
const RoleDescription string = "Set new tenancy's role"
View Source
const SetPathBlockedCmd string = "block-path"
View Source
const SetPathBlockedDescription string = "Block tenancy path(s)"
View Source
const ShadowPathCmd string = "shadow-path"
View Source
const ShadowPathDescription string = "Set new tenancy's shadow path"

Variables

This section is empty.

Functions

func PrepareId

func PrepareId(id string, customer string, role string) (string, bool)

Types

type ActivateHandler

type ActivateHandler struct {
	FindHandler
}

func (*ActivateHandler) Execute

func (a *ActivateHandler) Execute(args []string) error

type AddHandler

type AddHandler struct {
	HandlerBase
	multitenancy.TenancyData
}

func (*AddHandler) Data

func (a *AddHandler) Data() interface{}

func (*AddHandler) Execute

func (a *AddHandler) Execute(args []string) error

type AddIpAddressHandler

type AddIpAddressHandler struct {
	FindHandler
	multitenancy.IpAddressCmd
}

func (*AddIpAddressHandler) Execute

func (a *AddIpAddressHandler) Execute(args []string) error

type ChangePoolOrDbData

type ChangePoolOrDbData struct {
	TenancySelector
	multitenancy.WithPoolAndDb
}

type ChangePoolOrDbHandler

type ChangePoolOrDbHandler struct {
	HandlerBase
	ChangePoolOrDbData
}

func (*ChangePoolOrDbHandler) Data

func (a *ChangePoolOrDbHandler) Data() interface{}

func (*ChangePoolOrDbHandler) Execute

func (a *ChangePoolOrDbHandler) Execute(args []string) error

type CustomerData

type CustomerData struct {
	TenancySelector
	TargetCustomer string `` /* 167-byte string literal not displayed */
}

type CustomerHandler

type CustomerHandler struct {
	HandlerBase
	CustomerData
}

func (*CustomerHandler) Data

func (a *CustomerHandler) Data() interface{}

func (*CustomerHandler) Execute

func (a *CustomerHandler) Execute(args []string) error

type DbRoleData

type DbRoleData struct {
	TenancySelector
	multitenancy.WithDbRole
}

type DbRoleHandler

type DbRoleHandler struct {
	HandlerBase
	DbRoleData
}

func (*DbRoleHandler) Data

func (a *DbRoleHandler) Data() interface{}

func (*DbRoleHandler) Execute

func (a *DbRoleHandler) Execute(args []string) error

type DeactivateHandler

type DeactivateHandler struct {
	FindHandler
}

func (*DeactivateHandler) Execute

func (a *DeactivateHandler) Execute(args []string) error

type DeleteData

type DeleteData struct {
	TenancySelector
	WithDb bool `long:"with-database" description:"Delete tenancy's database. ATTENTION! Deleted data can not be recovered later!"`
}

type DeleteHandler

type DeleteHandler struct {
	HandlerBase
	DeleteData
}

func (*DeleteHandler) Data

func (a *DeleteHandler) Data() interface{}

func (*DeleteHandler) Execute

func (a *DeleteHandler) Execute(args []string) error

type DeleteIpAddressHandler

type DeleteIpAddressHandler struct {
	FindHandler
	multitenancy.IpAddressCmd
}

func (*DeleteIpAddressHandler) Execute

func (a *DeleteIpAddressHandler) Execute(args []string) error

type FindHandler

type FindHandler struct {
	HandlerBase
	TenancySelector
}

func (*FindHandler) Data

func (a *FindHandler) Data() interface{}

func (*FindHandler) Execute

func (a *FindHandler) Execute(args []string) error

func (*FindHandler) PrepareId

func (a *FindHandler) PrepareId() (string, bool)

type Handler

func Activate

func Activate() Handler

func Add

func Add() Handler

func AddIpAddress

func AddIpAddress() Handler

func ChangePoolOrDb

func ChangePoolOrDb() Handler

func Customer

func Customer() Handler

func DbRole

func DbRole() Handler

func Deactivate

func Deactivate() Handler

func Delete

func Delete() Handler

func DeleteIpAddress

func DeleteIpAddress() Handler

func Find

func Find() Handler

func List

func List() Handler

func ListIpAddresses

func ListIpAddresses() Handler

func Path

func Path() Handler

func Role

func Role() Handler

func SetPathBlocked

func SetPathBlocked() Handler

func ShadowPath

func ShadowPath() Handler

type HandlerBase

type HandlerBase struct {
	console_tool.HandlerBase[*TenancyCommands]
}

func (*HandlerBase) Context

func (b *HandlerBase) Context(data interface{}) (op_context.Context, multitenancy.TenancyController, error)

type ListHandler

type ListHandler struct {
	HandlerBase
	console_tool.QueryData
}

func (*ListHandler) Data

func (a *ListHandler) Data() interface{}

func (*ListHandler) Execute

func (a *ListHandler) Execute(args []string) error

type ListIpAddressesHandler

type ListIpAddressesHandler struct {
	HandlerBase
	console_tool.QueryData
}

func (*ListIpAddressesHandler) Data

func (a *ListIpAddressesHandler) Data() interface{}

func (*ListIpAddressesHandler) Execute

func (a *ListIpAddressesHandler) Execute(args []string) error

type MultitenancyAppBuilder

func (*MultitenancyAppBuilder) HasSetupApp

func (m *MultitenancyAppBuilder) HasSetupApp() bool

func (*MultitenancyAppBuilder) InitApp

func (m *MultitenancyAppBuilder) InitApp(app app_context.Context, configFile string, args []string, configType ...string) error

func (*MultitenancyAppBuilder) InitSetupApp

func (m *MultitenancyAppBuilder) InitSetupApp(app app_context.Context, configFile string, args []string, configType ...string) error

func (*MultitenancyAppBuilder) NewApp

func (*MultitenancyAppBuilder) NewSetupApp

func (m *MultitenancyAppBuilder) NewSetupApp(buildConfig *app_context.BuildConfig) app_context.Context

func (*MultitenancyAppBuilder) PoolController

func (m *MultitenancyAppBuilder) PoolController() pool.PoolController

func (*MultitenancyAppBuilder) Tenancy

type PathData

type PathData struct {
	TenancySelector
	multitenancy.WithPath
}

type PathHandler

type PathHandler struct {
	HandlerBase
	PathData
}

func (*PathHandler) Data

func (a *PathHandler) Data() interface{}

func (*PathHandler) Execute

func (a *PathHandler) Execute(args []string) error

type RoleData

type RoleData struct {
	TenancySelector
	NewRole string `long:"new-role" description:"New role"`
}

type RoleHandler

type RoleHandler struct {
	HandlerBase
	RoleData
}

func (*RoleHandler) Data

func (a *RoleHandler) Data() interface{}

func (*RoleHandler) Execute

func (a *RoleHandler) Execute(args []string) error

type SetPathBlockedData

type SetPathBlockedData struct {
	TenancySelector
	multitenancy.BlockPathCmd
}

type SetPathBlockedHandler

type SetPathBlockedHandler struct {
	HandlerBase
	SetPathBlockedData
}

func (*SetPathBlockedHandler) Data

func (a *SetPathBlockedHandler) Data() interface{}

func (*SetPathBlockedHandler) Execute

func (a *SetPathBlockedHandler) Execute(args []string) error

type ShadowPathData

type ShadowPathData struct {
	TenancySelector
	multitenancy.WithPath
}

type ShadowPathHandler

type ShadowPathHandler struct {
	HandlerBase
	ShadowPathData
}

func (*ShadowPathHandler) Data

func (a *ShadowPathHandler) Data() interface{}

func (*ShadowPathHandler) Execute

func (a *ShadowPathHandler) Execute(args []string) error

type TenancyCommands

type TenancyCommands struct {
	console_tool.Commands[*TenancyCommands]
	MakeController func(app app_context.Context) multitenancy.TenancyController
}

func NewTenancyCommands

func NewTenancyCommands() *TenancyCommands

func (*TenancyCommands) LoadHandlers

func (p *TenancyCommands) LoadHandlers()

type TenancySelector

type TenancySelector struct {
	Customer string `long:"customer" description:"Name of customer the tenancy belongs to, used only if ID is not set"`
	Role     string `long:"role" description:"Role of tenancy, used only if ID is not set"`
	Id       string `long:"id" description:"ID of tenancy, if not set then customer and role will be used to look for tenancy"`
}

Jump to

Keyboard shortcuts

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