repository

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AWSCognitoAccessTokenNotFound           = errors.New("access token not found")
	AWSCognitoAccessTokenFormatNotSupported = errors.New("access token format is not supported")
)
View Source
var (
	AWSV2CognitoAccessTokenNotFound           = errors.New("access token not found")
	AWSV2CognitoAccessTokenFormatNotSupported = errors.New("access token format is not supported")
)

Functions

This section is empty.

Types

type AWSCognitoRepository added in v0.3.0

type AWSCognitoRepository struct {
	// contains filtered or unexported fields
}

AWSCognitoRepository struct.

func NewAWSCognitoRepository added in v0.3.0

func NewAWSCognitoRepository(c *cognitoidentityprovider.CognitoIdentityProvider, userPoolID, userPoolClientID, userPoolClientSecret string) *AWSCognitoRepository

NewAWSCognitoRepository returns AWSCognitoRepository instance.

func (*AWSCognitoRepository) ChangePassword added in v0.3.0

func (r *AWSCognitoRepository) ChangePassword(authorizationHeader, previousPassword, proposedPassword string) error

ChangePassword changes the password of the user.

func (*AWSCognitoRepository) ConfirmForgotPassword added in v0.3.0

func (r *AWSCognitoRepository) ConfirmForgotPassword(username, password, confirmationCode string) error

ConfirmForgotPassword allows a user to enter a confirmation code to reset a forgotten password.

func (*AWSCognitoRepository) CreateUser added in v0.3.0

func (r *AWSCognitoRepository) CreateUser(username string, password string) error

CreateUser creates a new user for Cognito user pool.

func (*AWSCognitoRepository) DeleteUser added in v0.3.0

func (r *AWSCognitoRepository) DeleteUser(username string) error

DeleteUser deletes a user from Cognito user pool.

func (*AWSCognitoRepository) GetUser added in v0.3.0

func (r *AWSCognitoRepository) GetUser(username, password string) (*cognitoidentityprovider.AdminGetUserOutput, error)

GetUser gets a user information from Cognito.

func (*AWSCognitoRepository) Login added in v0.3.0

func (r *AWSCognitoRepository) Login(username, password string) (AWSCognitoToken, error)

Login logs to Cognito.

func (*AWSCognitoRepository) Logout added in v0.3.0

func (r *AWSCognitoRepository) Logout(refreshToken string) error

Logout logs out of Cognito.

func (*AWSCognitoRepository) RefreshToken added in v0.3.0

func (r *AWSCognitoRepository) RefreshToken(refreshToken, username string) (AWSCognitoToken, error)

func (*AWSCognitoRepository) ResetUserPassword added in v0.3.0

func (r *AWSCognitoRepository) ResetUserPassword(username string) error

ResetPassword resets the specified user's password in a user pool as an administrator. Works on any user.

func (*AWSCognitoRepository) SetUserPassword added in v0.3.0

func (r *AWSCognitoRepository) SetUserPassword(username, password string, permanent bool) error

SetUserPassword sets the password of the user.

type AWSCognitoRepositoryInterface added in v0.3.0

type AWSCognitoRepositoryInterface interface {
	GetUser(username, password string) (*cognitoidentityprovider.AdminGetUserOutput, error)
	CreateUser(username, password string) error
	DeleteUser(username string) error
	Login(username, password string) (AWSCognitoToken, error)
	Logout(username string) error
	RefreshToken(refreshToken string, username string) (AWSCognitoToken, error)
	SetUserPassword(username string, password string) error
	ChangePassword(authorizationHeader, previousPassword, proposedPassword string) error
	ResetUserPassword(username string) error
	ConfirmForgotPassword(username, password, confirmationCode string) error
}

AWSCognitoRepositoryInterface interface.

type AWSCognitoToken added in v0.3.0

type AWSCognitoToken struct {
	AccessToken          string    `json:"access_token"`
	AccessTokenExpiresAt time.Time `json:"access_token_expires_at"`
	RefreshToken         string    `json:"refresh_token"`
}

AWSCognitoToken struct

type AWSS3Repository

type AWSS3Repository struct {
	// contains filtered or unexported fields
}

AWSS3Repository struct.

func NewAWSS3Repository

func NewAWSS3Repository(s *s3.S3, sess *session.Session) *AWSS3Repository

