authorization

package
v0.0.0-...-d3a2b01 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthManager

type AuthManager interface {
	AddSession(sm storage.StorageManager, request *entities.AuthRequest, ctx context.Context) (uint64, error)
	RemoveSession(sm storage.StorageManager, token uint64) error
	GetSessionRole(token uint64) (string, error)
	GetSessionConn(token uint64) (storage.ConnDB, error)
	SessionExist(token uint64) bool
}

type AuthService

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

func NewAuthService

func NewAuthService(logger *log.Logger) *AuthService

func (*AuthService) AddSession

func (as *AuthService) AddSession(sm storage.StorageManager, request *entities.AuthRequest, ctx context.Context) (uint64, error)

func (*AuthService) GetSessionConn

func (as *AuthService) GetSessionConn(token uint64) (storage.ConnDB, error)

func (*AuthService) GetSessionRole

func (as *AuthService) GetSessionRole(token uint64) (string, error)

func (*AuthService) RemoveSession

func (as *AuthService) RemoveSession(sm storage.StorageManager, token uint64) error

func (*AuthService) SessionExist

func (as *AuthService) SessionExist(token uint64) bool

Jump to

Keyboard shortcuts

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