customer_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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DescriptionCmd string = "description"
View Source
const DescriptionDescription string = "Set description"
View Source
const NameCmd string = "name"
View Source
const NameDescription string = "Set name"

Variables

This section is empty.

Functions

func DefaultCustomerManager

func DefaultCustomerManager(app app_context.Context) user.Users[*customer.Customer]

Types

type Commands

type Commands[T customer.User] struct {
	*user_console.UserCommands[T]
}

func NewCommands

func NewCommands[T customer.User](config Config[T], handlers ...console_tool.HandlerBuilder[*user_console.UserCommands[T]]) *Commands[T]

type Config

type Config[T customer.User] struct {
	ManagerBuilder func(app app_context.Context) user.Users[T]
	Name           string
	Description    string
}

type CustomerCommands

type CustomerCommands = Commands[*customer.Customer]

func NewCustomerCommands

func NewCustomerCommands(managerBuilder ...func(app app_context.Context) user.Users[*customer.Customer]) *CustomerCommands

type DescriptionData

type DescriptionData struct {
	Description string `long:"description" description:"Additional description"`
}

type DescriptionHandler

type DescriptionHandler[T customer.User] struct {
	user_console.HandlerBase[T]
	WithDescriptionData
}

func (*DescriptionHandler[T]) Data

func (a *DescriptionHandler[T]) Data() interface{}

func (*DescriptionHandler[T]) Execute

func (a *DescriptionHandler[T]) Execute(args []string) error

type NameData

type NameData struct {
	Name string `long:"name" description:"Name of the subject"`
}

type NameHandler

type NameHandler[T customer.User] struct {
	user_console.HandlerBase[T]
	WithNameData
}

func (*NameHandler[T]) Data

func (a *NameHandler[T]) Data() interface{}

func (*NameHandler[T]) Execute

func (a *NameHandler[T]) Execute(args []string) error

type WithDescriptionData

type WithDescriptionData struct {
	user_console.LoginData
	DescriptionData
}

type WithNameData

type WithNameData struct {
	user_console.LoginData
	NameData
}

Jump to

Keyboard shortcuts

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