NewAWSS3Repository returns AWSS3Repository instance.

func (*AWSS3Repository) CreateBucket

func (r *AWSS3Repository) CreateBucket(bucket string) (*s3.CreateBucketOutput, error)

CreateBucket creates a new S3 bucket. To create a bucket, you must register with Amazon S3 and have a valid AWS Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner. https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html

func (*AWSS3Repository) DeleteBucket

func (r *AWSS3Repository) DeleteBucket(bucket string) (*s3.DeleteBucketOutput, error)

DeleteBucket deletes the S3 bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted. https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html

func (*AWSS3Repository) DeleteObject

func (r *AWSS3Repository) DeleteObject(bucket, key string) (*s3.DeleteObjectOutput, error)

DeleteObject removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects but will still respond that the command was successful. https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html

func (*AWSS3Repository) DeleteObjects

func (r *AWSS3Repository) DeleteObjects(bucket string, keys []string) (*s3.DeleteObjectsOutput, error)

DeleteObjects action enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this action provides a suitable alternative to sending individual delete requests, reducing per-request overhead. https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html

func (*AWSS3Repository) Download added in v0.0.18

func (r *AWSS3Repository) Download(bucket, key, filePath string) error

Download retrieves objects from Amazon S3.

func (*AWSS3Repository) GetObject

func (r *AWSS3Repository) GetObject(bucket, key string) (*s3.GetObjectOutput, error)

GetObject retrieves objects from Amazon S3. https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html

func (*AWSS3Repository) GetPresignedURL

func (r *AWSS3Repository) GetPresignedURL(bucket, key string, expire time.Duration) (string, error)

GetPresignedURL creates a Pre-Singed URL. https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/s3-example-presigned-urls.html

func (*AWSS3Repository) ListBuckets

func (r *AWSS3Repository) ListBuckets() (*s3.ListBucketsOutput, error)

ListBuckets returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the s3:ListAllMyBuckets permission. https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html

func (*AWSS3Repository) ListObjectsV2

func (r *AWSS3Repository) ListObjectsV2(bucket, prefix string) (*s3.ListObjectsV2Output, error)

ListObjectsV2 returns some or all (up to 1,000) of the objects in a bucket with each request. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. Objects are returned sorted in an ascending order of the respective key names in the list. For more information about listing objects, see Listing object keys programmatically https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html

func (*AWSS3Repository) PutObjectFile

func (r *AWSS3Repository) PutObjectFile(bucket, key, filePath string) (*s3.PutObjectOutput, error)

PutObjectFile adds an object to a bucket. https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html

func (*AWSS3Repository) PutObjectText

func (r *AWSS3Repository) PutObjectText(bucket, key string, text *string) (*s3.PutObjectOutput, error)

PutObjectText adds an object to a bucket. https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html

func (*AWSS3Repository) Upload added in v0.0.18

func (r *AWSS3Repository) Upload(bucket, key, filePath string) (*s3manager.UploadOutput, error)

Upload adds an object to a bucket.

type AWSS3RepositoryInterface

type AWSS3RepositoryInterface interface {
	GetObject(bucket, path string) io.ReaderAt
	PutObjectFile(bucket, key, filePath string) (*s3.PutObjectOutput, error)
	PutObjectText(bucket, key string, text *string) (*s3.PutObjectOutput, error)
	DeleteObject(bucket, key string) (*s3.DeleteObjectOutput, error)
	DeleteObjects(bucket string, keys []string) (*s3.DeleteObjectsOutput, error)
	ListObjectsV2(bucket, prefix string) (*s3.ListObjectsV2Output, error)
	ListBuckets() (*s3.ListBucketsOutput, error)
	CreateBucket(bucket string) (*s3.CreateBucketOutput, error)
	DeleteBucket(bucket string) (*s3.DeleteBucketOutput, error)
	GetPresignedURL(bucket, key string, expire time.Duration) (string, error)
	Upload(bucket, key, filePath string) (*s3manager.UploadOutput, error)
	Download(bucket, key, filePath string) error
}

AWSS3RepositoryInterface interface.

type AWSSESRepository

type AWSSESRepository struct {
	// contains filtered or unexported fields
}

AWSSESRepository struct.

func NewAWSSESRepository

