aws

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedshiftClient

func NewRedshiftClient(ctx context.Context) (*redshiftClient, error)

NewRedshiftClient loads AWS Config and creds, and returns an Redshift client

Types

type DBClusterResult

type DBClusterResult struct {
	Cluster types.DBCluster
	Error   error
}

DBInstanceResult is wrapper around a DBInstance or error as a result of listing RDS Instances

type RDSClient

type RDSClient interface {
	GetPostgresInstances(ctx context.Context) <-chan DBClusterResult
	NewAuthToken(ctx context.Context, host, region, user string) (string, error)
	RegionForInstance(inst types.DBCluster) (string, error)
}

RDSClient is our wrapper around the RDS library, allows us to mock this for testing

func NewRDSClient

func NewRDSClient(ctx context.Context) (RDSClient, error)

NewRDSClient loads AWS Config and creds, and returns an RDS client

type RedshiftClient

type RedshiftClient interface {
	GetRedshiftInstances(ctx context.Context) <-chan RedshiftClusterResult
	NewAuthToken(ctx context.Context, clusterId, region, user string) (string, error)
	RegionForInstance(inst types.Cluster) (string, error)
}

RedshiftClient is our wrapper around the Redshift library, allows us to mock this for testing

type RedshiftClusterResult

type RedshiftClusterResult struct {
	Instance types.Cluster
	Error    error
}

RedshiftClusterResult is wrapper around a DBInstance or error as a result of listing Redshift cluster

Jump to

Keyboard shortcuts

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