store

package
v0.0.0-...-4cee859 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleCloudStorage

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

func (*GoogleCloudStorage) Init

func (g *GoogleCloudStorage) Init(ctx context.Context) error

func (*GoogleCloudStorage) Initialized

func (g *GoogleCloudStorage) Initialized() bool

func (*GoogleCloudStorage) Persist

func (g *GoogleCloudStorage) Persist(ctx context.Context, filename string, data string) error

func (*GoogleCloudStorage) Setup

func (g *GoogleCloudStorage) Setup(ctx context.Context) error

type Local

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

func (*Local) Persist

func (l *Local) Persist(ctx context.Context, filename string, data string) error

func (*Local) Setup

func (l *Local) Setup(ctx context.Context) error

type S3

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

func (*S3) Persist

func (s *S3) Persist(ctx context.Context, filename string, data string) error

func (*S3) Setup

func (s *S3) Setup(ctx context.Context) error

type S3Params

type S3Params struct {
	AccessKey        string
	SecretKey        string
	URL              string
	Bucket           string
	Region           string
	DisableSSL       bool
	S3ForcePathStyle bool
}

type Store

type Store interface {
	Setup(ctx context.Context) error
	Persist(ctx context.Context, filename string, data string) error
}

func NewGoogleCloudStorage

func NewGoogleCloudStorage(ctx context.Context, cfg *config.Config) (Store, error)

func NewLocal

func NewLocal(cfg *config.Config) Store

func NewS3

func NewS3(cfg *config.Config, params *S3Params) Store

Jump to

Keyboard shortcuts

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