Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SessionCache *ristretto.Cache
SessionCache stores dataset permission lists
Functions ¶
func InitialiseSessionCache ¶
InitialiseSessionCache creates a cache manager that stores keys and values in memory
func NewSessionKey ¶
func NewSessionKey() string
NewSessionKey generates a session key used for storing dataset permissions, and checks that it doesn't already exist
Types ¶
type DatasetCache ¶
type DatasetCache struct {
Datasets []string
}
DatasetCache stores the dataset permissions and information whether this information has already been checked or not. This information can then be used to skip the time-costly authentication middleware DatasetCache==nil, session doesn't exist DatasetCache.Datasets==nil, session exists, user has no permissions (this case is not used in middleware.go) DatasetCache.Datasets==[]string{}, session exists, user has permissions
Click to show internal directories.
Click to hide internal directories.