Documentation ¶
Index ¶
- func Concat[A any](lists ...[]A) []A
- func CopyByJson(source, dest any) error
- func Every[A any](in []A, fn func(val A, index int) bool) bool
- func Exists[A any](in []A, fn func(val A, index int) bool) bool
- func Filter[A any](in []A, fn func(val A, index int) bool) []A
- func Flatten[A any](in [][]A) []A
- func GroupBy[A any, B comparable](in []A, fn func(val A, index int) B) map[B][]A
- func Includes[A any](in []A, val A) bool
- func Keys[A comparable, B any](in map[A]B) []A
- func Map[A, B any](in []A, fn func(val A, index int) B) []B
- func MapOrError[A, B any](in []A, fn func(A, int) (B, error)) (out []B, err error)
- func NewRetryer() aws.Retryer
- func OversizePartition[A any](list []A, size int, goOverSize func(previous, current A) bool) [][]A
- func Partition[A any](list []A, size int) [][]A
- func Permutations[T any](vals []T) [][]T
- func Range(begin, end, increment int) []int
- func Reduce[A, B any](in []A, fn func(result B, current A, index int) B, initial B) (r B)
- func Reverse[A any](in []A) []A
- func Some[A any](in []A, fn func(val A, index int) bool) bool
- func ToDynamoDBAttributeValue(val *dynamodbv1.AttributeValue) (*events.DynamoDBAttributeValue, error)
- func ToLambdaDynamoDB(attributes map[string]types.AttributeValue) map[string]events.DynamoDBAttributeValue
- func ToSDKDynamoDB(attributes map[string]events.DynamoDBAttributeValue) map[string]types.AttributeValue
- func ToSDKDynamoDBAttribute(a events.DynamoDBAttributeValue) types.AttributeValue
- func ToV2AttributeValueMap(m map[string]*dynamodbv1.AttributeValue) (map[string]types.AttributeValue, error)
- func Unique[A comparable](l []A) []A
- func UniqueBy[A, B comparable](l []A, by func(A, int) B) []A
- func Values[A comparable, B any](in map[A]B) []B
- type Entry
- type LocalResolver
- type NoOpRateLimit
- type Retryer
- func (r *Retryer) GetInitialToken() (releaseToken func(error) error)
- func (r *Retryer) GetRetryToken(ctx context.Context, opErr error) (releaseToken func(error) error, err error)
- func (r *Retryer) IsErrorRetryable(err error) bool
- func (r *Retryer) MaxAttempts() int
- func (r *Retryer) RetryDelay(attempt int, opErr error) (time.Duration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyByJson ¶
func GroupBy ¶
func GroupBy[A any, B comparable](in []A, fn func(val A, index int) B) map[B][]A
func Keys ¶
func Keys[A comparable, B any](in map[A]B) []A
func MapOrError ¶
func NewRetryer ¶
func OversizePartition ¶
func Permutations ¶
func Permutations[T any](vals []T) [][]T
Permutations generates all permutations of the input slice of any type.
func ToDynamoDBAttributeValue ¶
func ToDynamoDBAttributeValue(val *dynamodbv1.AttributeValue) (*events.DynamoDBAttributeValue, error)
func ToLambdaDynamoDB ¶
func ToLambdaDynamoDB(attributes map[string]types.AttributeValue) map[string]events.DynamoDBAttributeValue
func ToSDKDynamoDB ¶
func ToSDKDynamoDB(attributes map[string]events.DynamoDBAttributeValue) map[string]types.AttributeValue
func ToSDKDynamoDBAttribute ¶
func ToSDKDynamoDBAttribute(a events.DynamoDBAttributeValue) types.AttributeValue
func ToV2AttributeValueMap ¶
func ToV2AttributeValueMap(m map[string]*dynamodbv1.AttributeValue) (map[string]types.AttributeValue, error)
func Unique ¶
func Unique[A comparable](l []A) []A
func UniqueBy ¶
func UniqueBy[A, B comparable](l []A, by func(A, int) B) []A
func Values ¶
func Values[A comparable, B any](in map[A]B) []B
Types ¶
type Entry ¶
type Entry[A comparable, B any] struct { Key A `json:"key"` Value B `json:"value"` }
func Entries ¶
func Entries[A comparable, B any](in map[A]B) []Entry[A, B]
type LocalResolver ¶
type LocalResolver struct {
URL string
}
func (*LocalResolver) ResolveEndpoint ¶
func (r *LocalResolver) ResolveEndpoint(service, region string) (aws.Endpoint, error)
type NoOpRateLimit ¶
type NoOpRateLimit struct{}
func (NoOpRateLimit) AddTokens ¶
func (NoOpRateLimit) AddTokens(uint) error
type Retryer ¶
type Retryer struct {
// contains filtered or unexported fields
}
func (*Retryer) GetInitialToken ¶
func (*Retryer) GetRetryToken ¶
func (*Retryer) IsErrorRetryable ¶
func (*Retryer) MaxAttempts ¶
Click to show internal directories.
Click to hide internal directories.