response

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Status bool        `json:"success"`
	Data   interface{} `json:"data"`
	Errors []string    `json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func New

func ReadAllDecode

func ReadAllDecode(in io.Reader) (r *Response, err error)

func (*Response) AddData

func (r *Response) AddData(data interface{}) *Response

func (*Response) AddError

func (r *Response) AddError(err error) *Response

func (*Response) Failed

func (r *Response) Failed() *Response

func (*Response) Send

func (r *Response) Send(code int)

func (*Response) Success

func (r *Response) Success() *Response

Jump to

Keyboard shortcuts

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