requests

package
v0.0.0-...-fd201ba Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthEmailOTPResend

type AuthEmailOTPResend struct {
	Email string `json:"email" binding:"required,email" example:"john.doe@gmail.com"`
}

type AuthEmailOTPVerify

type AuthEmailOTPVerify struct {
	Email string `json:"email" binding:"required,email" example:"john.doe@gmail.com"`
	Token string `json:"token" binding:"required,token_length" example:"123456"`
}

type AuthLogin

type AuthLogin struct {
	Email    string `json:"email" binding:"required,email" example:"john.doe@gmail.com"`
	Password string `json:"password" binding:"required,password_complexity" example:"QWer123!@#"`
}

type AuthRegister

type AuthRegister struct {
	FirstName         *string `json:"firstName" binding:"required,regex_alpha,min=2,max=64" example:"john"`
	LastName          *string `json:"lastName" binding:"required,regex_alpha,min=2,max=64" example:"doe"`
	Email             string  `json:"email" binding:"required,email" example:"john.doe@gmail.com"`
	Password          string  `json:"password" binding:"required,min=8,max=64,password_complexity" example:"QWer123!@#"`
	ConfirmedPassword string  `json:"confirmedPassword" binding:"required,eqfield=Password" example:"QWer123!@#"`
	Gender            string  `json:"gender" binding:"required,oneof=MALE FEMALE OTHER PREFER_NOT_TO_SAY" example:"PREFER_NOT_TO_SAY"`
}

func (AuthRegister) ToUserDomain

func (r AuthRegister) ToUserDomain() domain.User

type AuthorizeRequest

type AuthorizeRequest struct {
	RequiredPermissions []domain.PermissionKeyType `json:"requiredPermissions"`
}

type CreateUserRequest

type CreateUserRequest struct {
	FirstName *string               `form:"firstName" binding:"required,regex_alpha,min=2,max=64" example:"John"`
	LastName  *string               `form:"lastName" binding:"required,regex_alpha,min=2,max=64" example:"Doe"`
	Email     string                `form:"email" binding:"required,email" example:"john.doe@gmail.com"`
	Avatar    *multipart.FileHeader `form:"avatar" binding:"required" swaggerignore:"true"`
	Gender    string                `form:"gender" binding:"required,oneof=MALE FEMALE OTHER PREFER_NOT_TO_SAY" example:"PREFER_NOT_TO_SAY"`
}

func (CreateUserRequest) ToUserDomain

func (r CreateUserRequest) ToUserDomain() domain.User

type ForgetPassword

type ForgetPassword struct {
	Email string `json:"email" binding:"required,email" example:"john@doe.com"`
}

type GoogleAuth

type GoogleAuth struct {
	Email       string `json:"email" binding:"required,email" example:"john.doe@gmail.com"`
	AccessToken string `json:"accessToken" binding:"required" example:"123456789"`
}
type Header struct {
	UserID uint64 `header:"userID" binding:"required,number"`
	JTI    string `header:"jti" binding:"required,uuid"`
	EXP    int64  `header:"exp" binding:"required"`
}

type ResetPassword

type ResetPassword struct {
	Email             string `json:"email" binding:"required,email" example:"john@doe.com"`
	Token             string `json:"token" binding:"required,token_length" example:"123456"`
	Password          string `json:"password" binding:"required,password_complexity" example:"QWer123!@#"`
	ConfirmedPassword string `json:"confirmedPassword" binding:"required,eqfield=Password" example:"QWer123!@#"`
}

type RoleCreate

type RoleCreate struct {
	Title       string `json:"title" binding:"required,min=3,max=64,role_title" example:"admin"`
	Description string `json:"description" binding:"required,min=5" example:"admin access to user management, permission management, etc"`
}

type RoleUUIDUri

type RoleUUIDUri struct {
	UUIDStr string `uri:"roleID" binding:"required,uuid" example:"8f4a1582-6a67-4d85-950b-2d17049c7385"`
}

type RoleUpdate

type RoleUpdate struct {
	Title       string `json:"title" binding:"required,min=3,max=64,role_title" example:"admin"`
	Description string `json:"description" binding:"required,min=5" example:"admin access to user management, permission management, etc"`
}

type SyncPermissions

type SyncPermissions struct {
	Permissions []string `` /* 131-byte string literal not displayed */
}

type TOTPDisableRequest

type TOTPDisableRequest struct {
	Code string `json:"code" binding:"required,min=6,max=6" example:"123456"`
}

type TOTPEnableRequest

type TOTPEnableRequest struct {
	Code string `json:"code" binding:"required,min=6,max=6" example:"123456"`
}

type UserUUIDUri

type UserUUIDUri struct {
	UUIDStr string `uri:"userID" binding:"required,uuid" example:"8f4a1582-6a67-4d85-950b-2d17049c7385"`
}

Jump to

Keyboard shortcuts

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