func NewAWSSESRepository(s *ses.SES, configurationSetName *string) *AWSSESRepository

NewAWSSESRepository returns AWSSESRepository instance.

func (*AWSSESRepository) SendBulkTemplatedEmail added in v0.0.28

func (r *AWSSESRepository) SendBulkTemplatedEmail(from string, replyTo []string, template, defaultTemplateData string, destinations []*ses.BulkEmailDestination) (*ses.SendBulkTemplatedEmailOutput, error)

SendBulkTemplatedEmail sends bulk emails. Note: One or more Destination objects. All of the recipients in a Destination receive the same version of the email. You can specify up to 50 Destination objects within a Destinations array.

func (*AWSSESRepository) SendEmail

func (r *AWSSESRepository) SendEmail(from string, to []string, replyTo []string, subject, contentText, contentHTML string) (*ses.SendEmailOutput, error)

SendEmail sends email.

func (*AWSSESRepository) SendHTMLEmail

func (r *AWSSESRepository) SendHTMLEmail(from string, to []string, replyTo []string, subject, content string) (*ses.SendEmailOutput, error)

SendHTMLEmail sends HTML email.

func (*AWSSESRepository) SendTextEmail

func (r *AWSSESRepository) SendTextEmail(from string, to []string, replyTo []string, subject, content string) (*ses.SendEmailOutput, error)

SendTextEmail sends text email.

type AWSSESRepositoryInterface

type AWSSESRepositoryInterface interface {
	// Use via SendEmailService
	SendTextEmail(from string, to []string, replyTo []string, subject, content string) (*ses.SendEmailOutput, error)
	SendHTMLEmail(from string, to []string, replyTo []string, subject, content string) (*ses.SendEmailOutput, error)
	SendEmail(from string, to []string, replyTo []string, subject, contentText, contentHTML string) (*ses.SendEmailOutput, error)
	SendBulkTemplatedEmail(from string, replyTo []string, template, defaultTemplateData string, destinations []*ses.BulkEmailDestination) (*ses.SendBulkTemplatedEmailOutput, error)
}

AWSSESRepositoryInterface interface.

type AWSSecretsManagerRepository added in v0.3.0

type AWSSecretsManagerRepository struct {
	// contains filtered or unexported fields
}

func NewAWSSecretsManagerRepository added in v0.3.0

func NewAWSSecretsManagerRepository(sm *secretsmanager.SecretsManager, sess *session.Session, cache *secretcache.Cache) *AWSSecretsManagerRepository

NewAWSSecretsManagerRepository returns NewAWSSecretsManagerRepository instance.

func (*AWSSecretsManagerRepository) GetCacheSecretString added in v0.3.0

func (r *AWSSecretsManagerRepository) GetCacheSecretString(secretName string) (string, error)

GetCacheSecretString gets a cache secret string from secretsmanager.

func (*AWSSecretsManagerRepository) GetSecretString added in v0.3.0

func (r *AWSSecretsManagerRepository) GetSecretString(secretName string) (string, error)

GetSecretString gets a secret string from secretsmanager.

type AWSSecretsManagerRepositoryInterface added in v0.3.0

type AWSSecretsManagerRepositoryInterface interface {
	GetSecretString(secretName string) (string, error)
}

type AWSV2CognitoRepository added in v0.3.0

type AWSV2CognitoRepository struct {
	// contains filtered or unexported fields
}

AWSV2CognitoRepository struct.

func NewAWSV2CognitoRepository added in v0.3.0

func NewAWSV2CognitoRepository(c *cognitoidentityprovider.Client, userPoolID, userPoolClientID, userPoolClientSecret string) *AWSV2CognitoRepository

NewAWSV2CognitoRepository returns AWSV2CognitoRepository instance.

func (*AWSV2CognitoRepository) ChangePassword added in v0.3.0

func (r *AWSV2CognitoRepository) ChangePassword(authorizationHeader, previousPassword, proposedPassword string) error

ChangePassword changes the password of the user.

func (*AWSV2CognitoRepository) ConfirmForgotPassword added in v0.3.0

func (r *AWSV2CognitoRepository) ConfirmForgotPassword(username, password, confirmationCode string) error

ConfirmForgotPassword allows a user to enter a confirmation code to reset a forgotten password.

