Skip to main content

In-Memory Storage

objstore.NewMemoryStorage keeps everything in process memory — no disk, no network, no cleanup between test runs beyond Clear().

store := objstore.NewMemoryStorage()

// Upload
store.Put(ctx, "test.txt", strings.NewReader("hello"))

// Verify
data, _ := objstore.GetBytes(ctx, store, "test.txt")
fmt.Println(string(data)) // "hello"

// Clear all
store.Clear()

Like the local backend, memory storage has no storage server of its own, so SignedURL produces HMAC-signed URLs when configured with WithBaseURL and WithSigningSecret.