Documentation
¶
Overview ¶
Package server owns the Echo HTTP runtime.
Index ¶
- type APIKeyIdentity
- type APIKeyVerifier
- type CapabilityStatus
- type Config
- type InstallationStateReader
- type LoginSessionAuthenticator
- type LoginSessionIdentity
- type Option
- func WithAPIKeyVerifier(verifier APIKeyVerifier) Option
- func WithInstallationStateReader(reader InstallationStateReader) Option
- func WithLoginSessionAuthenticator(authenticator LoginSessionAuthenticator) Option
- func WithStatusReporter(reporter StatusReporter) Option
- func WithSystemErrorRecorder(recorder SystemErrorRecorder) Option
- type Server
- type StatusReporter
- type SystemErrorInput
- type SystemErrorRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyIdentity ¶
type APIKeyIdentity = middlewares.APIKeyIdentity
APIKeyIdentity is the server-owned identity shape returned by API key auth.
type APIKeyVerifier ¶
type APIKeyVerifier = middlewares.APIKeyVerifier
APIKeyVerifier verifies API key credentials before browser session middleware runs.
type CapabilityStatus ¶
type CapabilityStatus struct {
Name string `json:"name"`
Enabled bool `json:"enabled"`
Available bool `json:"available"`
State string `json:"state"`
Message string `json:"message,omitempty"`
}
CapabilityStatus is the server-owned JSON shape for capability routes.
type Config ¶
type Config struct {
Port string
ReadTimeout time.Duration
WriteTimeout time.Duration
IdleTimeout time.Duration
ShutdownTimeout time.Duration
HideBanner bool
}
Config contains HTTP server runtime settings.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default HTTP server settings.
func FromAppConfig ¶
FromAppConfig derives HTTP server settings from application config.
type InstallationStateReader ¶
type InstallationStateReader = middlewares.InstallationStateReader
InstallationStateReader reports first-initialization state to server middleware.
type LoginSessionAuthenticator ¶
type LoginSessionAuthenticator = middlewares.LoginSessionAuthenticator
LoginSessionAuthenticator verifies browser login session cookies.
type LoginSessionIdentity ¶
type LoginSessionIdentity = middlewares.LoginSessionIdentity
LoginSessionIdentity is the authenticated browser login session identity.
type Option ¶
type Option func(*Server)
Option customizes the HTTP server.
func WithAPIKeyVerifier ¶
func WithAPIKeyVerifier(verifier APIKeyVerifier) Option
WithAPIKeyVerifier installs optional API token authentication.
func WithInstallationStateReader ¶
func WithInstallationStateReader(reader InstallationStateReader) Option
WithInstallationStateReader installs the uninitialized-system gate.
func WithLoginSessionAuthenticator ¶
func WithLoginSessionAuthenticator(authenticator LoginSessionAuthenticator) Option
WithLoginSessionAuthenticator installs browser login-session authentication.
func WithStatusReporter ¶
func WithStatusReporter(reporter StatusReporter) Option
WithStatusReporter installs the readiness and capability reporter.
func WithSystemErrorRecorder ¶
func WithSystemErrorRecorder(recorder SystemErrorRecorder) Option
WithSystemErrorRecorder installs optional internal-error recording.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server owns the Echo HTTP server lifecycle and system routes.
type StatusReporter ¶
type StatusReporter interface {
Status(context.Context) []CapabilityStatus
Ready(context.Context) error
}
StatusReporter supplies readiness and capability status to system routes.
type SystemErrorInput ¶
type SystemErrorInput = middlewares.SystemErrorInput
SystemErrorInput is the server-owned diagnostic payload for internal errors.
type SystemErrorRecorder ¶
type SystemErrorRecorder = middlewares.SystemErrorRecorder
SystemErrorRecorder stores internal API failure diagnostics.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package httpreq parses and validates Echo request inputs for HTTP adapters.
|
Package httpreq parses and validates Echo request inputs for HTTP adapters. |
|
Package httpresp renders framework-specific HTTP error responses.
|
Package httpresp renders framework-specific HTTP error responses. |
|
Package middlewares contains server-owned Echo middleware adapters.
|
Package middlewares contains server-owned Echo middleware adapters. |