Documentation ¶
Index ¶
- func InitializeDynamoDb(tableName string, schema *dynamodb.CreateTableInput, db DynamoDBTableCreator) error
- func InitializeS3Bucket(bucketName, region string, svc AWSS3BucketClient) error
- func NewAwsSession(sessionConfig AWSSessionConfig) (*aws.Config, error)
- func NewDynamoDbClient(sessionConfig AWSSessionConfig) *dynamodb.Client
- func NewS3Client(sessionConfig AWSSessionConfig) *s3.Client
- type AWSS3BucketClient
- type AWSSessionConfig
- type DynamoDBTableCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeDynamoDb ¶
func InitializeDynamoDb(tableName string, schema *dynamodb.CreateTableInput, db DynamoDBTableCreator) error
InitializeDynamoDb - checks if table exists, in case it doesn't it creates it
func InitializeS3Bucket ¶
func InitializeS3Bucket(bucketName, region string, svc AWSS3BucketClient) error
InitializeS3Bucket - checks if bucket exists, in case it doesn't it creates it
func NewAwsSession ¶
func NewAwsSession(sessionConfig AWSSessionConfig) (*aws.Config, error)
Create new AWS Session with provided API key, Secret and Region
func NewDynamoDbClient ¶
func NewDynamoDbClient(sessionConfig AWSSessionConfig) *dynamodb.Client
Create new DynamoDB client
func NewS3Client ¶
func NewS3Client(sessionConfig AWSSessionConfig) *s3.Client
NewS3Client Create new S3 client
Types ¶
type AWSS3BucketClient ¶ added in v0.0.33
type AWSS3BucketClient interface { HeadBucket(ctx context.Context, params *s3.HeadBucketInput, optFns ...func(*s3.Options)) (*s3.HeadBucketOutput, error) CreateBucket(ctx context.Context, params *s3.CreateBucketInput, optFns ...func(*s3.Options)) (*s3.CreateBucketOutput, error) PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error) GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error) }
type AWSSessionConfig ¶ added in v0.0.73
type DynamoDBTableCreator ¶ added in v0.0.33
type DynamoDBTableCreator interface { DescribeTable(ctx context.Context, params *dynamodb.DescribeTableInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DescribeTableOutput, error) CreateTable(ctx context.Context, params *dynamodb.CreateTableInput, optFns ...func(*dynamodb.Options)) (*dynamodb.CreateTableOutput, error) Scan(ctx context.Context, in *dynamodb.ScanInput, optFns ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error) GetItem(ctx context.Context, in *dynamodb.GetItemInput, opsFns ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error) PutItem(ctx context.Context, in *dynamodb.PutItemInput, opsFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error) UpdateItem(ctx context.Context, in *dynamodb.UpdateItemInput, opsFns ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error) DeleteItem(ctx context.Context, in *dynamodb.DeleteItemInput, opsFns ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error) Query(ctx context.Context, in *dynamodb.QueryInput, optFns ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error) }
Click to show internal directories.
Click to hide internal directories.