controller

package
v0.0.0-...-097943f Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	JWT *jwt.GinJWTMiddleware
	// 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) CheckActive

func (con *Controller) CheckActive() func(ctx *gin.Context)

CheckActive middleware that checks the active

func (*Controller) GetID

func (con *Controller) GetID(ctx *gin.Context) (uint32, error)

func (*Controller) Login

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

Login JWT validation

func (*Controller) RegisterRouter

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

RegisterRouter register router. It fatal because there is no service if register failed.

Jump to

Keyboard shortcuts

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