Documentation ¶
Index ¶
- func SetDefaultClient(ctx context.Context, client Client)
- func TableName(ctx context.Context) string
- type Client
- func GetDefaultClient(ctx context.Context) *Client
- func NewClientFromSTSCredentials(ctx context.Context, accessKeyID, secretAccessKey, sessionToken string) Client
- func NewFromConfig(ctx context.Context, cfg aws.Config) Client
- func NewLongTermCredentialClient(ctx context.Context, accessKeyID, secretAccessKey string) Client
- func (c *Client) Dynamo() DynamoMethods
- func (c *Client) EventBridge() *eventbridge.Client
- func (c *Client) S3() *awsS3.Client
- func (c *Client) SQS() *sqs.Client
- func (c *Client) TableName(ctx context.Context) string
- func (c Client) WithConfig(cfg aws.Config) Client
- func (c Client) WithTableName(tablename string) Client
- type DynamoMethods
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultClient ¶
SetDefaultClient sets the provided client as the singleton client
Types ¶
type Client ¶
Client is the primary export of this module
func GetDefaultClient ¶
GetDefaultClient returns the singleton client. If the singleton client does not exist, it will be created using the default config
func NewClientFromSTSCredentials ¶
func NewClientFromSTSCredentials(ctx context.Context, accessKeyID, secretAccessKey, sessionToken string) Client
NewClientFromSTSCredentials creates a new client appropriate for use when you have short term STS credentials like accessKeyID, secretAccessKey, and sessionToken.
func NewFromConfig ¶
NewFromConfig creates a new client when you have a custom config that you want to use.
func NewLongTermCredentialClient ¶
NewLongTermCredentialClient creates a new client appropriate for use when you have long term credentials
func (*Client) Dynamo ¶
func (c *Client) Dynamo() DynamoMethods
Dynamo returns the Dynamo client, or creates one if one doesnt exist
func (*Client) EventBridge ¶
func (c *Client) EventBridge() *eventbridge.Client
EventBridge returns the EventBridge client, or creates one if one doesnt exist
func (Client) WithTableName ¶
type DynamoMethods ¶
type DynamoMethods interface { GetItem(ctx context.Context, in *dynamodb.GetItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error) PutItem(ctx context.Context, in *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error) DeleteItem(ctx context.Context, in *dynamodb.DeleteItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error) Query(ctx context.Context, in *dynamodb.QueryInput, optFns ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error) UpdateItem(ctx context.Context, in *dynamodb.UpdateItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error) }