domain

package
v0.0.0-...-cc09eb9 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USER_ROLE_ADMINISTRATOR uint64 = 4
	USER_ROLE_WEBMASTER     uint64 = 3
	USER_ROLE_GUEST         uint64 = 2
	USER_ROLE_BANNED        uint64 = 1
)

User Role constants

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID             uint64 `json:"userID"`
	Group          uint64 `json:"userGroup"`
	SocialID       string `json:"userSocialID"`
	NameFirst      string `json:"userNameFirst"`
	NameLast       string `json:"userNameLast"`
	AvatarPath     string `json:"userAvatarPath"`
	Email          string `json:"userEmail"`
	AccessToken    string `json:"-"`
	LastAccessTime string `json:"userLastAccessTime"`
	Role           uint64 `json:"userRole"`
	RoleDesc       string `json:"userRoleDesc"`
	Type           uint64 `json:"userType"`
	TypeDesc       string `json:"userTypeDesc"`
}

User struct

func (*User) DecodeMsgpack

func (u *User) DecodeMsgpack(d *msgpack.Decoder) error

User struct: msgpack decoder

func (*User) EncodeMsgpack

func (u *User) EncodeMsgpack(e *msgpack.Encoder) error

User struct: msgpack encoder

func (*User) ToJSON

func (user *User) ToJSON() string

Stringify user struct

type UserAuth

type UserAuth struct {
	ID   uint64
	Hash string
}

User auth struct

func NewUserAuthFromString

func NewUserAuthFromString(str string) (*UserAuth, error)

User auth string parser (format: userID:userGroup:hash)

type UserCreateDTO

type UserCreateDTO struct {
	Group       uint64
	SocialID    string
	NameFirst   string
	NameLast    string
	AvatarPath  string
	Email       string
	AccessToken string
	Role        uint64
	Type        uint64
}

UserUpdateDTO struct

type UserFindAllDTO

type UserFindAllDTO struct {
	Search *string
	Role   *uint64
	Page   *uint64
}

UserFindAllDTO struct

type UserFindOneBySocialIDDTO

type UserFindOneBySocialIDDTO struct {
	SocialID string
	Type     uint64
}

UserFindOneBySocialIDDTO struct

type UserRole

type UserRole struct {
	ID   uint64 `json:"roleID"`
	Role string `json:"roleDesc"`
	Sort uint64 `json:"roleSort"`
}

UserRole struct

func (*UserRole) DecodeMsgpack

func (r *UserRole) DecodeMsgpack(d *msgpack.Decoder) error

UserRole struct: msgpack decoder

func (*UserRole) EncodeMsgpack

func (r *UserRole) EncodeMsgpack(e *msgpack.Encoder) error

UserRole struct: msgpack encoder

func (*UserRole) ToJSON

func (r *UserRole) ToJSON() string

Stringify UserRole struct

type UserRoles

type UserRoles []UserRole

UserRoles struct

func (*UserRoles) ToJSON

func (r *UserRoles) ToJSON() string

Stringify UserRoles struct

type UserSignInDTO

type UserSignInDTO struct {
	NameFirst   string
	NameLast    string
	AvatarPath  string
	Email       string
	AccessToken string
}

UserSignInDTO struct

type UserType

type UserType struct {
	ID   uint64 `json:"typeID"`
	Type string `json:"typeDesc"`
}

UserType struct

func (*UserType) DecodeMsgpack

func (t *UserType) DecodeMsgpack(d *msgpack.Decoder) error

UserType struct: msgpack decoder

func (*UserType) EncodeMsgpack

func (t *UserType) EncodeMsgpack(e *msgpack.Encoder) error

UserType struct: msgpack encoder

func (*UserType) ToJSON

func (t *UserType) ToJSON() string

Stringify UserType struct

type UserTypes

type UserTypes []UserType

UserTypes struct

func (*UserTypes) ToJSON

func (t *UserTypes) ToJSON() string

Stringify UserTypes struct

type UserUpdateDTO

type UserUpdateDTO struct {
	Group       *uint64
	SocialID    *string
	NameFirst   *string
	NameLast    *string
	AvatarPath  *string
	Email       *string
	AccessToken *string
	LastAccess  *string
	Role        *uint64
	Type        *uint64
}

UserUpdateDTO struct

type Users

type Users []User

Users struct

func (*Users) GetCondsByType

func (users *Users) GetCondsByType(aType uint64) fiber.Map

Get users conditions by type to map

func (*Users) ToJSON

func (users *Users) ToJSON() string

Stringify users struct

Jump to

Keyboard shortcuts

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