Documentation
¶
Overview ¶
Package trust implements the trust API service.
Index ¶
- Constants
- func FetchWithRedirects(ctx context.Context, client *http.Client, start *url.URL, maxRedirects int, ...) (*url.URL, []string, []byte, string, error)
- func New(opts ...apptheory.Option) *apptheory.App
- func NewPreviewHTTPClient(timeout time.Duration) *http.Client
- func NormalizeLinkURL(raw string) (string, *url.URL, error)
- func Register(app *apptheory.App, srv *Server) *apptheory.App
- func ValidateOutboundURL(ctx context.Context, u *url.URL) error
- type LinkPreviewError
- type Server
Constants ¶
View Source
const ServiceName = "trust-api"
ServiceName is the canonical service identifier for the trust API.
Variables ¶
This section is empty.
Functions ¶
func FetchWithRedirects ¶
func FetchWithRedirects(ctx context.Context, client *http.Client, start *url.URL, maxRedirects int, maxBytes int64) (*url.URL, []string, []byte, string, error)
FetchWithRedirects fetches a URL with redirect handling and a maximum body size.
func NewPreviewHTTPClient ¶
NewPreviewHTTPClient constructs an HTTP client suitable for preview fetching.
func NormalizeLinkURL ¶
NormalizeLinkURL normalizes a raw URL string and returns the normalized string and parsed URL.
Types ¶
type LinkPreviewError ¶
type LinkPreviewError = linkPreviewError
LinkPreviewError is a public alias for link preview errors.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the trust API.
func (*Server) InstanceAuthHook ¶
InstanceAuthHook authenticates instance requests using an instance API key bearer token.
func (*Server) RegisterRoutes ¶
RegisterRoutes registers HTTP routes for the trust API.
Source Files
¶
- access_scope.go
- ai_budget_precheck.go
- app.go
- attestation_subjects.go
- attestations_issue.go
- attestations_urls.go
- audit.go
- auth_instance.go
- budget_debit_tx.go
- doc.go
- ens_gateway_signer.go
- fetch_shared.go
- handlers_ai_claims.go
- handlers_ai_evidence.go
- handlers_ai_moderation.go
- handlers_attestations.go
- handlers_budget.go
- handlers_ens_gateway.go
- handlers_previews.go
- handlers_publish_jobs.go
- handlers_publish_jobs_renders.go
- handlers_publish_jobs_summaries.go
- handlers_renders.go
- handlers_soul_update_registration.go
- handlers_trust_verify.go
- instance_config.go
- link_safety_basic.go
- metrics_ai.go
- preview_fetcher.go
- queues_sqs.go
- rate_limits.go
- render_queue.go
- server.go
- string_consts.go
Click to show internal directories.
Click to hide internal directories.