Documentation ¶
Index ¶
- Variables
- func Conns(storage Storage, user string) (uint32, error)
- func SessionAdd(storage Storage, sessionId, user, nasIp, assignedIp, clientIp string) error
- func SessionLog(storage Storage, sessionId string, user string, nasIp string) error
- func SessionRemove(storage Storage, sessionId, user, nasIp string) error
- func SessionUpdate(storage Storage, s Session) error
- type Session
- type Storage
- type User
- type UserLimits
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func SessionAdd ¶
func SessionLog ¶
Copy session to log
func SessionRemove ¶
func SessionUpdate ¶
Types ¶
type Storage ¶
type Storage interface { GetUser(name string) (user User, err error) CountSessions(name string) (count int, err error) GetLimits(name string) (user UserLimits, err error) IsSessionExists(name string, sessID string, nasIP string) (exists bool, err error) CreateSession(name string, sessID string, nasIP string, assignedIP string, clientIP string) error UpdateSession(name string, sessID string, nasIP string, rx int, tx int, rxPackets int, txPackets int, duration int) error FinishSession(name string, sessID string, nasIP string) error ArchiveSession(name string, sessID string, nasIP string) error }
type User ¶
type UserLimits ¶
type UserLimits struct {
Exists bool
}
Click to show internal directories.
Click to hide internal directories.