storage

package
v0.0.0-...-0dea507 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements the S3 interface

func (*Client) DeleteFile

func (c *Client) DeleteFile(key string) error

DeleteFile removes a query file from S3

func (*Client) GetFile

func (c *Client) GetFile(key string) (io.Reader, error)

GetFile retrieves a given file stored in S3

func (*Client) GetPaths

func (c *Client) GetPaths() ([]string, error)

GetPaths retrieves paths for files stored in S3

func (*Client) PutFile

func (c *Client) PutFile(key string, file io.Reader) error

PutFile persists a JSON file in S3

type Storage

type Storage interface {
	PutFile(string, io.Reader) error
	GetFile(string) (io.Reader, error)
	GetPaths() ([]string, error)
	DeleteFile(string) error
}

Storage provides helper methods for persisting/retrieving files

func New

func New() Storage

New generates a S3 implementation with an active client

Jump to

Keyboard shortcuts

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