K
KTHULU GO HUB
Menu

© 2026 Kthulu Go

Marketplace / storage

Storage

StorageModule provides file storage functionality. Supports multiple drivers: local, s3, gcs, azure

Kthulu Core0 SSG Generated

Storage

StorageModule provides file storage functionality. Supports multiple drivers: local, s3, gcs, azure

Features

  • Auto-configured Fx Module
  • Clean Architecture structure

Configuration

The module is configured via environment variables:

VariableDescription
-No environment variables detected

Installation

Add this module to your project:

kthulu add module storage

Components

This module provides the following components to the application:

  • Backend: Go module wired with Uber Fx.

Usage

func NewUploadService(store storage.Storage) *UploadService { ... }

store.PutBytes(ctx, "avatars/42.png", data)
data, _ := store.GetBytes(ctx, "avatars/42.png")
files, _ := store.List(ctx, "avatars")
url := store.URL("avatars/42.png")

Configuration

VariableDefaultDescription
STORAGE_DRIVERlocallocal (S3/GCS/Azure are scaffolded stubs)
STORAGE_ROOT./storageBase path for local files
STORAGE_URL/storageBase URL for public files

The cloud drivers (S3, GCS, Azure) are generated as typed stubs with clear errors pointing at the SDK dependency to add.

Recipe

To scaffold a complete file storage stack (uploads and folder organization) in one command:

kthulu add recipe storage

Use with: kthulu add recipe storage