gin

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestIDKey = "request_id"
)

Variables

This section is empty.

Functions

func RegisterHandle

func RegisterHandle(method Handler) func(*Context)

Types

type Code

type Code interface {
	Code() int64
}

type Context

type Context = gin.Context

type Engine

type Engine = gin.Engine

type Gin

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

func NewGinServer

func NewGinServer() *Gin

func (*Gin) Host

func (s *Gin) Host(host string) *Gin

func (*Gin) Start

func (s *Gin) Start(ctx context.Context) error

func (*Gin) Stop

func (s *Gin) Stop(ctx context.Context) error

type Handler

type Handler func(*Context) (any, error)

type HandlerFunc

type HandlerFunc = gin.HandlerFunc

type Return

type Return struct {
	Ret       int64  `json:"ret"`
	Msg       string `json:"msg"`
	Data      any    `json:"data,omitempty"`
	RequestID string `json:"request_id,omitempty"`
	Timestamp int64  `json:"timestamp,omitempty"`
}

Jump to

Keyboard shortcuts

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