Documentation
¶
Index ¶
- Constants
- type PgRedshiftTranslator
- type PostgresRedshiftProxy
- type RdappContext
- type RedshiftClient
- type RedshiftDataAPIConfig
- type RedshiftDataAPIService
- type RedshiftDataApiClient
- type RedshiftDataApiQueryHandler
- type RedshiftServerlessClient
- type RedshiftService
- type Secrets
- type SecretsManagerClient
- type SecretsService
Constants ¶
View Source
const ( RedshiftTypeSuper = "super" RedshiftTypeBool = "bool" RedshiftTypeChar = "char" RedshiftTypeVarchar = "varchar" RedshiftTypeBpchar = "bpchar" RedshiftTypeTimestamp = "timestamp" RedshiftTypeTimestamptz = "timestamptz" RedshiftTypeFloat4 = "float4" RedshiftTypeFloat8 = "float8" RedshiftTypeInt2 = "int2" RedshiftTypeInt4 = "int4" RedshiftTypeInt8 = "int8" RedshiftTypeNumeric = "numeric" RedshiftTypeName = "name" RedshiftTypeOid = "oid" RedshiftTypeAclitem = "_aclitem" RedshiftTypeText = "_text" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgRedshiftTranslator ¶ added in v0.5.0
type PgRedshiftTranslator interface { TranslateToRedshiftQuery(pgQuery string) string TranslateToRedshiftQueryParams(pgParams []string) []types.SqlParameter TranslateColumnMetaDataToPgFormat(rdappCtx RdappContext, columnMetadata []types.ColumnMetadata) (wire.Columns, error) TranslateRowToPgFormat(rdappCtx RdappContext, redshiftRow []types.Field) ([]any, error) }
func NewPgRedshiftTranslator ¶ added in v0.5.0
func NewPgRedshiftTranslator() PgRedshiftTranslator
type PostgresRedshiftProxy ¶
type PostgresRedshiftProxy interface {
Run() error
}
func ConstructProxy ¶ added in v0.5.0
func ConstructProxy(cfg aws.Config, redshiftDataApiConfig RedshiftDataAPIConfig, logger *zap.Logger, listenAddress string) PostgresRedshiftProxy
func NewPostgresRedshiftDataAPIProxy ¶
func NewPostgresRedshiftDataAPIProxy(listenAddress string, simpleQueryFn wire.SimpleQueryFn, logger *zap.Logger) PostgresRedshiftProxy
type RdappContext ¶ added in v0.5.0
type RedshiftClient ¶ added in v0.4.0
type RedshiftClient interface { redshift.DescribeClustersAPIClient }
type RedshiftDataAPIConfig ¶
type RedshiftDataAPIConfig struct { // The name of the database. This parameter is required when authenticating using // either Secrets Manager or temporary credentials. // // This member is required. Database *string // The cluster identifier. This parameter is required when connecting to a cluster // and authenticating using either Secrets Manager or temporary credentials. ClusterIdentifier *string // The database user name. This parameter is required when connecting to a cluster // and authenticating using temporary credentials. DbUser *string // The name or ARN of the secret that enables access to the database. This // parameter is required when authenticating using Secrets Manager. SecretArn *string // The serverless workgroup name. This parameter is required when connecting to a // serverless workgroup and authenticating using either Secrets Manager or // temporary credentials. WorkgroupName *string }
type RedshiftDataAPIService ¶ added in v0.5.0
type RedshiftDataAPIService interface {
ExecuteQuery(ctx RdappContext, query string, parameters []types.SqlParameter) (*redshiftdata.GetStatementResultOutput, error)
}
func NewRedshiftDataAPIService ¶ added in v0.5.0
func NewRedshiftDataAPIService(redshiftDataApiClient RedshiftDataApiClient, redshiftDataAPIConfig RedshiftDataAPIConfig) RedshiftDataAPIService
type RedshiftDataApiClient ¶ added in v0.3.0
type RedshiftDataApiClient interface { ExecuteStatement(ctx context.Context, params *redshiftdata.ExecuteStatementInput, optFns ...func(*redshiftdata.Options)) (*redshiftdata.ExecuteStatementOutput, error) DescribeStatement(ctx context.Context, params *redshiftdata.DescribeStatementInput, optFns ...func(*redshiftdata.Options)) (*redshiftdata.DescribeStatementOutput, error) GetStatementResult(ctx context.Context, params *redshiftdata.GetStatementResultInput, optFns ...func(*redshiftdata.Options)) (*redshiftdata.GetStatementResultOutput, error) }
type RedshiftDataApiQueryHandler ¶ added in v0.5.0
type RedshiftDataApiQueryHandler interface {
QueryHandler(ctx context.Context, query string, writer wire.DataWriter, parameters []string) error
}
func NewRedshiftDataApiQueryHandler ¶
func NewRedshiftDataApiQueryHandler(redshiftDataAPIService RedshiftDataAPIService, pgRedshiftTranslator PgRedshiftTranslator, logger *zap.Logger) RedshiftDataApiQueryHandler
type RedshiftServerlessClient ¶ added in v0.4.0
type RedshiftServerlessClient interface { redshiftserverless.ListWorkgroupsAPIClient redshiftserverless.ListNamespacesAPIClient }
type RedshiftService ¶ added in v0.5.0
type RedshiftService interface { FetchServerlessWorkGroups(ctx context.Context) ([]redshiftserverlesstypes.Workgroup, error) FetchServerlessNamespaces(ctx context.Context) ([]redshiftserverlesstypes.Namespace, error) FetchProvisionedClusters(ctx context.Context) ([]types.Cluster, error) }
func NewRedshiftService ¶ added in v0.5.0
func NewRedshiftService(redshiftClient RedshiftClient, redshiftServerlessClient RedshiftServerlessClient) RedshiftService
type Secrets ¶ added in v0.5.0
type Secrets []secretmanagertypes.SecretListEntry
func (Secrets) GetSecretArns ¶ added in v0.5.0
type SecretsManagerClient ¶ added in v0.4.0
type SecretsManagerClient interface { secretsmanager.ListSecretsAPIClient }
type SecretsService ¶ added in v0.5.0
func NewSecretsService ¶ added in v0.5.0
func NewSecretsService(secretsManagerClient SecretsManagerClient) SecretsService
Click to show internal directories.
Click to hide internal directories.