ginutil

package
v0.0.0-...-7b3ddb2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

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, monitor monitoring.Monitor) *Response

func NewAutoMehtodName

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

func (*Response) SendJson

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

func (*Response) SendJsonHttpReplyError

func (this *Response) SendJsonHttpReplyError(err error)

func (*Response) SendJsonHttpReplySuccess

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

func (*Response) SetHttpStatus

func (this *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