helper

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Response

func Response(res *schema.Response, data interface{}, err error)

func ResponseList

func ResponseList(res *schema.List, data interface{}, meta *schema.Meta, err error)

func TrimCode

func TrimCode(message string) string

Types

type Context

type Context struct {
	*gin.Context
	Uid       string `json:"uid"`        // 操作人的用户 ID
	UserAgent string `json:"user_agent"` // 用户代理
	Ip        string `json:"ip"`         // IP地址
}

控制器的上下文

func NewContext

func NewContext(c *gin.Context) Context

Jump to

Keyboard shortcuts

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