awsclient

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	S3EventSource     = "s3.amazonaws.com"
	LambdaEventSource = "lambda.amazonaws.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS interface {
	GetBucketTags(ctx context.Context, bucketName string) (commons.Tags, error)
	ListBuckets(ctx context.Context) ([]*Bucket, error)
	GetFunction(ctx context.Context, functionName string) (*Function, error)
	ListFunctions(ctx context.Context) ([]*Function, error)
	Listen(ctx context.Context, handler ListenerFunc) error
	Close() error
}

func New

func New(ctx context.Context, log *logrus.Logger, c Config) (AWS, error)

type AWSMock

type AWSMock struct {
	ListenError  error
	ListenAssert func(ctx context.Context, handler ListenerFunc)

	GetBucketTagsResult commons.Tags
	GetBucketTagsError  error

	ListBucketsResult []*Bucket
	ListBucketsError  error

	GetFunctionResult *Function
	GetFunctionError  error

	ListFunctionsResult []*Function
	ListFunctionsError  error

	CloseError error
	// contains filtered or unexported fields
}

func (*AWSMock) Close

func (m *AWSMock) Close() error

func (*AWSMock) CloseInvoked

func (m *AWSMock) CloseInvoked() bool

func (*AWSMock) GetBucketTags

func (m *AWSMock) GetBucketTags(ctx context.Context, bucketName string) (commons.Tags, error)

func (*AWSMock) GetFunction

func (m *AWSMock) GetFunction(ctx context.Context, functionName string) (*Function, error)

func (*AWSMock) ListBuckets

func (m *AWSMock) ListBuckets(_ context.Context) ([]*Bucket, error)

func (*AWSMock) ListBucketsInvoked

func (m *AWSMock) ListBucketsInvoked() bool

func (*AWSMock) ListFunctions

func (m *AWSMock) ListFunctions(_ context.Context) ([]*Function, error)

func (*AWSMock) ListFunctionsInvoked

func (m *AWSMock) ListFunctionsInvoked() bool

func (*AWSMock) Listen

func (m *AWSMock) Listen(ctx context.Context, handler ListenerFunc) error

func (*AWSMock) ListenInvoked

func (m *AWSMock) ListenInvoked() bool

type Bucket

type Bucket struct {
	Name      string
	AccountID string
	Region    string
}

type Config

type Config struct {
	QueueURL        string
	Region          string
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
}

type Function

type Function struct {
	Name      string
	AccountID string
	Region    string
	ARN       string
	Tags      commons.Tags
}

type ListenerFunc

type ListenerFunc func(ctx context.Context, data []byte) error

Jump to

Keyboard shortcuts

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