dto

package
v0.0.0-...-19cc336 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadRequestError

type BadRequestError struct {
	Message string
}

func (BadRequestError) Error

func (e BadRequestError) Error() string

type Claims

type Claims struct {
	UserID  uint
	IsAdmin bool
	jwt.StandardClaims
}

type ForbiddenError

type ForbiddenError struct {
	Message string
}

func (ForbiddenError) Error

func (e ForbiddenError) Error() string

type HttpAccessTokenSuccess

type HttpAccessTokenSuccess struct {
	Status string `json:"status"`
	Token  string `json:"token"`
}

type HttpFailure

type HttpFailure struct {
	Status string `json:"status"`
	Error  error  `json:"error"`
}

type HttpFailures

type HttpFailures struct {
	Status string  `json:"status"`
	Errors []error `json:"errors"`
}

type HttpSuccess

type HttpSuccess struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

type HttpUserSuccess

type HttpUserSuccess struct {
	Status string      `json:"status"`
	User   UserViewDto `json:"user"`
}

type HttpUsersSuccess

type HttpUsersSuccess struct {
	Status string         `json:"status"`
	Users  []*UserViewDto `json:"users"`
}

type InternalServerError

type InternalServerError struct {
	Message string
}

func (InternalServerError) Error

func (e InternalServerError) Error() string

type UserCreateDto

type UserCreateDto struct {
	Name     string `json:"name"`
	Age      uint8  `json:"age"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

UserViewDto - A dto of the User type for creation

type UserLoginDto

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

UserViewDto - A dto of the User type for creation

type UserUpdateDto

type UserUpdateDto struct {
	Name     string `json:"name"`
	Age      uint8  `json:"age"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

UserViewDto - A dto of the User type for updating

type UserViewDto

type UserViewDto struct {
	ID        uint      `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	Name      string    `json:"name"`
	Age       uint8     `json:"age"`
	Email     string    `json:"email"`
}

UserViewDto - A dto of the User type for viewing

Jump to

Keyboard shortcuts

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