Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultPort = "8080" DefaultPublicDir = "public" HealthPath = "/health" )
View Source
const RoutesPath = router.IntrospectionPath
RoutesPath is where this server exposes its route table. It is router.IntrospectionPath: the path is the ecosystem's, not this implementation's, so an operator asks the same question of a dev server and of a deployed Worker.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Port string
PublicDir string // "" = no servir estáticos
Gzip bool
NoCache bool
Health bool
Logger func(...any)
Authn router.Middleware
Authorize model.Authorizer
RoutesEndpoint bool
// Policy lets the introspection endpoint report WHICH roles hold the
// permission each route requires. Optional: nil leaves those columns
// marked unknown, which is not the same as "nobody" — a permission no
// role holds turns a correctly-declared route into a permanent 403, and
// that finding must never be confused with "the app did not say".
//
// It is separate from Authorize because the two answer opposite
// questions: Authorize answers "may this user do this?", Policy answers
// "who may do this?". A closure cannot answer the second.
Policy model.PolicyDescriber
TLS TLSConfig
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.