adapters

package
v0.0.0-...-16fd4a1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialsPersistenceAdapter

type CredentialsPersistenceAdapter interface {
	GetCredentials(id string) (*dto.Credentials, custom_error.BaseErrorAdapter)
}

type DynamoDBAdapter

type DynamoDBAdapter interface {
	// Scan is the same as dynamodb.Client Scan method
	Scan(ctx context.Context, params *dynamodb.ScanInput, optFns ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error)

	// GetItem is the same as dynamodb.Client GetItem method
	GetItem(ctx context.Context, params *dynamodb.GetItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error)

	// PutItem is the same as dynamodb.Client PutItem method
	PutItem(ctx context.Context, params *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
}

DynamoDBAdapter is an adapter class for AWS DynamoDB v2 SDK.

type EncryptionServiceAdapter

type EncryptionServiceAdapter interface {
	AESDecrypt(hexEncryptedString string, secret string) (string, custom_error.BaseErrorAdapter)
	AESEncrypt(decryptedString string, secret string) (string, custom_error.BaseErrorAdapter)
	SHA384Encrypt(string string, secret string) string
}

type HTTPClientAdapter

type HTTPClientAdapter interface {
	Do(req *http.Request) (*http.Response, error)
}

type HeaderBuilderAdapter

type HeaderBuilderAdapter interface {
	BiscointHeader(clientId string, endpoint string, payload any) (http.Header, custom_error.BaseErrorAdapter)
}

type RedisAdapter

type RedisAdapter interface {
	// Open connection to redis db
	Open() (*redis.Client, error)

	// Close connection to redis db
	Close() error
}

RedisAdapter class for redis repository connection

type SNSAdapter

type SNSAdapter interface {
	Publish(ctx context.Context, params *sns.PublishInput, optFns ...func(*sns.Options)) (*sns.PublishOutput, error)
}

type SecretsManagerAdapter

type SecretsManagerAdapter interface {
	GetSecretValue(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (
		*secretsmanager.GetSecretValueOutput,
		error,
	)
}

type SecretsManagerServiceAdapter

type SecretsManagerServiceAdapter interface {
	GetSecret(secretName string, secretObject any) custom_error.BaseErrorAdapter
}

SecretsManagerServiceAdapter is an adapter for secret manager service implementation.

type TokenBuilderAdapter

type TokenBuilderAdapter interface {
	Build(apiSecret string, endpoint string, payload any, nonce string) (string, custom_error.BaseErrorAdapter)
}

Jump to

Keyboard shortcuts

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