Documentation ¶
Index ¶
- type Cache
- func (c *Cache) AddUser(user User) error
- func (c *Cache) GetUser(username string, mac string) (User, bool)
- func (c *Cache) GetUserWithAge(username string, mac string) (User, time.Duration, bool)
- func (c *Cache) GetUserWithRefreshNeed(username string, mac string) (User, bool, bool)
- func (c *Cache) HasUser(username string, mac string) bool
- func (c *Cache) SetOffline()
- func (c *Cache) SetOnline()
- func (c *Cache) Status() Status
- type Configuration
- type Status
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
func (*Cache) GetUserWithAge ¶
func (*Cache) GetUserWithRefreshNeed ¶
func (*Cache) SetOffline ¶
func (c *Cache) SetOffline()
type Configuration ¶
type Configuration struct { MaxSize int `yaml:"size" default:"1500"` TTL time.Duration `yaml:"ttl" default:"12h"` RefreshTTL time.Duration `yaml:"refresh_ttl" default:"1h"` OfflineTTL time.Duration `yaml:"offline_ttl"` }
func (*Configuration) Check ¶
func (c *Configuration) Check() error
Click to show internal directories.
Click to hide internal directories.