response

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoUserArg = errors.New("username argument missing")
	ErrNoUser    = errors.New("username does not exist")
)

Functions

This section is empty.

Types

type Response

type Response struct {
	StatusCode int                    `json:"statusCode,omitempty"`
	Headers    map[string]string      `json:"headers,omitempty"`
	Body       map[string]interface{} `json:"body,omitempty"`
}

func ClientErrResponse

func ClientErrResponse(msg_optional ...string) *Response

only first provided arg will be used. (OPTIONAL)

func NewResponse

func NewResponse(statusCode int, body map[string]interface{}) *Response

func OkJsonReponse

func OkJsonReponse(body map[string]interface{}) *Response

func OkMsgResponse

func OkMsgResponse(msg_optional ...string) *Response

only first provided arg will be used. (OPTIONAL)

func OkResponse

func OkResponse() *Response

func ServerErrResponse

func ServerErrResponse(msg_optional ...string) *Response

only first provided arg will be used. (OPTIONAL)

Jump to

Keyboard shortcuts

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