Documentation
¶
Overview ¶
Package admin manages the bootstrap flow and dashboard authentication.
Index ¶
- Variables
- type Service
- func (s *Service) Bootstrap(username, password string) error
- func (s *Service) CleanupExpiredSessions() error
- func (s *Service) Login(username, password string, rememberMe bool) (string, time.Time, error)
- func (s *Service) Logout(token string)
- func (s *Service) ValidateSession(token string) (string, bool)
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCredentials = errors.New("invalid username or password")
ErrInvalidCredentials is returned when a login attempt fails.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages admin users and persistent dashboard sessions.
func (*Service) Bootstrap ¶
Bootstrap creates the initial admin account and marks the DB as bootstrapped. Returns an error if already bootstrapped.
func (*Service) CleanupExpiredSessions ¶
CleanupExpiredSessions removes expired sessions from the database.
Click to show internal directories.
Click to hide internal directories.