user

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusSliceToJSON

func StatusSliceToJSON(in []Status) json.RawMessage

func UserSliceToJSON

func UserSliceToJSON(e []User) json.RawMessage

func UserToJSON

func UserToJSON(e User) json.RawMessage

func UserTypeSliceToJSON

func UserTypeSliceToJSON(in []UserType) json.RawMessage

Types

type Status

type Status int64
const (
	STATUS_INVALID Status = iota
	STATUS_ACTIVE
	STATUS_DISABLED
)

func JSONToStatusSlice

func JSONToStatusSlice(in json.RawMessage) []Status

func StatusFromPointerString

func StatusFromPointerString(in *string) Status

func StatusFromString

func StatusFromString(in string) Status

func (Status) String

func (e Status) String() string

func (Status) StringPtr

func (e Status) StringPtr() *string

func (Status) ToInt64

func (e Status) ToInt64() int64

type User

type User struct {
	UUID        uuid.UUID `json:"uuid"`
	Identifier  string    `json:"identifier"`
	Name        string    `json:"name"`
	LastName    string    `json:"last_name"`
	Email       string    `json:"email"`
	UserType    UserType  `json:"user_type"`
	CountryIos2 string    `json:"country_ios2"`
	Locale      string    `json:"locale"`
	Metadata    string    `json:"metadata"`
	Status      Status    `json:"status"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

func NewUserSliceWithRandomValues

func NewUserSliceWithRandomValues(n int) []User

func NewUserWithRandomValues

func NewUserWithRandomValues() User

func UserFromJSON

func UserFromJSON(data json.RawMessage) User

func UserSliceFromJSON

func UserSliceFromJSON(data json.RawMessage) []User

func (User) ArrayFieldIdentifierToType

func (e User) ArrayFieldIdentifierToType() map[string]types.FieldType

func (User) DependantFieldIdentifierToTypeMap

func (e User) DependantFieldIdentifierToTypeMap() map[string]map[string]types.FieldType

func (User) EntityIdentifier

func (e User) EntityIdentifier() string

func (User) FieldIdentfierToTypeMap

func (e User) FieldIdentfierToTypeMap() map[string]types.FieldType

func (User) IsDependant

func (e User) IsDependant() bool

func (User) PrimaryKeyIdentifier

func (e User) PrimaryKeyIdentifier() string

func (User) PrimaryKeyValue

func (e User) PrimaryKeyValue() string

func (User) String

func (e User) String() string

func (User) ToJSON

func (e User) ToJSON() json.RawMessage

type UserType

type UserType int64
const (
	USER_TYPE_INVALID UserType = iota
	USER_TYPE_ADMIN
	USER_TYPE_REGULAR
)

func JSONToUserTypeSlice

func JSONToUserTypeSlice(in json.RawMessage) []UserType

func UserTypeFromPointerString

func UserTypeFromPointerString(in *string) UserType

func UserTypeFromString

func UserTypeFromString(in string) UserType

func (UserType) String

func (e UserType) String() string

func (UserType) StringPtr

func (e UserType) StringPtr() *string

func (UserType) ToInt64

func (e UserType) ToInt64() int64

Jump to

Keyboard shortcuts

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