Documentation
¶
Index ¶
- Variables
- type Option
- func AppFS(val fs.FS) Option
- func AppsHTTPEndpoint(val string) Option
- func Config(val *config.Config) Option
- func CoreFS(val fs.FS) Option
- func GatewaySelector(gatewaySelector pool.Selectable[gateway.GatewayAPIClient]) Option
- func Logger(val log.Logger) Option
- func Middleware(val ...func(http.Handler) http.Handler) Option
- func ThemeFS(val *fsx.FallbackFS) Option
- func TraceProvider(val trace.TracerProvider) Option
- type Options
- type Service
- type Web
Constants ¶
This section is empty.
Variables ¶
var ErrConfigInvalid = `Invalid or missing config`
ErrConfigInvalid is returned when the config parse is invalid.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(o *Options)
Option defines a single option function.
func AppsHTTPEndpoint ¶
AppsHTTPEndpoint provides a function to set the appsHTTPEndpoint option.
func GatewaySelector ¶
func GatewaySelector(gatewaySelector pool.Selectable[gateway.GatewayAPIClient]) Option
GatewaySelector provides a function to set the gatewaySelector option.
func Middleware ¶
Middleware provides a function to set the middleware option.
func ThemeFS ¶
func ThemeFS(val *fsx.FallbackFS) Option
ThemeFS provides a function to set the themeFS option.
func TraceProvider ¶
func TraceProvider(val trace.TracerProvider) Option
TraceProvider provides a function to set the traceProvider option.
type Options ¶
type Options struct {
Logger log.Logger
Config *config.Config
Middleware []func(http.Handler) http.Handler
GatewaySelector pool.Selectable[gateway.GatewayAPIClient]
TraceProvider trace.TracerProvider
AppsHTTPEndpoint string
CoreFS fs.FS
AppFS fs.FS
ThemeFS *fsx.FallbackFS
}
Options define the available options for this package.
type Service ¶
type Service interface {
ServeHTTP(w http.ResponseWriter, r *http.Request)
Config(w http.ResponseWriter, r *http.Request)
}
Service defines the service handlers.
func NewInstrument ¶
NewInstrument returns a service that instruments metrics.
func NewLogging ¶
NewLogging returns a service that logs messages.
func NewService ¶
NewService returns a service implementation for Service.
type Web ¶
type Web struct {
// contains filtered or unexported fields
}
Web defines the handlers for the web service.
func (Web) Config ¶
func (p Web) Config(w http.ResponseWriter, _ *http.Request)
Config implements the Service interface.