httpUtils

package
v0.0.0-...-cd133ac Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindAndValidate

func BindAndValidate(ctx echo.Context, v interface{}) error

func NewBadRequest

func NewBadRequest(err interface{}) error

func NewError

func NewError(statusCode int, msg string) error

func NewForbiden

func NewForbiden(err interface{}) error

func NewInternalServerError

func NewInternalServerError(err error) error

func NewNotFoundError

func NewNotFoundError(msg string) error

func NewStatusUnprocessableEntity

func NewStatusUnprocessableEntity(msg string) error

func NewUnauthorized

func NewUnauthorized(msg string) error

Types

type Error

type Error struct {
	Errors map[string]interface{} `json:"errors"`
}

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator() *Validator

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

Jump to

Keyboard shortcuts

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