httpserver

package
v0.0.0-...-dbc3dc5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Header names, not credentials.
	HeaderMetadataToken = "X-Metadata-Token" //nolint:gosec
	HeaderBlobToken     = "X-Blob-Token"     //nolint:gosec
	HeaderDeletionToken = "X-Deletion-Token" //nolint:gosec

)
View Source
const (
	HeaderPartOffset = "X-Part-Offset"
	HeaderPartSize   = "X-Part-Size"
	HeaderPartSHA256 = "X-Part-SHA256"
)

Variables

This section is empty.

Functions

func Liveness

func Liveness(c echo.Context) error

func ReadinessWithDB

func ReadinessWithDB(pinger Pinger) echo.HandlerFunc

Types

type App

type App struct {
	SecretMetrics *metrics.SecretMetrics
	// contains filtered or unexported fields
}

func New

func New(cfg config.Config, pool *pgxpool.Pool, secretRepo domain.Repo, fileStore domain.MultipartFileStore, reg *prometheus.Registry) (*App, error)

func (*App) Shutdown

func (a *App) Shutdown(ctx context.Context) error

func (*App) Start

func (a *App) Start() error

type Pinger

type Pinger interface {
	Ping(ctx context.Context) error
}

type SecretHandler

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

SecretHandler serves everything a client does with an existing secret: metadata, retrieval sessions, range reads and deletion. Secrets are created through UploadHandler's multipart upload sessions.

func NewSecretHandler

func NewSecretHandler(repo domain.SecretRepo, fileStore domain.FileStore, m *metrics.SecretMetrics) *SecretHandler

func (*SecretHandler) DeleteSecret

func (h *SecretHandler) DeleteSecret(c echo.Context) error

func (*SecretHandler) RetrieveSecretRange

func (h *SecretHandler) RetrieveSecretRange(c echo.Context) error

func (*SecretHandler) SecretMetadata

func (h *SecretHandler) SecretMetadata(c echo.Context) error

func (*SecretHandler) StartRetrievalSession

func (h *SecretHandler) StartRetrievalSession(c echo.Context) error

type UploadHandler

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

func NewUploadHandler

func NewUploadHandler(repo domain.UploadSessionRepo, fileStore domain.MultipartFileStore, maxFileSize int64, m *metrics.SecretMetrics) *UploadHandler

func (*UploadHandler) AbortUploadSession

func (h *UploadHandler) AbortUploadSession(c echo.Context) error

func (*UploadHandler) CompleteUploadSession

func (h *UploadHandler) CompleteUploadSession(c echo.Context) error

func (*UploadHandler) CreateUploadSession

func (h *UploadHandler) CreateUploadSession(c echo.Context) error

func (*UploadHandler) UploadPart

func (h *UploadHandler) UploadPart(c echo.Context) error

Jump to

Keyboard shortcuts

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