func (*AWSV2CognitoRepository) CreateUser added in v0.3.0

func (r *AWSV2CognitoRepository) CreateUser(username string, password string) error

CreateUser creates a new user for Cognito user pool.

func (*AWSV2CognitoRepository) DeleteUser added in v0.3.0

func (r *AWSV2CognitoRepository) DeleteUser(username string) error

DeleteUser deletes a user from Cognito user pool.

func (*AWSV2CognitoRepository) GetUser added in v0.3.0

GetUser gets a user information from Cognito.

func (*AWSV2CognitoRepository) Login added in v0.3.0

func (r *AWSV2CognitoRepository) Login(username, password string) (AWSV2CognitoToken, error)

Login logs to Cognito.

func (*AWSV2CognitoRepository) Logout added in v0.3.0

func (r *AWSV2CognitoRepository) Logout(refreshToken string) error

Logout logs out of Cognito.

func (*AWSV2CognitoRepository) RefreshToken added in v0.3.0

func (r *AWSV2CognitoRepository) RefreshToken(refreshToken, username string) (AWSV2CognitoToken, error)

func (*AWSV2CognitoRepository) ResetUserPassword added in v0.3.0

func (r *AWSV2CognitoRepository) ResetUserPassword(username string) error

ResetPassword resets the specified user's password in a user pool as an administrator. Works on any user.

func (*AWSV2CognitoRepository) SetUserPassword added in v0.3.0

func (r *AWSV2CognitoRepository) SetUserPassword(username, password string, permanent bool) error

SetUserPassword sets the password of the user.

type AWSV2CognitoRepositoryInterface added in v0.3.0

type AWSV2CognitoRepositoryInterface interface {
	GetUser(username, password string) (*cognitoidentityprovider.AdminGetUserOutput, error)
	CreateUser(username, password string) error
	DeleteUser(username string) error
	Login(username, password string) (AWSV2CognitoToken, error)
	Logout(username string) error
	RefreshToken(refreshToken string, username string) (AWSV2CognitoToken, error)
	SetUserPassword(username string, password string) error
	ChangePassword(authorizationHeader, previousPassword, proposedPassword string) error
	ResetUserPassword(username string) error
	ConfirmForgotPassword(username, password, confirmationCode string) error
}

AWSV2CognitoRepositoryInterface interface.

type AWSV2CognitoToken added in v0.3.0

type AWSV2CognitoToken struct {
	AccessToken          string    `json:"access_token"`
	AccessTokenExpiresAt time.Time `json:"access_token_expires_at"`
	RefreshToken         string    `json:"refresh_token"`
}

AWSV2CognitoToken struct

type AWSV2S3Repository added in v0.3.0

type AWSV2S3Repository struct {
	// contains filtered or unexported fields
}

AWSV2S3Repository struct.

func NewAWSV2S3Repository added in v0.3.0

func NewAWSV2S3Repository(client *s3.Client) *AWSV2S3Repository

NewAWSV2S3Repository returns AWSV2S3Repository instance.

func (*AWSV2S3Repository) CreateBucket added in v0.3.0

func (r *AWSV2S3Repository) CreateBucket(bucket string) (*s3.CreateBucketOutput, error)

CreateBucket creates a new S3 bucket. To create a bucket, you must register with Amazon S3 and have a valid AWS Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner. https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html

func (*AWSV2S3Repository) DeleteBucket added in v0.3.0

func (r *AWSV2S3Repository) DeleteBucket(bucket string) (*s3.DeleteBucketOutput, error)

DeleteBucket deletes the S3 bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted. https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html

func (*AWSV2S3Repository) DeleteObject added in v0.3.0

func (r *AWSV2S3Repository) DeleteObject(bucket, key string) (*s3.DeleteObjectOutput, error)

DeleteObject removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects but will still respond that the command was successful. https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html

func (*AWSV2S3Repository) DeleteObjects added in v0.3.0

func (r *AWSV2S3Repository) DeleteObjects(bucket string, keys []string) (*s3.DeleteObjectsOutput, error)

DeleteObjects action enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this action provides a suitable alternative to sending individual delete requests, reducing per-request overhead. https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html

func (*AWSV2S3Repository) Download added in v0.3.0

func (r *AWSV2S3Repository) Download(bucket, key, filePath string) error

