model

package
v0.0.0-...-e92e447 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingRequiredParams = errors.New("missing required params")
)
View Source
var (
	ErrNoRowsAffected = errors.New("no affected rows")
)

Functions

This section is empty.

Types

type BasicUserInformation

type BasicUserInformation struct {
	UserID          gtypes.UUID `json:"user_id,omitempty"`
	Name            string      `json:"name,omitempty"`
	Country         string      `json:"country,omitempty"`
	DefaultLanguage string      `json:"default_language,omitempty"`
	Email           string      `json:"email,omitempty"`
	Phones          []string    `json:"phones,omitempty"`
}

type CreateUserRequestV1

type CreateUserRequestV1 struct {
	Name            string   `json:"name"`
	Country         string   `json:"country"`
	DefaultLanguage string   `json:"default_language,omitempty"`
	Email           string   `json:"email"`
	Phones          []string `json:"phones"`
	Password        string   `json:"password"`
}

func (*CreateUserRequestV1) Validate

func (cur *CreateUserRequestV1) Validate() error

type CreateUserResponseV1

type CreateUserResponseV1 struct {
	BasicUserInformation
}

type DBUser

type DBUser struct {
	UserID          gtypes.UUID `db:"user_id"`
	Name            string      `db:"name"`
	Country         string      `db:"country"`
	DefaultLanguage string      `db:"default_language"`
	Email           string      `db:"email"`
	ConfirmedEmail  bool        `db:"confirmed_email"`
	Phones          []string    `db:"phones"`
	Password        string      `db:"password"`
	CreatedAt       *time.Time  `db:"created_at"`
	UpdatedAt       *time.Time  `db:"updated_at"`
	DeletedAt       *time.Time  `db:"deleted_at"`
}

type DeactivateUserRequestV1

type DeactivateUserRequestV1 struct {
	UserID *string `json:"user_id,omitempty"`
	Email  *string `json:"email,omitempty"`
}

func (*DeactivateUserRequestV1) Validate

func (dur *DeactivateUserRequestV1) Validate() error

type GetUserRequestV1

type GetUserRequestV1 struct {
	UserID *string `json:"user_id,omitempty"`
	Email  *string `json:"email,omitempty"`
}

func (*GetUserRequestV1) Validate

func (gur *GetUserRequestV1) Validate() error

type GetUserResponseV1

type GetUserResponseV1 struct {
	BasicUserInformation
}

Jump to

Keyboard shortcuts

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