Documentation ¶
Overview ¶
Package sources provides implementations for the different types of source configurations available.
Index ¶
Constants ¶
const (
SourceLocalPath = "local_path"
)
const (
SourceS3 = "s3"
)
Variables ¶
This section is empty.
Functions ¶
func FromURL ¶
FromURL will take an expected source name from an external location and turn it into what can be assumed as the internal reference.
func PrepareList ¶
PrepareList will decorate a list of sources with additional details that are mostly useful externally.
Types ¶
type LocalPath ¶
type LocalPath struct { Location string `json:"location"` // contains filtered or unexported fields }
LocalPath is the source implementation of working with the local filesystem.
func NewLocalPath ¶
NewLocalPath will provision an instance of LocalPath.
func (*LocalPath) CopyTo ¶
func (l *LocalPath) CopyTo(r types.Reference, d types.Destination) (list []types.Reference, err error)
CopyTo will accept a Reference and Destination to copy the refered file to the provided destination.
func (*LocalPath) GetLocation ¶ added in v1.3.1
GetLocation will return the local path for this specific source.
func (*LocalPath) GetSubRefs ¶ added in v1.2.0
GetSubRefs...
type S3 ¶
type S3 struct { Bucket string `json:"bucket"` Depth int `json:"depth,omitempty"` Path string `json:"path"` Profile string `json:"profile,omitempty"` // contains filtered or unexported fields }
S3 is a data object that allows working with an S3 location.
func (*S3) CopyTo ¶
CopyTo will carry out the copy operation from the current bucket configuration into the provided destination.
func (*S3) GetMatchingRefs ¶
GetMatchingRefs will pull a list of references from the bucket by using the prefix capability of the S3 API for a specific file path.
func (*S3) GetRefs ¶
GetRefs will pull a full list of references for the bucket, taking into account the nature of folder-structures with the depth.
func (*S3) GetSubRefs ¶ added in v1.2.0
GetSubRefs will