Documentation
¶
Index ¶
- Constants
- Variables
- func Decrypt(ctx context.Context, encryptedString string) (decryptedString string, err error)
- func GenerateSignedReqV2(ctx context.Context, url, requestText, acceptType, apiKey string) (reqToFire *http.Request, err error)
- func SetClientConfig(config ClientConfig)
- func SetFirehoseClient(ctx context.Context, client FirehoseClient) context.Context
- func SetS3Client(client S3Client)
- func SetSecretsManagerClient(client SecretsManagerClient)
- func Setup(ctx context.Context, options ClientConfig, ...) error
- func SetupWithDefault(ctx context.Context) error
- func StandardizeError(ctx context.Context, err error) error
- func StopThisTask(ctx context.Context)
- type CachingSecretsManagerClient
- type ClientConfig
- type CloudS3Client
- func (adapter CloudS3Client) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput, options ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
- func (adapter CloudS3Client) GetObject(ctx context.Context, input *s3.GetObjectInput, options ...func(*s3.Options)) (*s3.GetObjectOutput, error)
- func (adapter CloudS3Client) HeadObject(ctx context.Context, input *s3.HeadObjectInput, options ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
- func (adapter CloudS3Client) ListObjectsV2(ctx context.Context, inp *s3.ListObjectsV2Input, options ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
- func (adapter CloudS3Client) PutObject(ctx context.Context, input *s3.PutObjectInput, options ...func(*s3.Options)) (*s3.PutObjectOutput, error)
- type DynamoClient
- type EcsClient
- type FirehoseClient
- type KmsClient
- type LocalFirstS3Client
- func (lfs3 LocalFirstS3Client) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput, options ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
- func (lfs3 LocalFirstS3Client) GetObject(ctx context.Context, input *s3.GetObjectInput, options ...func(*s3.Options)) (*s3.GetObjectOutput, error)
- func (lfs3 LocalFirstS3Client) HeadObject(ctx context.Context, input *s3.HeadObjectInput, options ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
- func (lfs3 LocalFirstS3Client) ListObjectsV2(ctx context.Context, input *s3.ListObjectsV2Input, ...) (*s3.ListObjectsV2Output, error)
- func (lfs3 LocalFirstS3Client) PutObject(ctx context.Context, input *s3.PutObjectInput, options ...func(*s3.Options)) (*s3.PutObjectOutput, error)
- type LocalS3Client
- func (lc LocalS3Client) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput, opts ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
- func (lc LocalS3Client) GetObject(ctx context.Context, input *s3.GetObjectInput, options ...func(*s3.Options)) (*s3.GetObjectOutput, error)
- func (lc LocalS3Client) HeadObject(ctx context.Context, input *s3.HeadObjectInput, opts ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
- func (lc LocalS3Client) ListObjectsV2(ctx context.Context, input *s3.ListObjectsV2Input, ...) (*s3.ListObjectsV2Output, error)
- func (lc LocalS3Client) PutObject(ctx context.Context, input *s3.PutObjectInput, opts ...func(*s3.Options)) (*s3.PutObjectOutput, error)
- type MemcachedClient
- type RedisClient
- func (wrapper RedisClient) Close() error
- func (wrapper RedisClient) Del(ctx context.Context, key string) error
- func (wrapper RedisClient) Get(ctx context.Context, key string) ([]byte, error)
- func (wrapper RedisClient) Scan(ctx context.Context, cursor uint64, match string, count int64) *redis.ScanCmd
- func (wrapper RedisClient) Set(ctx context.Context, key string, value []byte, expiration time.Duration) error
- func (wrapper RedisClient) SetNX(ctx context.Context, key string, value []byte, expiration time.Duration) (bool, error)
- type S3Client
- type SecretsManagerClient
- type SnsClient
- type SqsClient
- type UninitializedMemcachedClient
- type WrappedRedisClient
Constants ¶
View Source
const AwsRegion = "us-east-1"
View Source
const EcsClientKey = "ecs-client-key"
View Source
const FirehoseClientKey = "firehose-client-key"
View Source
const KmsClientKey = "kms-client-key"
View Source
const RedisClientKey = "redis-client-key"
Variables ¶
View Source
var ( ErrorUndefinedS3Bucket = errors.New("bucket undefined") ErrorUndefinedS3Key = errors.New("key undefined") )
View Source
var MemcachedClientKey = "memcached-client-key"
View Source
var SnsClientKey = "sns-client-key"
View Source
var SqsClientKey = "sqs-client-key"
Functions ¶
func GenerateSignedReqV2 ¶
func SetClientConfig ¶
func SetClientConfig(config ClientConfig)
func SetFirehoseClient ¶
func SetFirehoseClient(ctx context.Context, client FirehoseClient) context.Context
func SetS3Client ¶
func SetS3Client(client S3Client)
func SetSecretsManagerClient ¶
func SetSecretsManagerClient(client SecretsManagerClient)
func Setup ¶
func Setup(ctx context.Context, options ClientConfig, customEndptResolver aws.EndpointResolverWithOptions, usePathStyle func(options2 *s3.Options)) error
func SetupWithDefault ¶
func StopThisTask ¶
Types ¶
type CachingSecretsManagerClient ¶
type CachingSecretsManagerClient struct {
// contains filtered or unexported fields
}
func NewLocalFirstSecretsManagerClient ¶
func NewLocalFirstSecretsManagerClient(ctx context.Context) (CachingSecretsManagerClient, error)
func (CachingSecretsManagerClient) GetSecretValue ¶
func (csm CachingSecretsManagerClient) GetSecretValue(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error)
type ClientConfig ¶
type ClientConfig struct { ReadTimeoutDuration time.Duration ListTimeoutDuration time.Duration MaxReadRetries int MaxListRetries int MaxPutRetries int }
func GetClientConfig ¶
func GetClientConfig() ClientConfig
type CloudS3Client ¶
type CloudS3Client struct {
// contains filtered or unexported fields
}
func NewCloudS3Client ¶
func NewCloudS3Client(client *s3.Client) CloudS3Client
func (CloudS3Client) DeleteObject ¶
func (adapter CloudS3Client) DeleteObject( ctx context.Context, input *s3.DeleteObjectInput, options ...func(*s3.Options), ) (*s3.DeleteObjectOutput, error)
func (CloudS3Client) GetObject ¶
func (adapter CloudS3Client) GetObject( ctx context.Context, input *s3.GetObjectInput, options ...func(*s3.Options), ) (*s3.GetObjectOutput, error)
func (CloudS3Client) HeadObject ¶
func (adapter CloudS3Client) HeadObject( ctx context.Context, input *s3.HeadObjectInput, options ...func(*s3.Options), ) (*s3.HeadObjectOutput, error)
func (CloudS3Client) ListObjectsV2 ¶
func (adapter CloudS3Client) ListObjectsV2( ctx context.Context, inp *s3.ListObjectsV2Input, options ...func(*s3.Options), ) (*s3.ListObjectsV2Output, error)
func (CloudS3Client) PutObject ¶
func (adapter CloudS3Client) PutObject( ctx context.Context, input *s3.PutObjectInput, options ...func(*s3.Options), ) (*s3.PutObjectOutput, error)
type DynamoClient ¶
type DynamoClient interface { GetItem(ctx context.Context, parameters *dynamodb.GetItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error) PutItem(ctx context.Context, parameters *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error) }
type EcsClient ¶
type EcsClient interface {
StopTask(ctx context.Context, params *ecs.StopTaskInput, optFns ...func(*ecs.Options)) (*ecs.StopTaskOutput, error)
}
type FirehoseClient ¶
type FirehoseClient interface {
PutRecord(ctx context.Context, params *firehose.PutRecordInput, optFns ...func(*firehose.Options)) (*firehose.PutRecordOutput, error)
}
func GetFirehoseClient ¶
func GetFirehoseClient(ctx context.Context) (FirehoseClient, error)
type KmsClient ¶
type KmsClient interface {
Decrypt(ctx context.Context, params *kms.DecryptInput, optFns ...func(*kms.Options)) (*kms.DecryptOutput, error)
}
type LocalFirstS3Client ¶
type LocalFirstS3Client struct {
// contains filtered or unexported fields
}
func NewLocalFirstS3Client ¶
func NewLocalFirstS3Client(client *s3.Client, directory string) LocalFirstS3Client
func (LocalFirstS3Client) DeleteObject ¶
func (lfs3 LocalFirstS3Client) DeleteObject( ctx context.Context, input *s3.DeleteObjectInput, options ...func(*s3.Options), ) (*s3.DeleteObjectOutput, error)
func (LocalFirstS3Client) GetObject ¶
func (lfs3 LocalFirstS3Client) GetObject( ctx context.Context, input *s3.GetObjectInput, options ...func(*s3.Options), ) (*s3.GetObjectOutput, error)
func (LocalFirstS3Client) HeadObject ¶
func (lfs3 LocalFirstS3Client) HeadObject( ctx context.Context, input *s3.HeadObjectInput, options ...func(*s3.Options), ) (*s3.HeadObjectOutput, error)
func (LocalFirstS3Client) ListObjectsV2 ¶
func (lfs3 LocalFirstS3Client) ListObjectsV2( ctx context.Context, input *s3.ListObjectsV2Input, options ...func(*s3.Options), ) (*s3.ListObjectsV2Output, error)
func (LocalFirstS3Client) PutObject ¶
func (lfs3 LocalFirstS3Client) PutObject( ctx context.Context, input *s3.PutObjectInput, options ...func(*s3.Options), ) (*s3.PutObjectOutput, error)
type LocalS3Client ¶
type LocalS3Client struct {
// contains filtered or unexported fields
}
func NewLocalS3Client ¶
func NewLocalS3Client(directory string) LocalS3Client
func (LocalS3Client) DeleteObject ¶
func (lc LocalS3Client) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput, opts ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
func (LocalS3Client) GetObject ¶
func (lc LocalS3Client) GetObject(ctx context.Context, input *s3.GetObjectInput, options ...func(*s3.Options)) (*s3.GetObjectOutput, error)
func (LocalS3Client) HeadObject ¶
func (lc LocalS3Client) HeadObject(ctx context.Context, input *s3.HeadObjectInput, opts ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
func (LocalS3Client) ListObjectsV2 ¶
func (lc LocalS3Client) ListObjectsV2(ctx context.Context, input *s3.ListObjectsV2Input, options ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
func (LocalS3Client) PutObject ¶
func (lc LocalS3Client) PutObject(ctx context.Context, input *s3.PutObjectInput, opts ...func(*s3.Options)) (*s3.PutObjectOutput, error)
type MemcachedClient ¶
type MemcachedClient interface { Get(key string) (item *memcache.Item, err error) Set(item *memcache.Item) error }
func GetMemcachedClient ¶
func GetMemcachedClient(ctx context.Context) (context.Context, MemcachedClient)
type RedisClient ¶
type RedisClient struct {
Client WrappedRedisClient
}
func GetRedisClient ¶
func (RedisClient) Close ¶
func (wrapper RedisClient) Close() error
type S3Client ¶
type S3Client interface { ListObjectsV2(context.Context, *s3.ListObjectsV2Input, ...func(*s3.Options)) (*s3.ListObjectsV2Output, error) GetObject(context.Context, *s3.GetObjectInput, ...func(*s3.Options)) (*s3.GetObjectOutput, error) PutObject(context.Context, *s3.PutObjectInput, ...func(*s3.Options)) (*s3.PutObjectOutput, error) DeleteObject(context.Context, *s3.DeleteObjectInput, ...func(*s3.Options)) (*s3.DeleteObjectOutput, error) HeadObject(ctx context.Context, params *s3.HeadObjectInput, optFns ...func(*s3.Options)) (*s3.HeadObjectOutput, error) }
func GetS3Client ¶
func GetS3Client() S3Client
func NewS3Client ¶
type SecretsManagerClient ¶
type SecretsManagerClient interface {
GetSecretValue(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error)
}
func GetSecretsManagerClient ¶
func GetSecretsManagerClient(ctx context.Context) (SecretsManagerClient, error)
func NewCloudSecretsManagerClient ¶
func NewCloudSecretsManagerClient(ctx context.Context) (SecretsManagerClient, error)
type SnsClient ¶
type SnsClient interface {
Publish(ctx context.Context, params *sns.PublishInput, optFns ...func(*sns.Options)) (*sns.PublishOutput, error)
}
type SqsClient ¶
type SqsClient interface { ReceiveMessage(ctx context.Context, params *sqs.ReceiveMessageInput, optFns ...func(*sqs.Options)) (*sqs.ReceiveMessageOutput, error) DeleteMessage(ctx context.Context, params *sqs.DeleteMessageInput, optFns ...func(*sqs.Options)) (*sqs.DeleteMessageOutput, error) }
type UninitializedMemcachedClient ¶
type UninitializedMemcachedClient struct { }
type WrappedRedisClient ¶
type WrappedRedisClient interface { Get(ctx context.Context, key string) *redis.StringCmd Set(ctx context.Context, key string, value any, expiration time.Duration) *redis.StatusCmd SetNX(ctx context.Context, key string, value any, expiration time.Duration) *redis.BoolCmd Del(ctx context.Context, keys ...string) *redis.IntCmd Do(ctx context.Context, args ...interface{}) *redis.Cmd Scan(ctx context.Context, cursor uint64, match string, count int64) *redis.ScanCmd Close() error PSubscribe(ctx context.Context, channels ...string) *redis.PubSub }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.