Documentation ¶
Index ¶
- Variables
- func BreakUpList(objectList []*S3Obj, limitSize int64) [][]*S3Obj
- func Debugf(ctx context.Context, format string, v ...interface{})
- func DeleteAllMultiparts(client *s3.Client, bucket string) error
- func Errorf(ctx context.Context, format string, v ...interface{})
- func Extract(ctx context.Context, svc *s3.Client, prefix string, opts *S3TarS3Options) error
- func ExtractBucketAndPath(s3url string) (bucket string, path string)
- func Fatalf(ctx context.Context, format string, v ...interface{})
- func GenerateToc(tarFile, outputToc string, opts *S3TarS3Options) error
- func Infof(ctx context.Context, format string, v ...interface{})
- func ServerSideTar(ctx context.Context, svc *s3.Client, opts *S3TarS3Options) error
- func SetLogLevel(ctx context.Context, level int) context.Context
- func SetupLogger(incoming context.Context) context.Context
- func StringToInt64(s string) (int64, error)
- func Warnf(ctx context.Context, format string, v ...interface{})
- func WithBucketAndKey(bucket, key string) func(*S3Obj)
- func WithETag(etag string) func(*S3Obj)
- func WithExtractPrefix(prefix string) func(*S3TarS3Options)
- func WithSize(size int64) func(*S3Obj)
- func WithStorageClass(sc string) func(*S3TarS3Options)
- func WithTarFormat(format string) func(options *S3TarS3Options)
- type ArchiveClient
- func (a *ArchiveClient) Create(ctx context.Context, options *S3TarS3Options, ...) error
- func (a *ArchiveClient) CreateFromList(ctx context.Context, objectList []*S3Obj, options *S3TarS3Options, ...) error
- func (a *ArchiveClient) Extract(ctx context.Context, options *S3TarS3Options, ...) error
- func (a *ArchiveClient) List(ctx context.Context, archiveS3Url string, options *S3TarS3Options, ...) (TOC, error)
- type Archiver
- type FileMetadata
- type Index
- type Logger
- type PartsMessage
- type RecursiveConcat
- type RecursiveConcatOptions
- type S3Obj
- func ListAllObjects(ctx context.Context, client *s3.Client, Bucket, Prefix string, ...) ([]*S3Obj, int64, error)
- func LoadCSV(ctx context.Context, svc *s3.Client, fpath string, skipHeader bool) ([]*S3Obj, int64, error)
- func NewS3Obj() *S3Obj
- func NewS3ObjFromObject(o types.Object) *S3Obj
- func NewS3ObjOptions(options ...func(*S3Obj)) *S3Obj
- type S3TarS3Options
- type TOC
- type VirtualArchive
Constants ¶
This section is empty.
Variables ¶
var ErrUnableToAccess = errors.New("unable to access")
Functions ¶
func BreakUpList ¶ added in v1.0.10
func DeleteAllMultiparts ¶
DeleteAllMultiparts helper function to clear ALL MultipartUploads in a bucket. This will delete all incomplete (or in progress) MPUs for a bucket.
func Errorf ¶ added in v1.0.3
Errorf, always log regardless of log level, but don't stop the application
func Extract ¶
Extract will unpack the tar file from source to target without downloading the archive locally. The archive has to be created with the manifest option.
func ExtractBucketAndPath ¶
ExtractBucketAndPath helper function to extract bucket and key from s3://bucket/prefix/key URLs
func GenerateToc ¶ added in v1.0.6
func GenerateToc(tarFile, outputToc string, opts *S3TarS3Options) error
GenerateToc creates a TOC csv of an existing TAR file (not created by s3tar) tar file MUST NOT have compression. tar file must be on the local file system to. TODO: It should be possible to generate a TOC from an existing TAR already by only reading the headers and skipping the data.
func ServerSideTar ¶
func StringToInt64 ¶
func WithBucketAndKey ¶
func WithExtractPrefix ¶ added in v1.0.9
func WithExtractPrefix(prefix string) func(*S3TarS3Options)
func WithStorageClass ¶ added in v1.0.9
func WithStorageClass(sc string) func(*S3TarS3Options)
func WithTarFormat ¶ added in v1.0.9
func WithTarFormat(format string) func(options *S3TarS3Options)
Types ¶
type ArchiveClient ¶ added in v1.0.9
type ArchiveClient struct {
// contains filtered or unexported fields
}
func (*ArchiveClient) Create ¶ added in v1.0.9
func (a *ArchiveClient) Create(ctx context.Context, options *S3TarS3Options, optFns ...func(options *S3TarS3Options)) error
Create an archive from existing files in Amazon S3.
func (*ArchiveClient) CreateFromList ¶ added in v1.0.10
func (a *ArchiveClient) CreateFromList(ctx context.Context, objectList []*S3Obj, options *S3TarS3Options, optFns ...func(*S3TarS3Options)) error
func (*ArchiveClient) Extract ¶ added in v1.0.9
func (a *ArchiveClient) Extract(ctx context.Context, options *S3TarS3Options, optFns ...func(options *S3TarS3Options)) error
func (*ArchiveClient) List ¶ added in v1.0.9
func (a *ArchiveClient) List(ctx context.Context, archiveS3Url string, options *S3TarS3Options, optFns ...func(options *S3TarS3Options)) (TOC, error)
type Archiver ¶ added in v1.0.9
type Archiver interface { Create(context.Context, *S3TarS3Options, ...func(*S3TarS3Options)) error CreateFromList(context.Context, []*S3Obj, *S3TarS3Options, ...func(*S3TarS3Options)) error Extract(context.Context, *S3TarS3Options, ...func(*S3TarS3Options)) error List(context.Context, string, *S3TarS3Options, ...func(*S3TarS3Options)) (TOC, error) }
func NewArchiveClient ¶ added in v1.0.9
type PartsMessage ¶
type RecursiveConcat ¶
type RecursiveConcat struct { Client *s3.Client Region string EndpointUrl string Bucket string DstPrefix string DstKey string // contains filtered or unexported fields }
func NewRecursiveConcat ¶
func NewRecursiveConcat(ctx context.Context, options RecursiveConcatOptions, optFns ...func(*RecursiveConcatOptions)) (*RecursiveConcat, error)
func (*RecursiveConcat) ConcatObjects ¶
func (*RecursiveConcat) CreateFirstBlock ¶
func (r *RecursiveConcat) CreateFirstBlock(ctx context.Context)
type RecursiveConcatOptions ¶
type RecursiveConcatOptions struct { Client *s3.Client Region string EndpointUrl string Bucket string DstPrefix string DstKey string }
func (RecursiveConcatOptions) Copy ¶
func (o RecursiveConcatOptions) Copy() RecursiveConcatOptions
Copy creates a clone where the APIOptions list is deep copied.
type S3Obj ¶
func ListAllObjects ¶ added in v1.0.10
func NewS3ObjFromObject ¶
func NewS3ObjOptions ¶
type S3TarS3Options ¶
type S3TarS3Options struct { SrcManifest string SkipManifestHeader bool SrcBucket string SrcPrefix string SrcKey string DstBucket string DstPrefix string DstKey string Threads int DeleteSource bool Region string EndpointUrl string ExternalToc string // contains filtered or unexported fields }
S3TarS3Options options to create an archive
func (*S3TarS3Options) Copy ¶ added in v1.0.9
func (o *S3TarS3Options) Copy() S3TarS3Options
type TOC ¶ added in v1.0.2
type TOC []*FileMetadata
type VirtualArchive ¶
type VirtualArchive []*S3Obj