s3

package
v0.0.0-...-f22496c Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const TypeName = "go2chef.source.s3"

TypeName is the name of this source plugin

Variables

This section is empty.

Functions

func Loader

func Loader(config map[string]interface{}) (go2chef.Source, error)

Loader provides an instantiation function for this source

Types

type Source

type Source struct {
	SourceName  string `mapstructure:"name"`
	Region      string `mapstructure:"region"`
	Bucket      string `mapstructure:"bucket"`
	Key         string `mapstructure:"key"`
	Credentials struct {
		AccessKeyID     string `mapstructure:"access_key_id"`
		SecretAccessKey string `mapstructure:"secret_access_key"`
		Token           string `mapstructure:"token"`
	}
	Archive bool `mapstructure:"archive"`
	// contains filtered or unexported fields
}

Source implements an AWS s3 source plugin that copies files from a remote s3 bucket for use.

func (*Source) DownloadToPath

func (s *Source) DownloadToPath(dlPath string) error

DownloadToPath performs the actual copy of files to the working directory. We copy rather than just setting downloadPath to avoid side effects from steps affecting the original source location.

func (*Source) Name

func (s *Source) Name() string

Name returns the name of this source instance

func (*Source) SetName

func (s *Source) SetName(name string)

SetName sets the name of this source instance

func (*Source) String

func (s *Source) String() string

func (*Source) Type

func (s *Source) Type() string

Type returns the type of this source

Jump to

Keyboard shortcuts

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