Documentation
¶
Index ¶
- Constants
- func Provide(fn func(ContextExtended) error) func(ctx echo.Context) error
- type ContextExtended
- func (c ContextExtended) BadRequest(message string) *echo.HTTPError
- func (c ContextExtended) BadRequestf(format string, a ...interface{}) *echo.HTTPError
- func (c ContextExtended) InternalServerError(err error, message string) *echo.HTTPError
- func (c ContextExtended) NotFound(message string) *echo.HTTPError
- func (c ContextExtended) NotFoundf(format string, a ...interface{}) *echo.HTTPError
- func (c ContextExtended) Page() int
- func (c ContextExtended) PageOffsetLimit() (int, int, int)
- func (c ContextExtended) ParamInt64(name string) (int64, error)
- func (c ContextExtended) ParamStr(name string) string
- func (c ContextExtended) QueryParamInt(name string) (int, error)
- func (c ContextExtended) QueryParamInt64SliceWithComma(name string) ([]int64, error)
- func (c ContextExtended) QueryParamStr(name string) string
- func (c ContextExtended) Success(data interface{}) error
- type ErrorResponse
- type Pagination
- type SuccessResponse
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 Pagination ¶
func NewPagination ¶
func NewPagination(page int, count int64) *Pagination
type SuccessResponse ¶
type SuccessResponse struct {
OK bool `json:"ok"`
}
Click to show internal directories.
Click to hide internal directories.