s3store

package
v0.0.0-...-0071f02 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Store

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

S3Store is an S3 backed implementation of our Store interaface

func New

func New(client *s3.Client, bucket string) *S3Store

New takes an S3 client and a bucket name, and returns the S3 implementation of the Store interface

func (*S3Store) Del

func (ss *S3Store) Del(ctx context.Context, key string) error

Del takes a key, and attempts to delete the data from S3

func (*S3Store) Get

func (ss *S3Store) Get(ctx context.Context, key string) (string, error)

Get takes a key, and attempts to fetch the data from S3

func (*S3Store) Set

func (ss *S3Store) Set(ctx context.Context, key, data string) error

Set takes key and data as a string, saves it to S3, and returns the uuid under which the file is stored

Jump to

Keyboard shortcuts

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