web

package
v1.62.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: AGPL-3.0 Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const URLPing core_types.Url = "/ping"
View Source
const UrlStatic core_types.Url = "/"

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(next http.Handler) http.Handler

func CorsMiddleware

func CorsMiddleware(next http.Handler) http.Handler

func IsTempusValid

func IsTempusValid(encrypted string) bool

func NewEndpointPing

func NewEndpointPing(w *Web) *registry.Endpoint

func NewEndpointStatic

func NewEndpointStatic(w *Web) *registry.Endpoint

func NewTempusToken

func NewTempusToken() string

Types

type AuthPermission

type AuthPermission struct {
	ExpirationDate time.Time
	IsValid        bool
}

type Mutex

type Mutex interface {
	Lock()
	Unlock()
}

type Web

type Web struct {
	AppDataMutex Mutex
	// contains filtered or unexported fields
}

func NewWeb

func NewWeb(filesystems []*builder.Filesystem, opts ...WebOpt) *Web

func (*Web) GetMux

func (w *Web) GetMux() *http.ServeMux

func (*Web) Serve

func (w *Web) Serve(opts WebServeOpts)

type WebOpt

type WebOpt func(w *Web)

func WithMutexableData

func WithMutexableData(app_data_mutex Mutex) WebOpt

func WithSiteRoot

func WithSiteRoot(site_root string) WebOpt

type WebServeOpts

type WebServeOpts struct {
	Port *int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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