http

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ItemsPerPage = 20

Variables

This section is empty.

Functions

func Provide

func Provide(fn func(ContextExtended) error) func(ctx echo.Context) error

Types

type ContextExtended

type ContextExtended struct {
	echo.Context
}

func (ContextExtended) BadRequest

func (c ContextExtended) BadRequest(message string) *echo.HTTPError

func (ContextExtended) BadRequestf

func (c ContextExtended) BadRequestf(format string, a ...interface{}) *echo.HTTPError

func (ContextExtended) InternalServerError

func (c ContextExtended) InternalServerError(err error, message string) *echo.HTTPError

func (ContextExtended) NotFound

func (c ContextExtended) NotFound(message string) *echo.HTTPError

func (ContextExtended) NotFoundf

func (c ContextExtended) NotFoundf(format string, a ...interface{}) *echo.HTTPError

func (ContextExtended) Page

func (c ContextExtended) Page() int

func (ContextExtended) PageOffsetLimit

func (c ContextExtended) PageOffsetLimit() (int, int, int)

func (ContextExtended) ParamInt64

func (c ContextExtended) ParamInt64(name string) (int64, error)

func (ContextExtended) ParamStr

func (c ContextExtended) ParamStr(name string) string

func (ContextExtended) QueryParamInt

func (c ContextExtended) QueryParamInt(name string) (int, error)

func (ContextExtended) QueryParamInt64SliceWithComma

func (c ContextExtended) QueryParamInt64SliceWithComma(name string) ([]int64, error)

func (ContextExtended) QueryParamStr

func (c ContextExtended) QueryParamStr(name string) string

func (ContextExtended) Success

func (c ContextExtended) Success(data interface{}) error

type ErrorResponse

type ErrorResponse struct {
	OK      bool   `json:"ok"`
	Message string `json:"message"`
}

type Pagination

type Pagination struct {
	Page       int `json:"page"`
	TotalPages int `json:"totalPages"`
}

func NewPagination

func NewPagination(page int, count int64) *Pagination

type SuccessResponse

type SuccessResponse struct {
	OK bool `json:"ok"`
}

Jump to

Keyboard shortcuts

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