resp

package
v0.0.0-...-2cea6d0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 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 HttpBody

type HttpBody struct {
	Data interface{} `json:"data"`
}

func NewHttpBody

func NewHttpBody(data interface{}) HttpBody

type Response

type Response struct {
	StatusCode int    `json:"-"`
	Message    string `json:"message"`
	Error      error  `json:"-"`
}

func NewResponse

func NewResponse(statusCode int, message string, err error) Response

func (Response) HttpJSON

func (r Response) HttpJSON(w http.ResponseWriter, body interface{})

Jump to

Keyboard shortcuts

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