ginutil

package
v0.0.0-...-927e444 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Timeout    = "timeout"
	CancelFunc = "__cancelFunc"
	Ctx        = "__ctx"
	Start      = "__start_time"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GinServer

type GinServer struct {
	Server *http.Server
}

func NewGinServer

func NewGinServer(ginRouter *gin.Engine, ip string, port uint16) *GinServer

func (*GinServer) Run

func (this *GinServer) Run() error

func (GinServer) Stop

func (this GinServer) Stop()

type Response

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

func New

func New(ginContext *gin.Context, m monitoring.Monitor) *Response

func NewAutoMehtodName

func NewAutoMehtodName(ginContext *gin.Context, m monitoring.Monitor) *Response

func (*Response) Error

func (resp *Response) Error() error

func (*Response) Fail

func (resp *Response) Fail(err error)

func (*Response) Send

func (resp *Response) Send(data entity.ProtoResp)

func (*Response) SendJson

func (resp *Response) SendJson(obj interface{})

Jump to

Keyboard shortcuts

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