helper

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// minmal are errors.MIN_AVAILABLE + get a hope free range 1000 + 10 for aws-config errors.
	ErrorResponse errors.CodeError = iota + errors.MIN_PKG_Aws + 60
	ErrorConfigEmpty
	ErrorAwsEmpty
	ErrorAws
	ErrorBucketNotFound
	ErrorParamsEmpty
)
View Source
const (
	STATE_SUSPENDED = "Suspended"
	STATE_ENABLED   = "Enabled"
)
View Source
const (
	SizeBytes     PartSize = 1
	SizeKiloBytes          = 1024 * SizeBytes
	SizeMegaBytes          = 1024 * SizeKiloBytes
	SizeGigaBytes          = 1024 * SizeMegaBytes
	SizeTeraBytes          = 1024 * SizeGigaBytes
	SizePetaBytes          = 1024 * SizeTeraBytes
)

Variables

This section is empty.

Functions

func IsErrorInit

func IsErrorInit() bool

Types

type Helper

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

func New

func New(ctx context.Context, bucket, region string) Helper

func (*Helper) Close

func (c *Helper) Close(req *http.Request, rsp *http.Response)

func (*Helper) GetBucketAws

func (c *Helper) GetBucketAws() *string

func (*Helper) GetBucketName

func (c *Helper) GetBucketName() string

func (*Helper) GetCloser

func (c *Helper) GetCloser(req *http.Request, rsp *http.Response) []io.Closer

func (*Helper) GetContext

func (cli *Helper) GetContext() context.Context

func (Helper) GetError

func (cli Helper) GetError(err ...error) liberr.Error

func (*Helper) GetRegion added in v1.5.0

func (c *Helper) GetRegion() string

func (*Helper) GetRegionAws added in v1.5.0

func (c *Helper) GetRegionAws() *string

func (*Helper) SetBucketName

func (c *Helper) SetBucketName(bucket string)

type PartSize

type PartSize int64

func SetSize

func SetSize(val int) PartSize

func SetSizeInt64

func SetSizeInt64(val int64) PartSize

func (PartSize) Int

func (p PartSize) Int() int

func (PartSize) Int64

func (p PartSize) Int64() int64

func (PartSize) String

func (p PartSize) String() string

type ReaderPartSize added in v1.4.0

type ReaderPartSize interface {
	io.Reader
	NextPart(eTag *string)
	CurrPart() int32
	CompPart() *sdktps.CompletedMultipartUpload
	IeOEF() bool
}

func NewReaderPartSize added in v1.4.0

func NewReaderPartSize(rd io.Reader, p PartSize) ReaderPartSize

Jump to

Keyboard shortcuts

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