dirioapi

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(r *teapot.Router, h RouteHandlers)

RegisterRoutes mounts all DirIO REST API endpoints under /.dirio/api/v1/. Caller is responsible for wrapping r in auth middleware before calling this. When h is a stub (nil api), handlers return 200 OK (used by CLI route listing).

Types

type Handler

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

Handler implements RouteHandlers by delegating to consoleapi.API. When api is nil (e.g. CLI route listing) all handlers return 200 OK stubs.

func New

func New(api consoleapi.API, adminKeys policy.AdminKeyChecker) *Handler

New creates a Handler. api and adminKeys must both be non-nil for production use; pass nil for both when registering stub routes (CLI route listing).

func (*Handler) HandleGetBucketOwner

func (h *Handler) HandleGetBucketOwner() http.Handler

HandleGetBucketOwner handles GET /.dirio/api/v1/buckets/{bucket}/owner

func (*Handler) HandleGetEffectivePermissions

func (h *Handler) HandleGetEffectivePermissions() http.Handler

HandleGetEffectivePermissions handles GET /.dirio/api/v1/buckets/{bucket}/permissions/{accessKey}

func (*Handler) HandleGetObjectOwner

func (h *Handler) HandleGetObjectOwner() http.Handler

HandleGetObjectOwner handles GET /.dirio/api/v1/buckets/{bucket}/objects/{key:.*}

func (*Handler) HandleSimulate

func (h *Handler) HandleSimulate() http.Handler

HandleSimulate handles POST /.dirio/api/v1/simulate

func (*Handler) HandleTransferBucketOwner

func (h *Handler) HandleTransferBucketOwner() http.Handler

HandleTransferBucketOwner handles PUT /.dirio/api/v1/buckets/{bucket}/owner

type RouteHandlers

type RouteHandlers interface {
	HandleGetBucketOwner() http.Handler
	HandleTransferBucketOwner() http.Handler
	HandleGetObjectOwner() http.Handler
	HandleSimulate() http.Handler
	HandleGetEffectivePermissions() http.Handler
}

RouteHandlers defines the HTTP handler surface for the DirIO REST API (/.dirio/api/v1/).

Jump to

Keyboard shortcuts

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