httpServer

package
v3.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const RegistersExpires = 10 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationConfig

type AuthenticationConfig interface {
	Enabled() bool
	JwtSecret() []byte
	JwtValidityPeriod() time.Duration
	HtaccessFile() string
}

type Config

type Config interface {
	BuildVersion() string
	Bind() string
	Port() int
	LogRequests() bool
	LogDebug() bool
	LogConfig() bool
	FrontendProxy() *url.URL
	FrontendPath() string
	FrontendExpires() time.Duration
	ConfigExpires() time.Duration
}

type Environment

type Environment struct {
	Config             Config
	ProjectTitle       string
	Views              []ViewConfig
	Authentication     AuthenticationConfig
	RegisterDbOfDevice RegisterDbOfDeviceFunc
	StateStorage       *dataflow.ValueStorage
	CommandStorage     *dataflow.ValueStorage
}

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message" example:"status bad request"`
}

type HttpServer

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

func Run

func Run(env *Environment) (httpServer *HttpServer)

func (*HttpServer) Shutdown

func (s *HttpServer) Shutdown()

type RegisterDbOfDeviceFunc added in v3.7.0

type RegisterDbOfDeviceFunc func(deviceName string) *dataflow.RegisterDb

type ViewConfig

type ViewConfig interface {
	Name() string
	Title() string
	Devices() []ViewDeviceConfig
	Autoplay() bool
	IsAllowed(user string) bool
	IsPublic() bool
	Hidden() bool
}

type ViewDeviceConfig

type ViewDeviceConfig interface {
	Name() string
	Title() string
	Filter() dataflow.RegisterFilterConf
}

Jump to

Keyboard shortcuts

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