response

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int         `json:"code"`
	Message interface{} `json:"message"`
}

func NewError

func NewError(code int, message string) Error

func NewErrorCode

func NewErrorCode(errCode string) Error

func ValidateError added in v0.0.2

func ValidateError(code int, err error, req interface{}) Error

func (Error) Error

func (e Error) Error() string

type Success

type Success struct {
	Code int         `json:"code"`
	Data interface{} `json:"data"`
}

func NewSuccess

func NewSuccess(data interface{}) Success

Jump to

Keyboard shortcuts

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