infras

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authentication

func Authentication(rbac concept.RBAC) gin.HandlerFunc

func Authorization

func Authorization(rbac concept.RBAC) gin.HandlerFunc

func EncodeSession

func EncodeSession(sess *Session) (string, error)

Types

type Session

type Session struct {
	Account   string
	Salt      string
	ExpiredAt int64
}

Session represents user info who has login.

func GetSessionFromContext

func GetSessionFromContext(c *gin.Context) (*Session, bool)

Jump to

Keyboard shortcuts

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