vault

command module
v0.0.0-...-04ab2b7 Latest Latest
Warning

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

Go to latest
Published: Nov 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.

README

Vault

Permanent, deduplicated storage layer for Webtor.

Quick start

Build (generates Swagger and binary):

make build

Run (env example):

WEB_PORT=8080 \
PG_HOST=127.0.0.1 PG_PORT=5432 PG_USER=postgres PG_PASSWORD=postgres PG_DB=vault \
S3_ENDPOINT=http://127.0.0.1:9000 S3_REGION=us-east-1 S3_BUCKET=vault S3_ACCESS_KEY=minio S3_SECRET_KEY=miniosecret \
./vault serve

Swagger UI: http://localhost:8080/swagger/index.html

Configuration

  • Web: WEB_HOST (default: empty), WEB_PORT (default: 8080)
  • Postgres: PG_HOST, PG_PORT, PG_USER, PG_PASSWORD, PG_DB
  • S3: S3_ENDPOINT, S3_REGION, S3_BUCKET, S3_ACCESS_KEY, S3_SECRET_KEY

More flags (health/pprof/metrics, etc.) are provided by common-services.

API (short)

  • PUT /resource/{id} — queue store, returns 202 with resource
  • PUT /resource/{id}/uids — replace the pledgers' uids, status unchanged; 404 when missing
  • GET /resource/{id} — fetch resource or 404
  • GET /resource/{id}/files — a stored resource's pledgers' uids and stored files (path, size), one per path; 404 unless stored
  • DELETE /resource/{id} — queue delete or cancel queued store
  • GET/HEAD /webseed/{id}/{path} — serve stored file with Range support

License

See LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
uploads
Package uploads classifies resource ids.
Package uploads classifies resource ids.

Jump to

Keyboard shortcuts

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