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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckActive

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

CheckActive middleware that checks the active

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) ExtendJWTMiddleWare

func (c *Controller) ExtendJWTMiddleWare(JWTMiddleware *ginjwt.GinJWTMiddleware) func(ctx *gin.Context) (uint32, error)

ExtendJWTMiddleWare extend JWTMiddleWare

func (*Controller) Login

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

Login JWT validation

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