internal

package
v0.0.0-...-582c38a Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DATE_FMT = "2006-01-02 15:04"

Variables

This section is empty.

Functions

func SessionForBucket

func SessionForBucket(bucket string) (*s3.S3, error)

SessionForBucket - For a given S3 bucket, create an approprate session that references the region that this bucket is located in

func SessionNew

func SessionNew() *s3.S3

SessionNew - Read the config for default credentials, if not provided use environment based variables

func ZipPack

func ZipPack(dest string, source []string) error

ZipPack given a dest file, pack all of the source files into it, recursivly

Types

type FileObject

type FileObject struct {
	Source   int64 // used by sync
	Name     string
	Size     int64
	Checksum string
}

type FileURI

type FileURI struct {
	Scheme string
	Bucket string
	Path   string
}

func FileURINew

func FileURINew(path string) (*FileURI, error)

func (*FileURI) Join

func (uri *FileURI) Join(elem string) *FileURI

Do a path.Join() style operation on this FileURI to generate a new one

func (*FileURI) Key

func (uri *FileURI) Key() *string

Return the path as a valid S3 bucket key

func (*FileURI) SetPath

func (uri *FileURI) SetPath(elem string) *FileURI

func (*FileURI) String

func (uri *FileURI) String() string

Return a string version of the path

type ZipWriter

type ZipWriter interface {
	Close() error
	AddFile(string, []byte) error
}

ZipWriter public interface for Zipping

func NewZipper

func NewZipper(writer io.Writer) ZipWriter

NewZipper construct a new zip writer

Jump to

Keyboard shortcuts

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