server

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServerURL       = errors.New("invalid server URL")
	ErrInvalidSubnet   = errors.New("invalid subnet")
	ErrSubnetInUse     = errors.New("subnet in use")
	ErrDataDir         = errors.New("data dir not found")
	ErrSecureBlankFQDN = errors.New("secure server requires FQDN")
	ErrSecureWithIP    = errors.New("cannot use IP address with secure")
	ErrInValidEmail    = errors.New("valid email address required")
)

Functions

func ClearSession added in v0.4.0

func ClearSession(w http.ResponseWriter, r *http.Request)

func InitializeSession added in v0.4.0

func InitializeSession()

func NewSession added in v0.4.0

func NewSession(
	w http.ResponseWriter,
	r *http.Request,
	user plexus.User,
	loggedIn bool,
	page string,
)

func Run

func Run()

Run - run the server.

Types

type Configuration added in v0.4.0

type Configuration struct {
	AdminName string
	AdminPass string
	FQDN      string
	Secure    bool
	Port      string
	Email     string
	Verbosity string
	DataHome  string
	DBFile    string
}

type Page

type Page struct {
	Page        string
	NeedsLogin  bool
	Version     string
	Theme       string
	Font        string
	Refresh     int
	DefaultDate string
	Networks    []string
	Data        any
}

type Session added in v0.4.0

type Session struct {
	UserName string
	LoggedIn bool
	Admin    bool
	Page     string
	Session  *sessions.Session
}

Session represents a user session.

func GetSession added in v0.4.0

func GetSession(_ http.ResponseWriter, r *http.Request) *Session

func (*Session) Save added in v0.4.0

func (s *Session) Save(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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