actions

package
v0.0.0-...-103927a Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedshiftActions

type RedshiftActions struct {
	RedshiftClient *redshift.Client
}

RedshiftActions wraps Redshift service actions.

func (RedshiftActions) CreateCluster

func (actor RedshiftActions) CreateCluster(ctx context.Context, clusterId string, userName string, userPassword string, nodeType string, clusterType string, publiclyAccessible bool) (*redshift.CreateClusterOutput, error)

CreateCluster sends a request to create a cluster with the given clusterId using the provided credentials.

func (RedshiftActions) DeleteCluster

func (actor RedshiftActions) DeleteCluster(ctx context.Context, clusterId string) (bool, error)

DeleteCluster deletes the given cluster.

func (RedshiftActions) DescribeClusters

func (actor RedshiftActions) DescribeClusters(ctx context.Context, clusterId string) (*redshift.DescribeClustersOutput, error)

DescribeClusters returns information about the given cluster.

func (RedshiftActions) ModifyCluster

func (actor RedshiftActions) ModifyCluster(ctx context.Context, clusterId string, maintenanceWindow string) *redshift.ModifyClusterOutput

ModifyCluster sets the preferred maintenance window for the given cluster.

type RedshiftDataActions

type RedshiftDataActions struct {
	RedshiftDataClient *redshiftdata.Client
}

RedshiftDataActions wraps RedshiftData actions.

func (RedshiftDataActions) CreateTable

func (actor RedshiftDataActions) CreateTable(ctx context.Context, clusterId string, databaseName string, tableName string, userName string, pauser demotools.IPausable, args []string) (*redshiftdata.ExecuteStatementOutput, error)

CreateTable creates a table named <tableName> in the <databaseName> database with the given arguments.

func (RedshiftDataActions) DeleteDataRows

func (actor RedshiftDataActions) DeleteDataRows(ctx context.Context, clusterId string, databaseName string, tableName string, userName string, pauser demotools.IPausable) (bool, error)

DeleteDataRows deletes all rows from the given table.

func (RedshiftDataActions) DeleteTable

func (actor RedshiftDataActions) DeleteTable(ctx context.Context, clusterId string, databaseName string, tableName string, userName string) (bool, error)

DeleteTable drops the table named <tableName> from the <databaseName> database.

func (RedshiftDataActions) DescribeStatement

func (actor RedshiftDataActions) DescribeStatement(query RedshiftQuery) (*redshiftdata.DescribeStatementOutput, error)

DescribeStatement gets information about the given statement.

func (RedshiftDataActions) ExecuteBatchStatement

ExecuteBatchStatement calls the BatchExecuteStatement operation from the RedshiftDataClient

func (RedshiftDataActions) ExecuteStatement

ExecuteStatement calls the ExecuteStatement operation from the RedshiftDataClient

func (RedshiftDataActions) GetStatementResult

func (actor RedshiftDataActions) GetStatementResult(ctx context.Context, statementId string) (*redshiftdata.GetStatementResultOutput, error)

GetStatementResult returns the result of the statement with the given id.

func (RedshiftDataActions) ListDatabases

func (actor RedshiftDataActions) ListDatabases(ctx context.Context, clusterId string, databaseName string, userName string) error

ListDatabases lists all databases in the given cluster.

func (RedshiftDataActions) WaitForQueryStatus

func (actor RedshiftDataActions) WaitForQueryStatus(query RedshiftQuery, pauser demotools.IPausable, showProgress bool) error

WaitForQueryStatus waits until the given RedshiftQuery object has succeeded or failed.

type RedshiftQuery

type RedshiftQuery struct {
	Result  interface{}
	Input   redshiftdata.DescribeStatementInput
	Context context.Context
}

RedshiftQuery makes it easier to deal with RedshiftQuery objects.

Jump to

Keyboard shortcuts

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