Download retrieves objects from Amazon S3.

func (*AWSV2S3Repository) GetObject added in v0.3.0

func (r *AWSV2S3Repository) GetObject(bucket, key string) (*s3.GetObjectOutput, error)

GetObject retrieves objects from Amazon S3. https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html

func (*AWSV2S3Repository) GetPresignedURL added in v0.3.0

func (r *AWSV2S3Repository) GetPresignedURL(bucket, key string, expire time.Duration) (*v4.PresignedHTTPRequest, error)

GetPresignedURL creates a Pre-Singed URL. https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/s3-example-presigned-urls.html

func (*AWSV2S3Repository) ListBuckets added in v0.3.0

func (r *AWSV2S3Repository) ListBuckets() (*s3.ListBucketsOutput, error)

ListBuckets returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the s3:ListAllMyBuckets permission. https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html

func (*AWSV2S3Repository) ListObjectsV2 added in v0.3.0

func (r *AWSV2S3Repository) ListObjectsV2(bucket, prefix string) (*s3.ListObjectsV2Output, error)

ListObjectsV2 returns some or all (up to 1,000) of the objects in a bucket with each request. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. Objects are returned sorted in an ascending order of the respective key names in the list. For more information about listing objects, see Listing object keys programmatically https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html

func (*AWSV2S3Repository) PutObjectFile added in v0.3.0

func (r *AWSV2S3Repository) PutObjectFile(bucket, key, filePath string) (*s3.PutObjectOutput, error)

PutObjectFile adds an object to a bucket. https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html

func (*AWSV2S3Repository) PutObjectText added in v0.3.0

func (r *AWSV2S3Repository) PutObjectText(bucket, key string, text *string) (*s3.PutObjectOutput, error)

PutObjectText adds an object to a bucket. https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html

func (*AWSV2S3Repository) Upload added in v0.3.0

func (r *AWSV2S3Repository) Upload(bucket, key, filePath string) (*manager.UploadOutput, error)

Upload adds an object to a bucket.

type AWSV2S3RepositoryInterface added in v0.3.0

type AWSV2S3RepositoryInterface interface {
	GetObject(bucket, path string) io.ReaderAt
	PutObjectFile(bucket, key, filePath string) (*s3.PutObjectOutput, error)
	PutObjectText(bucket, key string, text *string) (*s3.PutObjectOutput, error)
	DeleteObject(bucket, key string) (*s3.DeleteObjectOutput, error)
	DeleteObjects(bucket string, keys []string) (*s3.DeleteObjectsOutput, error)
	ListObjectsV2(bucket, prefix string) (*s3.ListObjectsV2Output, error)
	ListBuckets() (*s3.ListBucketsOutput, error)
	CreateBucket(bucket string) (*s3.CreateBucketOutput, error)
	DeleteBucket(bucket string) (*s3.DeleteBucketOutput, error)
	GetPresignedURL(bucket, key string, expire time.Duration) (*v4.PresignedHTTPRequest, error)
	Upload(bucket, key, filePath string) (*manager.UploadOutput, error)
	Download(bucket, key, filePath string) error
}

AWSV2S3RepositoryInterface interface.

type AWSV2SESRepository added in v0.3.0

type AWSV2SESRepository struct {
	// contains filtered or unexported fields
}

AWSV2SESRepository struct.

func NewAWSV2SESRepository added in v0.3.0

func NewAWSV2SESRepository(c *sesv2.Client, configurationSetName *string) *AWSV2SESRepository

NewAWSV2SESRepository returns AWSV2SESRepository instance.

func (*AWSV2SESRepository) SendBulkEmail added in v0.3.0

func (r *AWSV2SESRepository) SendBulkEmail(from string, replyTo []string, template, defaultTemplateData string, bulkEmailEntries []types.BulkEmailEntry) (*sesv2.SendBulkEmailOutput, error)

SendBulkEmail sends bulk emails. Note: One or more Destination objects. All of the recipients in a Destination receive the same version of the email. You can specify up to 50 Destination objects within a Destinations array.

func (*AWSV2SESRepository) SendEmail added in v0.3.0

func (r *AWSV2SESRepository) SendEmail(from string, to []string, replyTo []string, subject, contentText, contentHTML string) (*sesv2.SendEmailOutput, error)

