serializers

package
v0.0.0-...-de20da1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginResponse

type LoginResponse struct {
	Name         string `json:"name""`
	Email        string `json:"email"`
	Token        string `json:"token"`
	RefreshToken string `json:"refresh_token"`
}

type LoginSerializer

type LoginSerializer struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type LoginUserSerializer

type LoginUserSerializer struct {
	ID       uint   `json:"id"`
	Name     string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"password"`
	IsActive int    `json:"is_active"`
}

type OTPSerializer

type OTPSerializer struct {
	IsOTP bool   `json:"is_otp"`
	Code  string `json:"code"`
}

type RegisterSerializer

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

type Role

type Role struct {
	RoleName string `json:"role_name"`
}

type RoleResponse

type RoleResponse struct {
	ID       uint   `json:"id"`
	RoleName string `json:"role_name"`
}

type User

type User struct {
	Name         string `json:"name"`
	Email        string `json:"email"`
	Password     string `json:"password"`
	IsActive     int    `json:"is_active"`
	Token        string `json:"token"`
	RefreshToken string `json:"refresh_token"`
}

func (*User) UserResponse

func (u *User) UserResponse() *LoginResponse

type VerifyOTPSerializer

type VerifyOTPSerializer struct {
	Code string `json:"code"`
}

Jump to

Keyboard shortcuts

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