response

package
v0.0.0-...-50a15a0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body map[string]interface{}

func NewResponse

func NewResponse(data interface{}, kv ...interface{}) Body

type BodyName

type BodyName interface {
	BodyName() string
}

type ErrorResponse

type ErrorResponse struct {
	Status      int    `json:"status,omitempty"`
	Err         string `json:"error"`
	Description string `json:"error_description"`
}

func ErrJson

func ErrJson(message string, err error) ErrorResponse

func ErrJsonWithStatus

func ErrJsonWithStatus(status int, message string, err error) ErrorResponse

func (ErrorResponse) Error

func (e ErrorResponse) Error() string

func (ErrorResponse) IsError

func (e ErrorResponse) IsError() bool

Jump to

Keyboard shortcuts

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