httpapi

package
v0.0.0-...-a2cf2ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 118 Imported by: 0

Documentation

Index

Constants

View Source
const GitHubEventsPath = "/api/integrations/github/events"

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubWebhookCredentialIntegrations

type GitHubWebhookCredentialIntegrations func(
	context.Context, string, int,
) ([]integrationstore.IntegrationRecord, error)

type Option

type Option func(*Server)

func WithAPIRateLimit

func WithAPIRateLimit(client *redistore.Client, readsPerHour, writesPerHour, burst int) Option

func WithAgentConfigOptions

func WithAgentConfigOptions(opts agentconfig.CompileOptions) Option

func WithAgentEventWakeupSubscriber

func WithAgentEventWakeupSubscriber(subscriber notifications.AgentEventWakeupSubscriber) Option

func WithAgentStreamDeltaSubscriber

func WithAgentStreamDeltaSubscriber(subscriber notifications.AgentStreamDeltaSubscriber) Option

func WithAgentStreamRecorder

func WithAgentStreamRecorder(recorder *metrics.AgentStreamRecorder) Option

func WithAgentToolCallUpdateSubscriber

func WithAgentToolCallUpdateSubscriber(subscriber notifications.AgentToolCallUpdateSubscriber) Option

func WithAllowInsecureLocalHostBypass

func WithAllowInsecureLocalHostBypass() Option

WithAllowInsecureLocalHostBypass exempts loopback and Docker's host.docker.internal alias from the public-host guard, so local daemons/containers can reach the API without a matching Host header. Only wire this when OMNARA_ALLOW_INSECURE_DEV_DEFAULTS is set.

func WithAllowInsecureModelProviderEndpoints

func WithAllowInsecureModelProviderEndpoints() Option

func WithAuthClientRateLimits

func WithAuthClientRateLimits(limits authn.ClientRateLimits) Option

func WithAuthHTTPClient

func WithAuthHTTPClient(client *http.Client) Option

func WithAuthRateLimiter

func WithAuthRateLimiter(limiter httpauth.RateLimiter) Option

func WithBillingURL

func WithBillingURL(billingURL string) Option

func WithDaemonNotifications

func WithDaemonNotifications(
	subscriber notifications.DaemonWakeupSubscriber,
	presence notifications.DaemonPresenceStore,
	replicaID uuid.UUID,
) Option

func WithDaemonRecorder

func WithDaemonRecorder(recorder *metrics.DaemonRecorder) Option

func WithDaemonReleaseURL

func WithDaemonReleaseURL(releaseURL string) Option

func WithDaemonReplyPublisher

func WithDaemonReplyPublisher(publisher replyChannelPublisher) Option

func WithDaemonSocketFallbackDrainTiming

func WithDaemonSocketFallbackDrainTiming(interval time.Duration, jitter time.Duration) Option

func WithDefaultMachinePools

func WithDefaultMachinePools(defaultPoolTemplates []executionstore.DefaultMachinePoolTemplate) Option

func WithDefaultModelProvider

func WithDefaultModelProvider(template *modelstore.DefaultModelProviderTemplate) Option

func WithEmailSender

func WithEmailSender(sender httpauth.EmailSender) Option

func WithEndpointAllowlist

func WithEndpointAllowlist(endpointAllowlist *ssrf.Allowlist) Option

func WithHTTPRecorder

func WithHTTPRecorder(recorder *metrics.HTTPRecorder) Option

func WithHostedCredentialProvisioner

func WithHostedCredentialProvisioner(provisioner modelprovider.HostedCredentialProvisioner) Option

func WithIntegrationHTTPClient

func WithIntegrationHTTPClient(client *http.Client) Option

func WithIntegrationInboxIntakeRecorder

func WithIntegrationInboxIntakeRecorder(recorder *metrics.IntegrationInboxIntakeRecorder) Option

func WithMCPRegistry

func WithMCPRegistry(registry *mcpregistry.Registry) Option

func WithMachinePoolManager

func WithMachinePoolManager(manager *machinepool.Manager) Option

func WithModelDiscoverer

func WithModelDiscoverer(discoverer modelprovider.DiscoverFunc) Option

func WithModelLimitsCatalog

func WithModelLimitsCatalog(catalog *modelprovider.LimitsCatalog) Option

func WithOAuthClientMetadataHTTPClient

func WithOAuthClientMetadataHTTPClient(client *http.Client) Option

func WithOAuthStateStore

func WithOAuthStateStore(store httpauth.OAuthStateStore) Option

func WithPasswordAuthEnabled

func WithPasswordAuthEnabled(signupEnabled, resetEnabled bool) Option

func WithPublicAPIURL

func WithPublicAPIURL(publicAPIURL string) Option

func WithPublicURL

func WithPublicURL(publicURL string) Option

func WithRedisBackedAuth

func WithRedisBackedAuth(client *redistore.Client) Option

func WithSecretKeyWrapper

func WithSecretKeyWrapper(keyWrapper secrets.KeyWrapper) Option

func WithSkillDownloadSigningKey

func WithSkillDownloadSigningKey(key []byte) Option

func WithSlackOAuth

func WithSlackOAuth(config SlackOAuthConfig) Option

func WithTrustedProxyCIDRs

func WithTrustedProxyCIDRs(cidrs []string) Option

func WithWebAssets

func WithWebAssets(assets fs.FS) Option

WithWebAssets configures embedded SPA assets.

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(log *slog.Logger, store *storage.Store, opts ...Option) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) GitHubEventsHandler

func (s *Server) GitHubEventsHandler() http.Handler

func (*Server) Handler

func (s *Server) Handler() http.Handler

type SlackOAuthConfig

type SlackOAuthConfig = slack.OAuthConfig

Source Files

Directories

Path Synopsis
Package openapi provides primitives to interact with the openapi HTTP API.
Package openapi provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址