models

package
v0.0.0-...-cfa0982 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseCreated

func ResponseCreated(c *fiber.Ctx, message interface{}) error

ResponseCreated Set response for created process

func ResponseDeleted

func ResponseDeleted(c *fiber.Ctx, message interface{}) error

ResponseDeleted Set response for delete process

func ResponseError

func ResponseError(c *fiber.Ctx, message interface{}, statusCode int) error

ResponseError Set response for delete process

func ResponseFailValidation

func ResponseFailValidation(c *fiber.Ctx, message interface{})

ResponseFailValidation Set response for fail validation

func ResponseJSON

func ResponseJSON(c *fiber.Ctx, data interface{}) error

ResponseJSON ...

func ResponseMethodNotAllowed

func ResponseMethodNotAllowed(c *fiber.Ctx, message string)

func ResponseNotFound

func ResponseNotFound(c *fiber.Ctx, message string)

func ResponsePagination

func ResponsePagination(c *fiber.Ctx, data Pagination) error

ResponsePagination ...

func ResponseRedirect

func ResponseRedirect(c *fiber.Ctx, url string)

func ResponseUnauthorized

func ResponseUnauthorized(c *fiber.Ctx, message string)

func ResponseUpdated

func ResponseUpdated(c *fiber.Ctx, message interface{}) error

ResponseUpdated Set response for update process

Types

type JwtCustomClaims

type JwtCustomClaims struct {
	ID       int64
	Username string
}

JwtCustomClaims

type Pagination

type Pagination struct {
	TotalRecords int         `json:"totalRecords"`
	TotalPages   int         `json:"totalPages"`
	Data         interface{} `json:"data"`
	Offset       int         `json:"offset"`
	Limit        int         `json:"Limit"`
	Page         int         `json:"page"`
	PrevPage     int         `json:"prevPage"`
	NextPage     int         `json:"nextPage"`
}

Pagination

type ReqCreateDiary

type ReqCreateDiary struct {
	DatePost string `json:"datePost"`
	Title    string `json:"title"`
	BodyText string `json:"bodyText"`
}

type ReqUpdateDiary

type ReqUpdateDiary struct {
	DatePost string `json:"datePost"`
	Title    string `json:"title"`
	BodyText string `json:"bodyText"`
}

type ReqUserLogin

type ReqUserLogin struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
	DeviceID string `json:"deviceID" binding:"required"`
}

ReqUserLogin ...

type ReqUserRegister

type ReqUserRegister struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
	Email    string `json:"email" binding:"required"`
	Birthday string `json:"birthday" binding:"required"`
	Fullname string `json:"fullname" binding:"required"`
}

ReqUserRegister ...

type ResponseErrors

type ResponseErrors struct {
	Error errorResponse `json:"error"`
}

ResponseErrors model for swagger

type ResponseSuccess

type ResponseSuccess struct {
	Data struct{} `json:"data"`
}

ResponseSuccess model for swagger

type ResponseSuccessArray

type ResponseSuccessArray struct {
	Data []struct{} `json:"data"`
}

ResponseSuccessArray model for swagger

type UserClaims

type UserClaims struct {
	ID       int64  `json:"userID"`
	Username string `json:"username"`
	jwt.StandardClaims
}

UserClaims ...

Jump to

Keyboard shortcuts

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