mygin

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorize

func Authorize(opt AuthorizeOption) func(*gin.Context)

func CommonEnvironment

func CommonEnvironment(c *gin.Context, data map[string]interface{}) gin.H

func RecordPath

func RecordPath(c *gin.Context)

func ShowErrorPage

func ShowErrorPage(c *gin.Context, i ErrInfo, isPage bool)

Types

type AuthorizeOption

type AuthorizeOption struct {
	Guest    bool
	Member   bool
	IsPage   bool
	AllowAPI bool
	Msg      string
	Redirect string
	Btn      string
}

type ErrInfo

type ErrInfo struct {
	Code  int
	Title string
	Msg   string
	Link  string
	Btn   string
}