backend

package
v0.0.0-...-5fddbe4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Save saves the content at the given path to the backend
	Save(path string) error
}

Backend is the interface for storing a backup to various locations

type Mock

type Mock struct {
	LogFileNames    bool
	LogFileContents bool
	// contains filtered or unexported fields
}

Mock is a mock backend that optionally logs the files it would save

func NewMock

func NewMock(fs afero.Fs) Mock

NewMock creates and initializes a new Mock backend

func (Mock) Save

func (m Mock) Save(basePath string) error

Save saves the content at the given path to the backend

type S3

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

S3 is an AWS S3 backend for storing the files

func NewS3

func NewS3(sess *session.Session, bucket string, prefix string) S3

NewS3 creates a new S3 backend that implement Backend.

func (S3) Save

func (s S3) Save(basePath string) error

Save saves the files at path to the backend

Jump to

Keyboard shortcuts

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