Versions in this module Expand all Collapse all v4 v4.14.1 Apr 26, 2023 Changes in this version + func DocsMarkdown() ([]byte, error) + func Spec() docs.FieldSpecs + type Config struct + Address string + BasicAuth httpserver.BasicAuthConfig + CORS httpserver.CORSConfig + CertFile string + DebugEndpoints bool + Enabled bool + KeyFile string + RootPath string + func NewConfig() Config + type Dynamic struct + func NewDynamic() *Dynamic + func (d *Dynamic) HandleCRUD(w http.ResponseWriter, r *http.Request) + func (d *Dynamic) HandleList(w http.ResponseWriter, r *http.Request) + func (d *Dynamic) OnDelete(onDelete func(ctx context.Context, id string) error) + func (d *Dynamic) OnUpdate(onUpdate func(ctx context.Context, id string, conf []byte) error) + func (d *Dynamic) Started(id string, config []byte) + func (d *Dynamic) Stopped(id string) + type OptFunc func(t *Type) + func OptWithMiddleware(m func(http.Handler) http.Handler) OptFunc + func OptWithTLS(tls *tls.Config) OptFunc + type Type struct + func New(version string, dateBuilt string, conf Config, wholeConf any, log log.Modular, ...) (*Type, error) + func (t *Type) Handler() http.Handler + func (t *Type) ListenAndServe() error + func (t *Type) RegisterEndpoint(path, desc string, handlerFunc http.HandlerFunc) + func (t *Type) Shutdown(ctx context.Context) error