Documentation ¶
Index ¶
- Constants
- func Add[T user.User]() console_tool.Handler[*UserCommands[T]]
- func AddNoPassword[T user.User]() console_tool.Handler[*UserCommands[T]]
- func AddWithEmail[T user.User]() console_tool.Handler[*UserCommands[T]]
- func AddWithPhone[T user.User]() console_tool.Handler[*UserCommands[T]]
- func Block[T user.User]() console_tool.Handler[*UserCommands[T]]
- func Email[T user.User]() console_tool.Handler[*UserCommands[T]]
- func List[T user.User]() console_tool.Handler[*UserCommands[T]]
- func Password[T user.User]() console_tool.Handler[*UserCommands[T]]
- func Phone[T user.User]() console_tool.Handler[*UserCommands[T]]
- func Show[T user.User]() console_tool.Handler[*UserCommands[T]]
- func Unblock[T user.User]() console_tool.Handler[*UserCommands[T]]
- type AddData
- type AddHandler
- type AddNoPasswordHandler
- type AddWithEmailHandler
- type AddWithPhoneHandler
- type BlockHandler
- type EmailData
- type EmailHandler
- type HandlerBase
- type ListHandler
- type LoginData
- type PasswordHandler
- type PhoneData
- type PhoneHandler
- type ShowHandler
- type UnblockHandler
- type UserCommands
- type WithEmailData
- type WithPhoneData
- type WithQueryData
Constants ¶
View Source
const AddCmd string = "add"
View Source
const AddDescription string = "Add new"
View Source
const BlockCmd string = "block"
View Source
const BlockDescription string = "Block access"
View Source
const EmailCmd string = "email"
View Source
const EmailDescription string = "Set email"
View Source
const ListCmd string = "list"
View Source
const ListDescription string = "List records"
View Source
const PasswordCmd string = "password"
View Source
const PasswordDescription string = "Set new password"
View Source
const PhoneCmd string = "phone"
View Source
const PhoneDescription string = "Set phone number"
View Source
const ShowCmd string = "show"
View Source
const ShowDescription string = "Show object"
View Source
const UnblockCmd string = "unblock"
View Source
const UnblockDescription string = "Unblock access"
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add[T user.User]() console_tool.Handler[*UserCommands[T]]
func AddNoPassword ¶
func AddNoPassword[T user.User]() console_tool.Handler[*UserCommands[T]]
func AddWithEmail ¶
func AddWithEmail[T user.User]() console_tool.Handler[*UserCommands[T]]
func AddWithPhone ¶
func AddWithPhone[T user.User]() console_tool.Handler[*UserCommands[T]]
func Block ¶
func Block[T user.User]() console_tool.Handler[*UserCommands[T]]
func Email ¶
func Email[T user.User]() console_tool.Handler[*UserCommands[T]]
func List ¶
func List[T user.User]() console_tool.Handler[*UserCommands[T]]
func Password ¶
func Password[T user.User]() console_tool.Handler[*UserCommands[T]]
func Phone ¶
func Phone[T user.User]() console_tool.Handler[*UserCommands[T]]
func Show ¶
func Show[T user.User]() console_tool.Handler[*UserCommands[T]]
func Unblock ¶
func Unblock[T user.User]() console_tool.Handler[*UserCommands[T]]
Types ¶
type AddHandler ¶
type AddHandler[T user.User] struct { HandlerBase[T] AddData }
func (*AddHandler[T]) Data ¶
func (a *AddHandler[T]) Data() interface{}
func (*AddHandler[T]) Execute ¶
func (a *AddHandler[T]) Execute(args []string) error
type AddNoPasswordHandler ¶
type AddNoPasswordHandler[T user.User] struct { HandlerBase[T] AddData }
func (*AddNoPasswordHandler[T]) Data ¶
func (a *AddNoPasswordHandler[T]) Data() interface{}
func (*AddNoPasswordHandler[T]) Execute ¶
func (a *AddNoPasswordHandler[T]) Execute(args []string) error
type AddWithEmailHandler ¶
type AddWithEmailHandler[T user.User] struct { HandlerBase[T] WithEmailData }
func (*AddWithEmailHandler[T]) Data ¶
func (a *AddWithEmailHandler[T]) Data() interface{}
func (*AddWithEmailHandler[T]) Execute ¶
func (a *AddWithEmailHandler[T]) Execute(args []string) error
type AddWithPhoneHandler ¶
type AddWithPhoneHandler[T user.User] struct { HandlerBase[T] WithPhoneData }
func (*AddWithPhoneHandler[T]) Data ¶
func (a *AddWithPhoneHandler[T]) Data() interface{}
func (*AddWithPhoneHandler[T]) Execute ¶
func (a *AddWithPhoneHandler[T]) Execute(args []string) error
type BlockHandler ¶
type BlockHandler[T user.User] struct { HandlerBase[T] LoginData }
func (*BlockHandler[T]) Data ¶
func (a *BlockHandler[T]) Data() interface{}
func (*BlockHandler[T]) Execute ¶
func (a *BlockHandler[T]) Execute(args []string) error
type EmailData ¶
type EmailData struct {
Email string `` /* 128-byte string literal not displayed */
}
type EmailHandler ¶
type EmailHandler[T user.User] struct { HandlerBase[T] WithEmailData }
func (*EmailHandler[T]) Data ¶
func (a *EmailHandler[T]) Data() interface{}
func (*EmailHandler[T]) Execute ¶
func (a *EmailHandler[T]) Execute(args []string) error
type HandlerBase ¶
type HandlerBase[T user.User] struct { console_tool.HandlerBase[*UserCommands[T]] }
func (*HandlerBase[T]) Context ¶
func (b *HandlerBase[T]) Context(data interface{}, login ...string) (op_context.Context, user.Users[T], error)
type ListHandler ¶
type ListHandler[T user.User] struct { HandlerBase[T] WithQueryData }
func (*ListHandler[T]) Data ¶
func (a *ListHandler[T]) Data() interface{}
func (*ListHandler[T]) Execute ¶
func (a *ListHandler[T]) Execute(args []string) error
type LoginData ¶
type LoginData struct {
Login string `long:"login" description:"Login" required:"true"`
}
type PasswordHandler ¶
type PasswordHandler[T user.User] struct { HandlerBase[T] LoginData }
func (*PasswordHandler[T]) Data ¶
func (a *PasswordHandler[T]) Data() interface{}
func (*PasswordHandler[T]) Execute ¶
func (a *PasswordHandler[T]) Execute(args []string) error
type PhoneData ¶
type PhoneData struct {
Phone string `` /* 149-byte string literal not displayed */
}
type PhoneHandler ¶
type PhoneHandler[T user.User] struct { HandlerBase[T] WithPhoneData }
func (*PhoneHandler[T]) Data ¶
func (a *PhoneHandler[T]) Data() interface{}
func (*PhoneHandler[T]) Execute ¶
func (a *PhoneHandler[T]) Execute(args []string) error
type ShowHandler ¶
type ShowHandler[T user.User] struct { HandlerBase[T] LoginData }
func (*ShowHandler[T]) Data ¶
func (a *ShowHandler[T]) Data() interface{}
func (*ShowHandler[T]) Execute ¶
func (a *ShowHandler[T]) Execute(args []string) error
type UnblockHandler ¶
type UnblockHandler[T user.User] struct { HandlerBase[T] LoginData }
func (*UnblockHandler[T]) Data ¶
func (a *UnblockHandler[T]) Data() interface{}
func (*UnblockHandler[T]) Execute ¶
func (a *UnblockHandler[T]) Execute(args []string) error
type UserCommands ¶
type UserCommands[T user.User] struct { console_tool.Commands[*UserCommands[T]] MakeController func(app app_context.Context) user.Users[T] }
func NewUserCommands ¶
func NewUserCommands[T user.User](groupName string, groupDescription string, controllerBuilder func(app app_context.Context) user.Users[T], loadDefaultHandlers ...bool) *UserCommands[T]
func (*UserCommands[T]) LoadDefaultHandlers ¶
func (p *UserCommands[T]) LoadDefaultHandlers()
type WithEmailData ¶
type WithPhoneData ¶
type WithQueryData ¶
type WithQueryData struct {
console_tool.QueryData
}
Click to show internal directories.
Click to hide internal directories.