Documentation
¶
Index ¶
- func GetSingletonClient[T any](name ClientName, ctx context.Context, clientGenFn func(cfg aws.Config) T, ...) T
- func ProxyProcessLambdaEvent(ctx context.Context, event events.SQSEvent, ...) error
- func StructToAttributeValueMap(s any, modify ...func(key string, val any) any) (map[string]types.AttributeValue, error)
- type ClientName
- type CloudWatchLogsProxy
- type DynamoDBTableProxy
- func (table *DynamoDBTableProxy[O]) ProxyCreateTableAndWaitActive(input *dynamodb.CreateTableInput) (*dynamodb.CreateTableOutput, error)
- func (table *DynamoDBTableProxy[O]) ProxyDeleteItem(input *dynamodb.DeleteItemInput) (*O, error)
- func (table *DynamoDBTableProxy[O]) ProxyDeleteTableAndWait() (*dynamodb.DeleteTableOutput, error)
- func (table *DynamoDBTableProxy[O]) ProxyGetItem(input *dynamodb.GetItemInput) (*O, error)
- func (table *DynamoDBTableProxy[O]) ProxyPutItem(input *dynamodb.PutItemInput) (*O, error)
- func (table *DynamoDBTableProxy[O]) ProxyQuery(input *dynamodb.QueryInput) ([]*O, error)
- func (table *DynamoDBTableProxy[O]) ProxyQueryBatchUpdate(input *dynamodb.QueryInput, ...) *sync.WaitGroup
- func (table *DynamoDBTableProxy[O]) ProxyScan(input *dynamodb.ScanInput) ([]*O, error)
- func (table *DynamoDBTableProxy[O]) ProxyScanWithCalback(input *dynamodb.ScanInput, ...) *sync.WaitGroup
- func (table *DynamoDBTableProxy[O]) ProxyTableHasGSI(gsiName string) bool
- func (table *DynamoDBTableProxy[O]) ProxyTableIsActive() bool
- func (table *DynamoDBTableProxy[O]) ProxyUpdateItem(input *dynamodb.UpdateItemInput) (*O, error)
- type IRepository
- type Repository
- func (r *Repository[PKey]) Delete(ctx context.Context, pKey PKey) (*map[string]any, error)
- func (r *Repository[PKey]) Get(ctx context.Context, pKey PKey, columns ...string) (*map[string]any, error)
- func (r *Repository[PKey]) GetDynamoDBTableProxy(ctx context.Context) DynamoDBTableProxy[map[string]any]
- func (r *Repository[PKey]) GetPKeyKeys() []string
- func (r *Repository[PKey]) Merge(ctx context.Context, pKey PKey, expr expression.Expression) (*map[string]any, error)
- func (r *Repository[PKey]) Query(ctx context.Context, indexName string, expr expression.Expression) ([]*map[string]any, error)
- func (r *Repository[PKey]) QueryBatchUpdate(ctx context.Context, indexName string, expr expression.Expression, ...)
- type S3Proxy
- func (p *S3Proxy) IsVersioning() (bool, error)
- func (p *S3Proxy) ProxyGetObject(subPath string, parsingFunc func(content []byte) (any, error)) (any, error)
- func (p *S3Proxy) ProxyGetObjectVersionId(subPath string) (string, error)
- func (p *S3Proxy) ProxyObjectExists(subPath string) bool
- func (p *S3Proxy) ProxyPutObject(subPath string, object []byte) error
- type S3ProxyObject
- type SESProxy
- type SESProxyEmailInput
- type SESProxyTemplateEmailInput
- type SESProxyTemplateInput
- type SNSProxy
- type SNSProxyTemplateNotificationInput
- type SQSProxy
- type STSProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSingletonClient ¶
func GetSingletonClient[T any](name ClientName, ctx context.Context, clientGenFn func(cfg aws.Config) T, optFns ...func(*config.LoadOptions) error) T
func ProxyProcessLambdaEvent ¶
Types ¶
type ClientName ¶
type ClientName string
const ( ClientName_STS ClientName = "STS" ClientName_DynamoDB ClientName = "DynamoDB" ClientName_SQS ClientName = "SQS" ClientName_SNS ClientName = "SNS" ClientName_S3 ClientName = "S3" ClientName_SES ClientName = "SES" ClientName_CloudWatch ClientName = "CloudWatch" )
type CloudWatchLogsProxy ¶
type CloudWatchLogsProxy struct {
*cloudwatchlogs.Client
Context *context.Context
LogGroup string
}
func GetCloudWatchLogProxy ¶
func GetCloudWatchLogProxy(ctx context.Context, optFns ...func(*config.LoadOptions) error) CloudWatchLogsProxy
func (*CloudWatchLogsProxy) CreateLogGroup ¶
func (p *CloudWatchLogsProxy) CreateLogGroup() error
func (*CloudWatchLogsProxy) CreateLogStream ¶
func (p *CloudWatchLogsProxy) CreateLogStream() error
func (*CloudWatchLogsProxy) GetTimedLogStreamName ¶
func (p *CloudWatchLogsProxy) GetTimedLogStreamName(interval int) *string
func (*CloudWatchLogsProxy) SendMessage ¶
func (p *CloudWatchLogsProxy) SendMessage(message string) error
type DynamoDBTableProxy ¶
type DynamoDBTableProxy[O any] struct { *dynamodb.Client Context *context.Context TableName string }
func GetDynamoDBTableProxy ¶
func GetDynamoDBTableProxy[O any](name string, ctx context.Context, optFns ...func(*config.LoadOptions) error) DynamoDBTableProxy[O]
func (*DynamoDBTableProxy[O]) ProxyCreateTableAndWaitActive ¶
func (table *DynamoDBTableProxy[O]) ProxyCreateTableAndWaitActive(input *dynamodb.CreateTableInput) (*dynamodb.CreateTableOutput, error)
func (*DynamoDBTableProxy[O]) ProxyDeleteItem ¶
func (table *DynamoDBTableProxy[O]) ProxyDeleteItem(input *dynamodb.DeleteItemInput) (*O, error)
func (*DynamoDBTableProxy[O]) ProxyDeleteTableAndWait ¶
func (table *DynamoDBTableProxy[O]) ProxyDeleteTableAndWait() (*dynamodb.DeleteTableOutput, error)
func (*DynamoDBTableProxy[O]) ProxyGetItem ¶
func (table *DynamoDBTableProxy[O]) ProxyGetItem(input *dynamodb.GetItemInput) (*O, error)
func (*DynamoDBTableProxy[O]) ProxyPutItem ¶
func (table *DynamoDBTableProxy[O]) ProxyPutItem(input *dynamodb.PutItemInput) (*O, error)
func (*DynamoDBTableProxy[O]) ProxyQuery ¶
func (table *DynamoDBTableProxy[O]) ProxyQuery(input *dynamodb.QueryInput) ([]*O, error)
func (*DynamoDBTableProxy[O]) ProxyQueryBatchUpdate ¶
func (table *DynamoDBTableProxy[O]) ProxyQueryBatchUpdate(input *dynamodb.QueryInput, callback func(item *O, batchRequests *[]types.WriteRequest) *[]types.WriteRequest) *sync.WaitGroup
func (*DynamoDBTableProxy[O]) ProxyScan ¶
func (table *DynamoDBTableProxy[O]) ProxyScan(input *dynamodb.ScanInput) ([]*O, error)
func (*DynamoDBTableProxy[O]) ProxyScanWithCalback ¶
func (table *DynamoDBTableProxy[O]) ProxyScanWithCalback(input *dynamodb.ScanInput, callback func(item *O, batchRequests []types.WriteRequest) []types.WriteRequest) *sync.WaitGroup
func (*DynamoDBTableProxy[O]) ProxyTableHasGSI ¶
func (table *DynamoDBTableProxy[O]) ProxyTableHasGSI(gsiName string) bool
func (*DynamoDBTableProxy[O]) ProxyTableIsActive ¶
func (table *DynamoDBTableProxy[O]) ProxyTableIsActive() bool
func (*DynamoDBTableProxy[O]) ProxyUpdateItem ¶
func (table *DynamoDBTableProxy[O]) ProxyUpdateItem(input *dynamodb.UpdateItemInput) (*O, error)
type IRepository ¶
type IRepository[PKey any] interface { Get(ctx context.Context, pKey PKey, columns ...string) (*map[string]any, error) Query(ctx context.Context, indexName string, expr expression.Expression) ([]*map[string]any, error) Merge(ctx context.Context, pKey PKey, expr expression.Expression) (*map[string]any, error) Delete(ctx context.Context, pKey PKey) (*map[string]any, error) GetDynamoDBTableProxy(ctx context.Context) *DynamoDBTableProxy[map[string]any] GetPKeyKeys() []string }
type Repository ¶
type Repository[PKey any] struct { IRepository[PKey] TableName string }
func (*Repository[PKey]) GetDynamoDBTableProxy ¶
func (r *Repository[PKey]) GetDynamoDBTableProxy(ctx context.Context) DynamoDBTableProxy[map[string]any]
func (*Repository[PKey]) GetPKeyKeys ¶
func (r *Repository[PKey]) GetPKeyKeys() []string
func (*Repository[PKey]) Merge ¶
func (r *Repository[PKey]) Merge(ctx context.Context, pKey PKey, expr expression.Expression) (*map[string]any, error)
func (*Repository[PKey]) Query ¶
func (r *Repository[PKey]) Query(ctx context.Context, indexName string, expr expression.Expression) ([]*map[string]any, error)
func (*Repository[PKey]) QueryBatchUpdate ¶
func (r *Repository[PKey]) QueryBatchUpdate(ctx context.Context, indexName string, expr expression.Expression, callback func(item *map[string]any, batchRequests *[]types.WriteRequest) *[]types.WriteRequest)
type S3Proxy ¶
type S3Proxy struct {
*s3.Client
Context context.Context
BucketName string
Versioning *bool
Lock sync.Mutex
}
func (*S3Proxy) IsVersioning ¶
func (*S3Proxy) ProxyGetObject ¶
func (*S3Proxy) ProxyGetObjectVersionId ¶
func (*S3Proxy) ProxyObjectExists ¶
type S3ProxyObject ¶
type SESProxy ¶
func GetSesProxy ¶
func (*SESProxy) ProxyGetTemplateMessage ¶
func (p *SESProxy) ProxyGetTemplateMessage(input SESProxyTemplateInput) (string, string, error)
func (*SESProxy) ProxySendEmail ¶
func (p *SESProxy) ProxySendEmail(input *SESProxyEmailInput) (*ses.SendEmailOutput, error)
func (*SESProxy) ProxySendTemplateEmail ¶
func (p *SESProxy) ProxySendTemplateEmail(input *SESProxyTemplateEmailInput) (*ses.SendEmailOutput, error)
type SESProxyEmailInput ¶
type SESProxyTemplateInput ¶
type SNSProxy ¶
func GetSnsProxy ¶
func (*SNSProxy) ProxySendPhoneNotification ¶
func (*SNSProxy) ProxySendTemplateNotification ¶
func (s *SNSProxy) ProxySendTemplateNotification(input *SNSProxyTemplateNotificationInput) (*sns.PublishOutput, error)
type SQSProxy ¶
type SQSProxy struct {
*sqs.Client
Context context.Context
QueueName string
AccountId string
QueueArn string
QueueUrl string
Region string
// contains filtered or unexported fields
}
func GetSqsProxy ¶
func (*SQSProxy) ProxyInitializeByArn ¶
func (*SQSProxy) ProxyInitializeByName ¶
func (*SQSProxy) ProxyProcessNextMessages ¶
Click to show internal directories.
Click to hide internal directories.