common

package
v0.0.0-...-0a93553 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default_db

func Default_db() *xorm.Engine

func Default_redis

func Default_redis() *redis.Client

func Fail

func Fail(c *gin.Context, reason string)

func ResponseJson

func ResponseJson(c *gin.Context, ok int, reason string, data interface{})

func Success

func Success(c *gin.Context, data interface{})

Types

type Response

type Response struct {
	Ok     int         `json:"ok"`
	Reason string      `json:"reason,omitempty"`
	Data   interface{} `json:"data,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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