dtos

package
v0.0.0-...-ada90c4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	UserName  string `json:"username"`
	Bio       string `json:"bio"`
	Image     string `json:"image"`
	Following bool   `json:"following"`
}

type ProfileData

type ProfileData struct {
	Profile Profile `json:"profile"`
}

type ProfileRequest

type ProfileRequest struct {
	UserID   int64
	Email    string
	UserName string `param:"username"`
}

func (ProfileRequest) Validate

func (p ProfileRequest) Validate() error

type UpdateUserRequest

type UpdateUserRequest struct {
	UserID      int64  `json:"-"`
	Fullname    string `json:"fullname"`
	PhoneNumber string `json:"phone_number"`
	UserType    string `json:"user_type"`
	Email       string `json:"email"`
	Password    string `json:"password"`
	UpdateBy    string `json:"-"`
}

func (UpdateUserRequest) Validate

func (cup UpdateUserRequest) Validate() error

type UpdateUserStatusRequest

type UpdateUserStatusRequest struct {
	UserID   int64  `json:"-"`
	UpdateBy string `json:"-"`
	Status   int    `json:"status"`
}

func (UpdateUserStatusRequest) Validate

func (ussp UpdateUserStatusRequest) Validate() error

type User

type User struct {
	UserName string `json:"username"`
	Email    string `json:"email"`
	Password string `json:"password,omitempty"`
	Token    string `json:"token"`
	Image    string `json:"image"`
	Bio      string `json:"bio,"`
}

type UserData

type UserData struct {
	Data User `json:"user"`
}

func (UserData) ValidateCreate

func (x UserData) ValidateCreate() error

func (UserData) ValidateLogin

func (x UserData) ValidateLogin() error

Jump to

Keyboard shortcuts

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