httpServer

package
v3.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

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
	DevicePool     *pool.Pool[*restarter.Restarter[device.Device]]
	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 Nameable

type Nameable interface {
	Name() string
}

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