api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIAuthMiddleware

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

APIAuthMiddleware handles API key authentication

func NewAPIAuthMiddleware

func NewAPIAuthMiddleware(enabled bool) *APIAuthMiddleware

NewAPIAuthMiddleware creates a new API auth middleware

func (*APIAuthMiddleware) Middleware

func (m *APIAuthMiddleware) Middleware(next http.Handler) http.Handler

Middleware wraps an HTTP handler with API key authentication

type BucketHandler

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

BucketHandler handles bucket operations

func NewBucketHandler

func NewBucketHandler(sharedDir string) *BucketHandler

NewBucketHandler creates a new bucket handler

func (*BucketHandler) Handle

func (h *BucketHandler) Handle(w http.ResponseWriter, r *http.Request)

Handle routes bucket requests based on method

type CreatePresignRequest added in v0.2.0

type CreatePresignRequest struct {
	Bucket       string `json:"bucket"`
	Key          string `json:"key"`
	Method       string `json:"method"`       // GET or PUT, default GET
	ExpiresIn    *int64 `json:"expiresIn"`    // seconds
	MaxDownloads *int   `json:"maxDownloads"` // optional
}

type KeysHandler

type KeysHandler struct{}

KeysHandler handles API key management

func NewKeysHandler

func NewKeysHandler() *KeysHandler

NewKeysHandler creates a new keys handler

func (*KeysHandler) Handle

func (h *KeysHandler) Handle(w http.ResponseWriter, r *http.Request)

Handle routes key management requests

type ObjectHandler

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

ObjectHandler handles object operations

func NewObjectHandler

func NewObjectHandler(sharedDir string) *ObjectHandler

NewObjectHandler creates a new object handler

func (*ObjectHandler) Handle

func (h *ObjectHandler) Handle(w http.ResponseWriter, r *http.Request)

Handle routes object requests based on method

type PresignHandler added in v0.2.0

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

func NewPresignHandler added in v0.2.0

func NewPresignHandler(sharedDir string) *PresignHandler

func (*PresignHandler) Handle added in v0.2.0

func (h *PresignHandler) Handle(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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