functions

package
v1.19.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadBucketObj

func DownloadBucketObj(templateURL string) ([]byte, error)

DownloadBucketObj returns the content for S3 bucket object

func GetBoolValueFromString added in v1.19.1

func GetBoolValueFromString(inputStr string) bool

GetBoolValueFromString returns boolean value from string

func GetVal added in v1.16.0

func GetVal[T any](ptr *T) T

GetVal function pointer of any type, validates and returns value

func PatchAWSTags added in v1.19.1

func PatchAWSTags(sourceData interface{}) interface{}

PatchAWSTags returns tags in map[string]string format instead key="" and value= ""

func String

func String(s string) *string

String returns pointer to the string object

Types

type HeadBucketAPIClient

type HeadBucketAPIClient interface {
	HeadObject(context.Context, *s3.HeadObjectInput, ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
}

HeadBucketAPIClient is an S3 API client that can invoke the HeadBucket operation.

type S3Client

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

S3Client struct is used to hold s3.Client, manager.Downloader corresponding interfaces

func NewS3Client

func NewS3Client() (*S3Client, error)

NewS3Client returns S3Client initialized with AWS credentials

type S3DownloadManager

type S3DownloadManager interface {
	Download(ctx context.Context, w io.WriterAt, input *s3.GetObjectInput, options ...func(*manager.Downloader)) (n int64, err error)
}

S3DownloadManager is an S3 manager that can invoke the Download operation.

type S3URI

type S3URI struct {
	VersionID *string
	Scheme    *string
	Bucket    *string
	Key       *string
	// contains filtered or unexported fields
}

S3URI holds the metadata for s3 url

func ParseS3URI

func ParseS3URI(u *url.URL) (*S3URI, error)

ParseS3URI returns s3 metadata given url

Jump to

Keyboard shortcuts

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