SendEmail sends email.

func (*AWSV2SESRepository) SendHTMLEmail added in v0.3.0

func (r *AWSV2SESRepository) SendHTMLEmail(from string, to []string, replyTo []string, subject, content string) (*sesv2.SendEmailOutput, error)

SendHTMLEmail sends HTML email.

func (*AWSV2SESRepository) SendTextEmail added in v0.3.0

func (r *AWSV2SESRepository) SendTextEmail(from string, to []string, replyTo []string, subject, content string) (*sesv2.SendEmailOutput, error)

SendTextEmail sends text email.

type AWSV2SESRepositoryInterface added in v0.3.0

type AWSV2SESRepositoryInterface interface {
	// Use via SendEmailService
	SendTextEmail(from string, to []string, replyTo []string, subject, content string) (*sesv2.SendEmailOutput, error)
	SendHTMLEmail(from string, to []string, replyTo []string, subject, content string) (*sesv2.SendEmailOutput, error)
	SendEmail(from string, to []string, replyTo []string, subject, contentText, contentHTML string) (*sesv2.SendEmailOutput, error)
	SendBulkEmail(from string, replyTo []string, template, defaultTemplateData string, BulkEmailEntries []types.BulkEmailEntry) (*sesv2.SendBulkEmailOutput, error)
}

AWSV2SESRepositoryInterface interface.

type AWSV2SecretsManagerRepository added in v0.3.0

type AWSV2SecretsManagerRepository struct {
	// contains filtered or unexported fields
}

func NewAWSV2SecretsManagerRepository added in v0.3.0

func NewAWSV2SecretsManagerRepository(c *secretsmanager.Client, cache *secretcache.Cache) *AWSV2SecretsManagerRepository

NewAWSV2SecretsManagerRepository returns NewAWSV2SecretsManagerRepository instance.

func (*AWSV2SecretsManagerRepository) GetCacheSecretString added in v0.3.0

func (r *AWSV2SecretsManagerRepository) GetCacheSecretString(secretName string) (string, error)

GetCacheSecretString gets a cache secret string from secretsmanager.

func (*AWSV2SecretsManagerRepository) GetSecretString added in v0.3.0

func (r *AWSV2SecretsManagerRepository) GetSecretString(secretName string) (string, error)

GetSecretString gets a secret string from secretsmanager.

type AWSV2SecretsManagerRepositoryInterface added in v0.3.0

type AWSV2SecretsManagerRepositoryInterface interface {
	GetSecretString(secretName string) (string, error)
}

type BaseRepository

type BaseRepository struct {
}

BaseRepository struct.

func NewBaseRepository

func NewBaseRepository() *BaseRepository

NewBaseRepository returns BaseRepository instance.

type RedisRepository added in v0.0.18

type RedisRepository struct {
	// contains filtered or unexported fields
}

RedisRepository struct.

func NewRedisRepository added in v0.0.18

func NewRedisRepository(r *redis.Client) *RedisRepository

NewRedisRepository returns RedisRepository instance.

func (*RedisRepository) Append added in v0.0.18

func (r *RedisRepository) Append(c context.Context, key, value string) error

Append Redis `APPEND key value` command.

func (*RedisRepository) BitCount added in v0.0.18

func (r *RedisRepository) BitCount(c context.Context, key string, bitCount *redis.BitCount) (int64, error)

BitCount Redis `BITCOUNT key` command.

func (*RedisRepository) Decr added in v0.0.18

func (r *RedisRepository) Decr(c context.Context, key string) error

Decr Redis `DECR key` command.

func (*RedisRepository) DecrBy added in v0.0.18

func (r *RedisRepository) DecrBy(c context.Context, key string, value int64) error

DecrBy Redis `DECRBY key value` command.

func (*RedisRepository) Get added in v0.0.18

func (r *RedisRepository) Get(c context.Context, key string) (string, error)

Get Redis `GET key` command.

func (*RedisRepository) GetBit added in v0.0.18

func (r *RedisRepository) GetBit(c context.Context, key string, offset int64) (int64, error)

GetBit Redis `GETBIT key start end` command.

func (*RedisRepository) GetRange added in v0.0.18

func (r *RedisRepository) GetRange(c context.Context, key string, start, end int64) (string, error)

