gorillautil

package
v3.2.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0, MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

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

func NewAutoMehtodName

func NewAutoMehtodName(ctx context.Context, w http.ResponseWriter) *Response

create response

func (*Response) SendJson

func (gr *Response) SendJson(data interface{})

send json data to server

func (*Response) SendJsonHttpReplyError

func (gr *Response) SendJsonHttpReplyError(err error)

send err data

func (*Response) SendJsonHttpReplySuccess

func (gr *Response) SendJsonHttpReplySuccess(data interface{})

send json data with success code

func (*Response) SetHttpStatus

func (gr *Response) SetHttpStatus(httpStatus int64) *Response

default status is 200

Jump to

Keyboard shortcuts

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