shredbx logo
shredbx shredbx shredbx shredbx Personal
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
AClaude
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
Andrei Solovev
Packages
Search packages... ⌘K
  • Data & Persistence
    • Databases 3
    • Object Storage 1
    • File Formats 2
    • Enumerations 2
    • Content 1
    • Codegen 2
  • System Integration
    • Secrets 1
    • CLI Tools 5
    • Media Processing 2
    • Adapters 2
  • UI & Components
    • Primitives 1
    • Blocks 1
    • Sections & Layouts 1
    • Entities 1
    • Media 1
    • Utilities 1
    • State & Presenter 1
    • Branding & Style 1
  • Game Engine
    • Framework 1
    • Engine 2
    • Presets 1
    • Vendor 1
Packages/ Data & Persistence/ Object Storage/ Storage
Go Package

storage

R2-compatible object storage — upload, download, presigned URLs

Go Ready MD
Upload / Download Lifecycle
$ client, _ := storage.NewClient(cfg)
[storage] endpoint: https://account.r2.cloudflarestorage.com
[storage] bucket: shredbx-assets
$ client.Upload(ctx, "images/hero.webp", file)
[upload] images/hero.webp — 245 KB
[upload] complete — etag: "a3f2b9c1"
$ url, _ := client.PresignURL(ctx, "images/hero.webp", 1*time.Hour)
https://assets.shredbx.com/images/hero.webp?X-Amz-Expires=3600&...

About

S3-compatible object storage client optimized for Cloudflare R2. Handles multipart uploads, streaming downloads, and presigned URL generation with configurable expiry and content-type detection.

Public API

NameKindSignature
Clienttypetype Client struct
NewClientfuncfunc NewClient(cfg Config) (*Client, error)
Uploadfuncfunc (c *Client) Upload(ctx context.Context, key string, r io.Reader, opts ...UploadOption) error
Downloadfuncfunc (c *Client) Download(ctx context.Context, key string) (io.ReadCloser, error)
PresignURLfuncfunc (c *Client) PresignURL(ctx context.Context, key string, expiry time.Duration) (string, error)

Dependencies

Imports (2)

config Go Ready

YAML configuration reader — typed config loading with environment overlay

yamlconfigurationenvironmenttyped-config
4 exports 4 deps
vault Go Ready

1Password vault adapter — credential retrieval, caching, op:// URI resolution

1passwordsecretscredentialsop-uri
5 exports 4 deps

Imported By (1)

webassets Go Ready

Image processing pipeline — resize, optimize, format conversion via sips/ImageMagick

imagesresizeoptimizationsipsimagemagick
5 exports 2 deps

Related Packages

webassets Go Ready

Image processing pipeline — resize, optimize, format conversion via sips/ImageMagick

imagesresizeoptimizationsipsimagemagick
5 exports 2 deps
config Go Ready

YAML configuration reader — typed config loading with environment overlay

yamlconfigurationenvironmenttyped-config
4 exports 4 deps

Source

github.com/shredbx/sbx-core/pkg/storage
r2s3-compatibleobject-storagepresigned-urls
shredbx logo shredbx shredbx shredbx shredbx Andrei Solovev

Solution Architect & Lead Software Engineer

ExperiencePortfolioResearch & ExperimentsEducationCertificationSkills
GitHub ↗LinkedIn ↗Email ↗
AVAILABLE FOR NEW PROJECTS
// MY LATEST BEATS
Hobby & Interests

Lab

  • The Lab
  • Framework
  • Components
  • Packages
  • Games
  • Process (SDLC)
  • Knowledge
  • Blog

Andrei

  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
  • Lifestyle

Team

  • Team
  • Andrei
  • Claude

Legal

  • Privacy
  • Terms
  • Cookies
© 2026 shredbx.com. All rights reserved. — Andrei Solovev |