awsutils

package
v0.0.0-...-197f3f5 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const AwsAccessKeyId = "AWS_ACCESS_KEY_ID"
View Source
const AwsProfile = "AWS_PROFILE"
View Source
const AwsRegion = "AWS_REGION"
View Source
const AwsSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
View Source
const AwsSessionToken = "AWS_SESSION_TOKEN"
View Source
const AwsSessionTokenExpiration = "AWS_SESSION_TOKEN_EXPIRATION"
View Source
const S3Proto = "s3://"
View Source
const TestAwsProfileForIT string = "dev"

Variables

This section is empty.

Functions

func GetCredentials

func GetCredentials() (*aws.Credentials, error)

func HeadS3Object

func HeadS3Object(dto S3Dto) (int64, error)

func SetCredentials

func SetCredentials(cred aws.Credentials)

func SetProfile

func SetProfile(profileName string)

func SetRegion

func SetRegion(region string)

func UnsetCredentials

func UnsetCredentials()

Types

type S3ClientApi

type S3ClientApi interface {
	GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)
	HeadObject(ctx context.Context, params *s3.HeadObjectInput, optFns ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
}

type S3Dto

type S3Dto struct {
	ObjPath string
	Client  S3ClientApi
}

func (*S3Dto) NewS3Client

func (dto *S3Dto) NewS3Client() S3ClientApi

Jump to

Keyboard shortcuts

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