customer

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

Documentation

Index

Constants

View Source
const (
	ErrorCodeCustomerNotFound string = "customer_not_found"
)

Variables

View Source
var ErrorDescriptions = map[string]string{
	ErrorCodeCustomerNotFound: "Customer not found.",
}

Functions

func DbModels

func DbModels() []interface{}

func Description

func Description(description string, sample ...User) user.SetUserFields[User]

func Name

func Name(name string, sample ...User) user.SetUserFields[User]

func NewOplog

func NewOplog() user.OpLogUserI

func QueryDbModels

func QueryDbModels() []interface{}

Types

type Customer

type Customer struct {
	UserBase
}

func NewCustomer

func NewCustomer() *Customer

type CustomerSession

type CustomerSession struct {
	auth_session.SessionBase
}

func NewCustomerSession

func NewCustomerSession() *CustomerSession

type CustomerSessionClient

type CustomerSessionClient struct {
	user_session_default.UserSessionClient
}

func NewCustomerSessionClient

func NewCustomerSessionClient() *CustomerSessionClient

type CustomersBase

func (*CustomersBase) AuthUserManager

func (m *CustomersBase) AuthUserManager() auth_session.AuthUserManager

func (*CustomersBase) Construct

func (c *CustomersBase) Construct(customerController CustomerController, authUserFinder ...auth_session.AuthUserFinder)

type Manager

type Manager struct {
	CustomersBase
	auth_session.SessionController
}

func NewManager

func NewManager(config ...ManagerConfig) *Manager

func (*Manager) SessionManager

func (m *Manager) SessionManager() auth_session.SessionController

type ManagerConfig

type ManagerConfig struct {
	CustomerController CustomerController
	SessionController  auth_session.SessionController
}

type NameAndDescriptionSetter

type NameAndDescriptionSetter interface {
	SetName(ctx op_context.Context, id string, name string, idIsLogin ...bool) error
	SetDescription(ctx op_context.Context, id string, description string, idIsLogin ...bool) error
}

type OpLogCustomer

type OpLogCustomer struct {
	user.OpLogUser
}

type User

type User interface {
	user.User
	common.WithName
	common.WithDescription
}

type UserNameAndDescriptionController

type UserNameAndDescriptionController[T user.User] interface {
	user.UserController[T]
	NameAndDescriptionSetter
}

type UserNameAndDescriptionControllerB

type UserNameAndDescriptionControllerB[T user.User] struct {
	*user.UserControllerBase[T]
}

func (*UserNameAndDescriptionControllerB[T]) SetDescription

func (cu *UserNameAndDescriptionControllerB[T]) SetDescription(ctx op_context.Context, id string, description string, idIsLogin ...bool) error

func (*UserNameAndDescriptionControllerB[T]) SetName

func (cu *UserNameAndDescriptionControllerB[T]) SetName(ctx op_context.Context, id string, name string, idIsLogin ...bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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