Documentation
¶
Index ¶
Constants ¶
View Source
const ( // AttachmentDerivativeJPEGQuality keeps displayed attachment images compact // without changing the encoding quality of public server assets. AttachmentDerivativeJPEGQuality = 75 // AttachmentStableCachePrefix is versioned whenever attachment derivative // encoding changes so older cached bytes cannot be reused. AttachmentStableCachePrefix = core.AttachmentDerivativeCacheResource )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer serves the HTTP APIs and static frontend.
func NewHTTPServer ¶
func NewHTTPServer(cfg HTTPServerConfig) (*HTTPServer, error)
NewHTTPServer creates a new HTTP server with the provided dependencies.
type HTTPServerConfig ¶
type HTTPServerConfig struct {
Config config.ChattoConfig
NC *nats.Conn
Core *core.ChattoCore
Addr string
Version string
// StartupStartedAt includes core boot in the readiness duration. Zero uses
// the time Run starts. Optional runtime units do not gate HTTP readiness.
StartupStartedAt time.Time
// MetricsCollectors are process-local collectors that the metrics
// listener serves in addition to the Chatto metrics, for example the
// health metrics of the embedded search provider.
MetricsCollectors []prometheus.Collector
}
HTTPServerConfig holds configuration for creating an HTTPServer.
type OAuthClient ¶
type OAuthClient struct {
ClientID string
ClientName string
ClientURI string
RedirectURIs []string
// Native permits the RFC 8252 variable-port exception for literal
// loopback IP callbacks. Web clients always require an exact callback.
Native bool
// AnyLoopbackOrigin permits each registered callback on every HTTP or HTTPS
// loopback origin, with any port. The path and query must stay exact. Only
// the built-in loopback client sets it.
AnyLoopbackOrigin bool
BuiltIn bool
}
OAuthClient is the validated identity and redirect contract for one public OAuth client. Metadata is informational; ClientID, RedirectURIs, and Native are the security-sensitive fields.
type OAuthClientResolver ¶
type OAuthClientResolver struct {
// contains filtered or unexported fields
}
OAuthClientResolver safely retrieves public-client metadata from CIMD Client Identifier URLs. Valid documents are cached briefly according to their response headers.
func (*OAuthClientResolver) Resolve ¶
func (r *OAuthClientResolver) Resolve(ctx context.Context, clientID string) (OAuthClient, error)
Source Files
¶
- assets.go
- atproto.go
- audit_metadata.go
- auth.go
- browser_session_store.go
- cimd.go
- connect.go
- cookie_sessions.go
- cors.go
- csrf.go
- file_owner_unix.go
- frontend.go
- frontend_compression.go
- frontend_config.go
- health.go
- image_transforms.go
- mcp.go
- metrics.go
- oauth.go
- oauth_clients.go
- oauth_metadata.go
- oidc.go
- oidc_keys.go
- opengraph.go
- password_management.go
- realtime.go
- realtime_catchup.go
- realtime_event_projection.go
- realtime_snapshot.go
- registration_admission.go
- request_auth.go
- search_metrics.go
- server.go
- session_store.go
- shields.go
- test_endpoints_stub.go
- trusted_proxies.go
- webhooks.go
Click to show internal directories.
Click to hide internal directories.