controller

package
v0.0.0-...-ed9e5cc Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//FirstURL for check whether they meet the requirements to execution middleware
	FirstURL = "/api/v1/permission/addurl"
)

Functions

func CheckPermission

func CheckPermission(c *Controller, getUID func(ctx *gin.Context) (uint32, error)) func(c *gin.Context)

CheckPermission middleware that checks the permission

Types

type Controller

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

Controller external service interface

func New

func New(db *sql.DB) *Controller

New create an external service interface

func (*Controller) RegisterRouter

func (c *Controller) RegisterRouter(r gin.IRouter)

RegisterRouter register router

Jump to

Keyboard shortcuts

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