cache

package
v0.0.0-...-632786d Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNotFound = errors.New("error not found")

ErrorNotFound - global error not found for cache DB

Functions

func InitClient

func InitClient(cfg *config.Config) error

InitClient - init client cache DB

Types

type Client

type Client interface {
	SaveSession(session *config.SessionInfo) error
	RefreshExpire(session *config.SessionInfo, refreshCookie bool) error
	GetSessionInfo(uid string) (*config.SessionInfo, error)
	GetListSession(login, uid string, activeOnly bool) (*[]SessionDescription, error)
	DropSession(uid, login string) error
	FlushBase() error
}

Client - interface DB

var ClientDB Client

ClientDB - global cache client

type SessionDescription

type SessionDescription struct {
	SessionID string           `json:"sessionID"`
	IsActive  bool             `json:"isActive"`
	Info      config.AgentInfo `json:"info"`
}

SessionDescription - session description

func (*SessionDescription) CheckActive

func (session *SessionDescription) CheckActive()

CheckActive - check active

Jump to

Keyboard shortcuts

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