Skip to content

qubebit/polystore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PolyStore

PolyStore is a flexible and extensible Go library for unifying and abstracting different storage backends.

Github tag Go Doc Go Report Card MIT license

It supports various storage services including:

Features

  • Allows operations to be performed without worrying about the specifics of the storage backend.
  • Extensible design allows more storage backends to be added easily.

Installation

go get github.com/qubebit/polystore

Usage

First, import the storage backends you want to use:

import (
    _ "github.com/qubebit/polystore/pkg/services/fs"
    _ "github.com/qubebit/polystore/pkg/services/s3"

    "github.com/qubebit/polystore/pkg/services"
)

Then, you can create a storage instance using a connection string:

connectionString := "s3://myBucketName/my/prefix?endpoint=s3.amazonaws.com&region=region&accessKey=accessKey&secretKey=secretKey&sse=sse"
storage, err := services.New(connectionString)
if err != nil {
    // handle error
}

Adding new backends

To add a new backend, you need to implement the types.Storage interface and register a factory function for your backend in the services package. See the existing backends for examples.

License

MIT

About

A flexible and extensible Go library for unifying and abstracting different storage backends.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published