gw

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataReturn

func DataReturn(data interface{}) []byte

Return success data.

func ErrorReturn

func ErrorReturn(errType types.XnsError, errMsg string) []byte

Return error data.

func HttpResponseByte

func HttpResponseByte(res HttpResponse) []byte

Types

type GWServer

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

func NewGWServer

func NewGWServer() *GWServer

func (*GWServer) GetMux

func (g *GWServer) GetMux() *chi.Mux

func (*GWServer) MuxAppend

func (g *GWServer) MuxAppend(mux *chi.Mux) *GWServer

func (*GWServer) MuxSwagger

func (g *GWServer) MuxSwagger() *GWServer

type HttpResponse

type HttpResponse struct {
	ResCode uint64      `json:"res_code"`
	ResMsg  string      `json:"res_msg"`
	ResData interface{} `json:"res_data"`
}

Jump to

Keyboard shortcuts

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