user

package
v0.0.0-...-8f9ce2e Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USER_GENDER_MALE   = "m"
	USER_GENDER_FEMALE = "f"
)

Variables

This section is empty.

Functions

func Configure

func Configure(l *goapp.Lifecycle, conf *config.Config)

func UserDeserializer

func UserDeserializer(r io.Reader, node *base.Node) error

func UserSerializer

func UserSerializer(w io.Writer, node *base.Node) error

Types

type PublicUserData

type PublicUserData struct {
	FirstName   string   `json:"firstname"`
	LastName    string   `json:"lastname"`
	Email       string   `json:"email"`
	DateOfBirth string   `json:"dateofbirth"`
	Locked      bool     `json:"locked"`
	Enabled     bool     `json:"enabled"`
	Expired     bool     `json:"expired"`
	Roles       []string `json:"roles"`
	Gender      string   `json:"gender"`
	Locale      string   `json:"locale"`
	Timezone    string   `json:"timezone"`
	Username    string   `json:"username"`
	NewPassword string   `json:"newpassword,omitempty"`
}

type PublicUserMeta

type PublicUserMeta struct {
}

type User

type User struct {
	FirstName   string   `json:"firstname"`
	LastName    string   `json:"lastname"`
	Email       string   `json:"email"`
	DateOfBirth string   `json:"dateofbirth"`
	Locked      bool     `json:"locked"`
	Enabled     bool     `json:"enabled"`
	Expired     bool     `json:"expired"`
	Roles       []string `json:"roles"`
	Gender      string   `json:"gender"`
	Locale      string   `json:"locale"`
	Timezone    string   `json:"timezone"`
	Username    string   `json:"username"`
	Password    string   `json:"password"`
	NewPassword string   `json:"newpassword,omitempty"`
}

func (*User) GetPassword

func (u *User) GetPassword() string

func (*User) GetRoles

func (u *User) GetRoles() []string

func (*User) GetUsername

func (u *User) GetUsername() string

type UserHandler

type UserHandler struct {
}

func (*UserHandler) GetStruct

func (h *UserHandler) GetStruct() (base.NodeData, base.NodeMeta)

func (*UserHandler) PostInsert

func (h *UserHandler) PostInsert(node *base.Node, m base.NodeManager) error

func (*UserHandler) PostUpdate

func (h *UserHandler) PostUpdate(node *base.Node, m base.NodeManager) error

func (*UserHandler) PreInsert

func (h *UserHandler) PreInsert(node *base.Node, m base.NodeManager) error

func (*UserHandler) PreUpdate

func (h *UserHandler) PreUpdate(node *base.Node, m base.NodeManager) error

func (*UserHandler) Validate

func (h *UserHandler) Validate(node *base.Node, m base.NodeManager, errors base.Errors)

type UserMeta

type UserMeta struct {
	PasswordCost int    `json:"password_cost"`
	PasswordAlgo string `json:"password_algo"`
}

Jump to

Keyboard shortcuts

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