admin

package
v0.17.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminCredentialStore

type AdminCredentialStore interface {
	Load() (username string, passwordHash string, found bool, err error)
	Save(username string, passwordHash string) error
}

AdminCredentialStore persists the admin login account used by the admin console.

type BoltAdminStore

type BoltAdminStore struct {
	// contains filtered or unexported fields
}

func NewBoltAdminStore

func NewBoltAdminStore(path string) *BoltAdminStore

func (*BoltAdminStore) Load

func (b *BoltAdminStore) Load() (string, string, bool, error)

func (*BoltAdminStore) Save

func (b *BoltAdminStore) Save(username string, passwordHash string) error

type Config

type Config struct {
	Credentials      *credential.StaticCredentialStore
	UserStore        credential.PersistentStore
	AdminStore       AdminCredentialStore
	TrafficStore     traffic.Store
	Tracker          *traffic.Tracker
	CookieSecure     bool
	MaxLoginAttempts int
	LoginWindow      time.Duration
	LockoutDuration  time.Duration
	AllowedOrigins   []string
	Logger           *zerolog.Logger
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(conf *Config) *Server

func (*Server) Handler

func (s *Server) Handler() http.Handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL