response

package
v0.0.0-...-d880922 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParameterInvalid = errors.New("parameter invalid")

	ErrInvalidInput = errors.New("invalid input")
)

Functions

This section is empty.

Types

type Error

type Error struct {
	Errors []string `json:"errors"`
	// contains filtered or unexported fields
}

func NewError

func NewError(err error, status int) *Error

func NewErrorMessage

func NewErrorMessage(messages []string, status int) *Error

func (Error) Send

func (e Error) Send(w http.ResponseWriter) error

type Success

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

func NewSuccess

func NewSuccess(result interface{}, status int) Success

func (Success) Send

func (r Success) Send(w http.ResponseWriter) error

Jump to

Keyboard shortcuts

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