cloud

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

Exists return true if a path does really exist

Types

type AWSSession

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

AWSSession represent a live session to AWS services

func NewAWSSession

func NewAWSSession(akid string, secret string, endpoint string, region string, bucket string) (*AWSSession, error)

NewAWSSession create a new session

func NewAWSSessionFromEnvironment

func NewAWSSessionFromEnvironment() (*AWSSession, error)

NewAWSSessionFromEnvironment create a new session from environment variable. This will be looking for the environment variable AWS_S3_ENDPOINT, AWS_S3_REGION and AWS_S3_BUCKET

func (*AWSSession) GetBucket

func (a *AWSSession) GetBucket() string

GetBucket associated with a session

func (*AWSSession) GetCredentials

func (a *AWSSession) GetCredentials() (credentials.Value, error)

GetCredentials from the established session

func (*AWSSession) UploadFile

func (a *AWSSession) UploadFile(localFile string, s3FilePath string) error

UploadFile to a S3 bucket

Jump to

Keyboard shortcuts

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