helpers

package
v0.0.0-...-d7a48c5 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBody

func CreateBody(rawBody interface{}) (body io.Reader, err error)

func Paginate

func Paginate(paginationParams *models.Pagination) (offset int, pageSize int)

func ParseBody

func ParseBody(r *http.Request, x interface{}) (errCode int, err error)

func RespondWithError

func RespondWithError(w http.ResponseWriter, code int, message string)

func RespondWithJSON

func RespondWithJSON(w http.ResponseWriter, code int, payload interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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