auth

package
v0.0.0-...-fb08230 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Admin

func Admin(m jwt.Auth) gin.HandlerFunc

Admin is user is admin

func ApplyRoutes

func ApplyRoutes(r *gin.RouterGroup)

func NewAuth

func NewAuth() (jwt.Auth, error)

NewAuth Create new auth context

func Operator

func Operator(m jwt.Auth) gin.HandlerFunc

Operator is user is admin

func Register

func Register(c *gin.Context)

Register routes for creating account

func SystemAdmin

func SystemAdmin(m jwt.Auth) gin.HandlerFunc

SystemAdmin is user is system admin

Types

type Role

type Role = database.Role

type User

type User = database.User

Jump to

Keyboard shortcuts

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