hr

package
v2.0.0-...-5918b2a Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	Content       interface{} `json:"content"`
	TotalElements int64       `json:"totalElements"`
	TotalPages    int64       `json:"totalPages"`
}

func NewPage

func NewPage(content interface{}, totalElements int64, totalPages int64) Page

func ObtainPageResponse

func ObtainPageResponse(content interface{}, page int64, total int64, size int64) (response Page)

type Response

type Response struct {
	Code string      `json:"status"`
	Msg  string      `json:"message"`
	Data interface{} `json:"data"`
}

func NewBadRequest

func NewBadRequest(msg string) Response

NewResult create new successful result

func NewForbiddenResult

func NewForbiddenResult(msg string) Response

func NewResult

func NewResult(data interface{}, c string, msg string) Response

NewResult create new result

func NewServerInternalErrorResult

func NewServerInternalErrorResult(err interface{}) Response

func NewSuccessfulResult

func NewSuccessfulResult(data interface{}) Response

NewResult create new successful result

func NewUnauthorizedResult

func NewUnauthorizedResult(msg string) Response

func ObtainSuccessfulResult

func ObtainSuccessfulResult(content interface{}, page int64, total int64, size int64) Response

func ObtainSuccessfulResultWithData

func ObtainSuccessfulResultWithData(data interface{}) Response

type ServicePage

type ServicePage struct {
	Content       []interface{} `json:"list"`
	TotalElements int64         `json:"totalElements"`
	TotalPages    int64         `json:"totalPages"`
}

Jump to

Keyboard shortcuts

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