api

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package api The next version of the underlying category will support automatic parsing of a single struct.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIFunc

func NewAPIFunc(c *gin.Context) interface{}

NewAPIFunc default of custom handlefunc

Types

type Context

type Context struct {
	*gin.Context
}

Context Wrapping gin context to custom context

func NewCtx

func NewCtx(c *gin.Context) *Context

NewCtx Create a new custom context

func (*Context) GetVersion

func (c *Context) GetVersion() string

GetVersion Get the version by req url

func (*Context) WriteJSON

func (c *Context) WriteJSON(obj interface{})

WriteJSON 写入json对象

Jump to

Keyboard shortcuts

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