httpprotocol

package
v0.0.0-...-69f8143 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeForwardSuccessResult

func EncodeForwardSuccessResult(w http.ResponseWriter, body []byte)

func EncodeResult

func EncodeResult(w http.ResponseWriter, result *Result)

func ResponceFailedMsg

func ResponceFailedMsg(w http.ResponseWriter, msg string)

func ResponceSuccess

func ResponceSuccess(w http.ResponseWriter)

func ResponceSuccessWithBody

func ResponceSuccessWithBody(w http.ResponseWriter, result interface{})

Types

type Result

type Result struct {
	Code   int
	Result interface{}
}

func Failed

func Failed(err error) *Result

here use costom define code

func Succeed

func Succeed() *Result

func SucceedWithResult

func SucceedWithResult(result interface{}) *Result

Jump to

Keyboard shortcuts

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