omnistorage

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 5 Imported by: 0

README

OmniStorage

Go CI Go Lint Go SAST Go Report Card Docs Visualization License

Unified storage abstraction layer for Go. This is an aggregator package that re-exports the core interfaces from omnistorage-core and imports all provider backends for automatic registration.

Installation

go get github.com/plexusone/omnistorage

Quick Start

import (
    "github.com/plexusone/omnistorage"
)

// All backends are automatically registered via init()
backend, err := omnistorage.Open("s3", map[string]string{
    "bucket": "my-bucket",
    "region": "us-east-1",
})

Included Backends

Backend Provider Registry Name
Amazon S3 omni-aws s3
GitHub Releases omni-github github
Google Cloud Storage omni-google gcs
Google Drive omni-google gdrive

Minimal Dependencies

For minimal dependencies, import omnistorage-core directly and only the specific provider backends you need:

import (
    "github.com/plexusone/omnistorage-core/object"
    _ "github.com/plexusone/omni-aws/omnistorage/backend/s3"
)

backend, err := object.Open("s3", map[string]string{
    "bucket": "my-bucket",
    "region": "us-east-1",
})

Documentation

License

MIT

Documentation

Overview

Package omnistorage provides a unified storage abstraction layer for Go.

This is an aggregator package that re-exports the core interfaces from omnistorage-core and imports all provider backends for automatic registration.

For minimal dependencies, import omnistorage-core directly and only the specific provider backends you need.

Object Storage

For file/blob storage (documents, media, backups):

import (
    "github.com/plexusone/omnistorage"
    _ "github.com/plexusone/omni-aws/omnistorage/backend/s3"
)

backend, _ := omnistorage.Open("s3", map[string]string{
    "bucket": "my-bucket",
    "region": "us-east-1",
})

Key-Value Storage

For session state, caching, and structured data:

import "github.com/plexusone/omnistorage-core/kvs/backend/sqlite"

store, _ := sqlite.New(sqlite.Config{Path: "data.db"})
store.Set(ctx, "session:123", data, time.Hour)

Index

Constants

View Source
const (
	HashMD5    = object.HashMD5
	HashSHA1   = object.HashSHA1
	HashSHA256 = object.HashSHA256
	HashCRC32C = object.HashCRC32C
)

Re-export hash types.

Variables

View Source
var (
	// Register registers a backend factory.
	Register = object.Register

	// Open creates a backend from the registry.
	Open = object.Open

	// WithContentType sets the content type for a writer.
	WithContentType = object.WithContentType

	// WithMetadata sets metadata for a writer.
	WithMetadata = object.WithMetadata

	// WithOffset sets the read offset.
	WithOffset = object.WithOffset

	// WithLimit sets the read limit.
	WithLimit = object.WithLimit

	// ApplyWriterOptions applies writer options.
	ApplyWriterOptions = object.ApplyWriterOptions

	// ApplyReaderOptions applies reader options.
	ApplyReaderOptions = object.ApplyReaderOptions
)

Re-export core functions.

View Source
var (
	ErrNotFound         = object.ErrNotFound
	ErrPermissionDenied = object.ErrPermissionDenied
	ErrBackendClosed    = object.ErrBackendClosed
	ErrNotSupported     = object.ErrNotSupported
	ErrInvalidPath      = object.ErrInvalidPath
	ErrWriterClosed     = object.ErrWriterClosed
)

Re-export core errors.

Functions

This section is empty.

Types

type Backend

type Backend = object.Backend

Backend represents a storage backend (S3, GCS, local file, etc.).

type ExtendedBackend

type ExtendedBackend = object.ExtendedBackend

ExtendedBackend extends Backend with additional operations.

type Features

type Features = object.Features

Features describes capabilities of a backend.

type HashType

type HashType = object.HashType

HashType identifies a hash algorithm.

type ObjectInfo

type ObjectInfo = object.ObjectInfo

ObjectInfo contains metadata about a stored object.

type ReaderOption

type ReaderOption = object.ReaderOption

ReaderOption configures a reader.

type RecordReader

type RecordReader = object.RecordReader

RecordReader reads framed records from an underlying reader.

type RecordWriter

type RecordWriter = object.RecordWriter

RecordWriter writes framed records to an underlying writer.

type WriterOption

type WriterOption = object.WriterOption

WriterOption configures a writer.

Jump to

Keyboard shortcuts

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