s3

package
v0.0.0-...-c92edef Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeContext

func InitializeContext(ctx context.Context) context.Context

Types

type ContextKey

type ContextKey string

ContextKey defines a type to store the integration S3 session in context.Context.

type Logger

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

Logger logs the s3 operations in a configurable file.

func GetLogger

func GetLogger() *Logger

GetLogger returns the logger for s3 operations. If the logger is not created yet, it creates a new instance of Logger.

func NewLogger

func NewLogger(logsPath string) (*Logger, error)

NewLogger creates an instance of the logger. It configures the file path where the s3 operations are logged.

func (Logger) LogMessage

func (l Logger) LogMessage(message string)

Log a s3 message

type Session

type Session struct {
	AwsSession *aws_s.Session
	// contains filtered or unexported fields
}

func GetSession

func GetSession(ctx context.Context) *Session

GetSession returns the integration S3 session stored in context. Note that the context should be previously initialized with InitializeContext function.

func (*Session) CreateS3Bucket

func (s *Session) CreateS3Bucket(bucketName string) error

func (*Session) SetS3Client

func (s *Session) SetS3Client()

func (*Session) SetS3UploaderManager

func (s *Session) SetS3UploaderManager()

func (*Session) UploadFileToS3Bucket

func (s *Session) UploadFileToS3Bucket(filePath, fileName, bucketName string) error

type Steps

type Steps struct {
}

func (Steps) InitializeSteps

func (s Steps) InitializeSteps(
	ctx context.Context,
	scenCtx *godog.ScenarioContext,
) context.Context

Jump to

Keyboard shortcuts

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