GetRange Redis `GETRANGE key start end` command.

func (*RedisRepository) GetSet added in v0.0.18

func (r *RedisRepository) GetSet(c context.Context, key string, value interface{}) (string, error)

GetSet Redis `GETSET key` command.

func (*RedisRepository) Incr added in v0.0.18

func (r *RedisRepository) Incr(c context.Context, key string) error

Incr Redis `INCR key` command.

func (*RedisRepository) IncrBy added in v0.0.18

func (r *RedisRepository) IncrBy(c context.Context, key string, value int64) error

IncrBy Redis `INCRBY key value` command.

func (*RedisRepository) IncrByfloat added in v0.0.18

func (r *RedisRepository) IncrByfloat(c context.Context, key string, value float64) error

IncrByfloat Redis `INCRBYFLOAT key value` command.

func (*RedisRepository) MGet added in v0.0.18

func (r *RedisRepository) MGet(c context.Context, keys ...string) ([]interface{}, error)

MGet Redis `MGET keys...` command.

func (*RedisRepository) MSet added in v0.0.18

func (r *RedisRepository) MSet(c context.Context, values ...interface{}) (string, error)

MSet Redis `MSET key value key2 value2...` command.

func (*RedisRepository) MSetNX added in v0.0.18

func (r *RedisRepository) MSetNX(c context.Context, values ...interface{}) (bool, error)

MSetNX Redis `MSETNX key value key2 value2...` command.

func (*RedisRepository) Set added in v0.0.18

func (r *RedisRepository) Set(c context.Context, key string, value interface{}, expiration time.Duration) error

Set Redis `SET key value [expiration]` command.

func (*RedisRepository) SetBit added in v0.0.18

func (r *RedisRepository) SetBit(c context.Context, key string, offset int64, value int) error

SetBit Redis `SETBIT key value offset value` command.

func (*RedisRepository) SetEX added in v0.0.18

func (r *RedisRepository) SetEX(c context.Context, key string, value interface{}, expiration time.Duration) error

SetEX Redis `SETEX key value expiration` command.

func (*RedisRepository) SetNX added in v0.0.18

func (r *RedisRepository) SetNX(c context.Context, key string, value interface{}, expiration time.Duration) error

SetNX Redis `SETNX key value [expiration]` command.

func (*RedisRepository) SetRange added in v0.0.18

func (r *RedisRepository) SetRange(c context.Context, key string, offset int64, value string) (int64, error)

SetRange Redis `SETRANGE key start end` command.

func (*RedisRepository) StrLen added in v0.0.18

func (r *RedisRepository) StrLen(c context.Context, key string) (int64, error)

StrLen Redis `STRLEN key` command.

type RedisRepositoryInterface added in v0.0.18

type RedisRepositoryInterface interface {
}

RedisRepositoryInterface interface.

type SlackRepository

type SlackRepository struct {
	// contains filtered or unexported fields
}

SlackRepository struct.

func NewSlackRepository

func NewSlackRepository(client *slack.Client, channelID string) *SlackRepository

NewSlackRepository returns SlackRepository instance.

func (*SlackRepository) PostMessage

func (r *SlackRepository) PostMessage(options ...slack.MsgOption) error

PostMessageAttachment sends a message to a channel. Message is escaped by default according to https://api.slack.com/docs/formatting Use http://davestevens.github.io/slack-message-builder/ to help crafting your message.

func (*SlackRepository) PostMessageAttachment

func (r *SlackRepository) PostMessageAttachment(attachment *slack.Attachment) error

PostMessageAttachment sends a message to a channel. Message is escaped by default according to https://api.slack.com/docs/formatting Use http://davestevens.github.io/slack-message-builder/ to help crafting your message.

func (*SlackRepository) PostMessageText added in v0.2.0

func (r *SlackRepository) PostMessageText(text string) error

PostMessageText sends a message to a channel. Message is escaped by default according to https://api.slack.com/docs/formatting Use http://davestevens.github.io/slack-message-builder/ to help crafting your message.

type SlackRepositoryInterface

type SlackRepositoryInterface interface {
	PostMessage(attachment *slack.Attachment) error
	PostMessageAttachment(attachment *slack.Attachment) error
}

SlackRepositoryInterface interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL