dtos

package
v0.0.0-...-855d15e Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthLoginApiRes

type AuthLoginApiRes struct {
	Success        bool                    `json:"success"`
	Message        string                  `json:"message"`
	Data           *AuthResData            `json:"data"`
	StatusCode     int                     `json:"statusCode"`
	AdditionalInfo *map[string]interface{} `json:"additionalInfo"`
}

type AuthLoginReqData

type AuthLoginReqData struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

Login

func (*AuthLoginReqData) Validate

func (data *AuthLoginReqData) Validate() error

type AuthRegisterApiRes

type AuthRegisterApiRes struct {
	Success        bool                    `json:"success"`
	Message        string                  `json:"message"`
	Data           *AuthResData            `json:"data"`
	StatusCode     int                     `json:"statusCode"`
	AdditionalInfo *map[string]interface{} `json:"additionalInfo"`
}

type AuthRegisterReqData

type AuthRegisterReqData struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,min=8,max=32"`
}

Register

func (*AuthRegisterReqData) ToUser

func (data *AuthRegisterReqData) ToUser() (*models.User, error)

func (*AuthRegisterReqData) Validate

func (data *AuthRegisterReqData) Validate() error

type AuthResData

type AuthResData struct {
	Id    uuid.UUID `json:"id"`
	Email string    `json:"email"`
	Token string    `json:"token"`
}

type UserPasswordUpdateReqData

type UserPasswordUpdateReqData struct {
	OldPassword string `json:"oldPassword" validate:"required"`
	NewPassword string `json:"newPassword" validate:"required"`
}

func (*UserPasswordUpdateReqData) Validate

func (data *UserPasswordUpdateReqData) Validate() error

type UserResData

type UserResData struct {
	Id    string `json:"id"`
	Email string `json:"email"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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