Documentation ¶
Index ¶
- func InitializeDynamoDb(tableName string, schema *dynamodb.CreateTableInput, db DynamoDBTableCreator) error
- func InitializeS3Bucket(bucketName, region string, svc AWSS3BucketClient) error
- func NewAwsSession(key string, secret string, region string) (*aws.Config, error)
- func NewDynamoDbClient(key string, secret string, region string) *dynamodb.Client
- func NewS3Client(key string, secret string, region string) *s3.Client
- type AWSS3BucketClient
- 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 ¶
Create new AWS Session with provided API key, Secret and Region
func NewDynamoDbClient ¶
Create new DynamoDB 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 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) }
Click to show internal directories.
Click to hide internal directories.