18 lines
425 B
Go
18 lines
425 B
Go
package session
|
|
|
|
import (
|
|
"errors"
|
|
"time"
|
|
)
|
|
|
|
var ErrSessionNotFound = errors.New("Session not found")
|
|
var ErrSessionAlreadyExists = errors.New("Session already exists")
|
|
var ErrSessionExpired = errors.New("Session expired")
|
|
var ErrSessionBackend = errors.New("Session backend")
|
|
|
|
type SessionData struct {
|
|
UserID string `json:"userid"`
|
|
CSRFToken string `json:"csrftoken"`
|
|
ExpiresAt time.Time `json:"expiresat"`
|
|
}
|