daytona

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PathPrefix    = "/daytona"
	ToolboxPrefix = PathPrefix + "/toolbox"
)

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(mux apihttp.Mux, d Deps)

RegisterRoutes mounts the supported Daytona compatibility surface.

Types

type Deps

type Deps struct {
	Service *service.Service
	Logger  *slog.Logger
	// Auth authenticates a request (pkg/api). Routes never call it
	// directly: Route composes it with the permission check.
	Auth func(http.Handler) http.Handler
	// Audit is the seam task T5 fills with kind "api" records
	// (apihttp.AuditHook). nil records nothing.
	Audit apihttp.AuditHook
	// ContainerEngine selects BuildKit-absent clear errors on containerd hosts.
	ContainerEngine string
	// DefaultImage is the image a create falls back to when the request names
	// neither a snapshot nor a build (SB_DAYTONA_DEFAULT_IMAGE, read once in
	// config). Empty falls back to the built-in default.
	DefaultImage string
}

Deps are the shared dependencies the Daytona facade needs from the top-level API package.

func (Deps) Route added in v0.6.8

func (d Deps) Route(perm controlplane.Permission, h http.Handler) http.Handler

Route returns h behind authenticate → authorize(perm) → audit seam (plans/identity-and-access.md §5.3).

func (Deps) RouteBy added in v0.6.8

func (d Deps) RouteBy(tag string, classify func(*http.Request) controlplane.Permission, h http.Handler) http.Handler

RouteBy is Route for a route whose permission depends on the request.

Jump to

Keyboard shortcuts

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