Help us shape the future of Go! Take the 2026 Go Developer Survey

httpapi

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RequireAuth   bool
	Authenticator WorkspaceAuthenticator
}

type Deps

type Deps struct {
	// Readiness must honor cancellation; production uses the API PostgreSQL pool.
	Readiness       func(context.Context) error
	Agents          AgentService
	Envs            EnvironmentService
	Sessions        SessionService
	Threads         SessionThreadService
	Events          EventService
	Stream          EventSubscriber
	Files           FileService
	Skills          SkillService
	Memory          MemoryService
	Vaults          VaultService
	Webhooks        WebhookService
	Deployments     DeploymentService
	EnvironmentWork EnvironmentWorkService
}

type EnvironmentKeyAuthenticator

type EnvironmentKeyAuthenticator interface {
	AuthenticateEnvironmentKey(context.Context, string) (string, workspace.EnvironmentScope, error)
}

type EventService

type EventService interface {
	Query(context.Context, string, app.EventQuery) ([]domain.Event, error)
}

type EventSubscriber

type EventSubscriber interface {
	SubscribeContext(context.Context, string, map[string]bool) (<-chan app.Frame, func(), error)
}

type Server

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

func NewServer

func NewServer(deps Deps, cfg Config) *Server

func (*Server) Handler

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

type SessionScopeValidator

type SessionScopeValidator interface {
	ValidateSessionScope(context.Context, workspace.SessionScope) error
}

SessionScopeValidator rechecks a long-lived Session credential after the initial HTTP authentication. Implementations must fail closed when the Work lease stops, expires, or changes owner.

type SessionTokenAuthenticator

type SessionTokenAuthenticator interface {
	AuthenticateSessionToken(context.Context, string) (string, workspace.SessionScope, error)
}

type ThreadEventSubscriber

type ThreadEventSubscriber interface {
	SubscribeThreadContext(
		context.Context, string, string, map[string]bool,
	) (<-chan app.Frame, func(), error)
}

type WorkspaceAuthenticator

type WorkspaceAuthenticator interface {
	AuthenticateAPIKey(context.Context, string) (string, error)
}

Jump to

Keyboard shortcuts

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