gostorage

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 1 Imported by: 0

README

go-storage-abstraction

unit-and-integration-tests

This repository abstracts the handling for different storage providers. In the current version of the repository, the following storage providers are supported:

  • local-storage (disk storage)
  • s3

Example

This repository provides an example of how to use it. Take a look at the example_test.go file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	// Read reads the file/object and returns the content.
	Read(key string) (io.Reader, error)
	// Write writes the content to the file/object.
	Write(key string, value io.Reader) error
	// Delete deletes the file/object.
	Delete(key string) error
	// Exists checks if the file/object exists.
	Exists(key string) (bool, error)
	// List lists all the files/objects.
	List() ([]string, error)
}

Driver is the interface that must be implemented by a storage driver. It describes the capabilities of a storage driver.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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