stub

package
v0.0.0-...-6d74526 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 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 BatchGetQueryExecutionStub

type BatchGetQueryExecutionStub struct {
	athenaiface.AthenaAPI
	// contains filtered or unexported fields
}

BatchGetQueryExecutionStub simulates BatchGetQueryExecution API.

func NewBatchGetQueryExecutionStub

func NewBatchGetQueryExecutionStub(rs ...*Result) *BatchGetQueryExecutionStub

NewBatchGetQueryExecutionStub creates a new BatchGetQueryExecutionStub which returns stub responses based on rs.

func (*BatchGetQueryExecutionStub) BatchGetQueryExecution

BatchGetQueryExecution returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings.

func (*BatchGetQueryExecutionStub) BatchGetQueryExecutionWithContext

func (s *BatchGetQueryExecutionStub) BatchGetQueryExecutionWithContext(ctx aws.Context, input *athena.BatchGetQueryExecutionInput, opts ...request.Option) (*athena.BatchGetQueryExecutionOutput, error)

BatchGetQueryExecutionWithContext is the same as BatchGetQueryExecution with the addition of the ability to pass a context and additional request options.

type Client

Client is a stub of Athena client.

func NewClient

func NewClient(rs ...*Result) *Client

NewClient returns a new Athena client which returns stub API responses based on rs.

func (*Client) BatchGetQueryExecution

func (s *Client) BatchGetQueryExecution(input *athena.BatchGetQueryExecutionInput) (*athena.BatchGetQueryExecutionOutput, error)

BatchGetQueryExecution returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings.

func (*Client) BatchGetQueryExecutionWithContext

func (s *Client) BatchGetQueryExecutionWithContext(ctx aws.Context, input *athena.BatchGetQueryExecutionInput, opts ...request.Option) (*athena.BatchGetQueryExecutionOutput, error)

BatchGetQueryExecutionWithContext is the same as BatchGetQueryExecution with the addition of the ability to pass a context and additional request options.

func (*Client) GetQueryExecution

func (s *Client) GetQueryExecution(input *athena.GetQueryExecutionInput) (*athena.GetQueryExecutionOutput, error)

GetQueryExecution returns information about a single execution of a query.

func (*Client) GetQueryExecutionWithContext

func (s *Client) GetQueryExecutionWithContext(ctx aws.Context, input *athena.GetQueryExecutionInput, opts ...request.Option) (*athena.GetQueryExecutionOutput, error)

GetQueryExecutionWithContext is the same as GetQueryExecution with the addition of the ability to pass a context and additional request options.

func (*Client) GetQueryResults

func (s *Client) GetQueryResults(input *athena.GetQueryResultsInput) (*athena.GetQueryResultsOutput, error)

GetQueryResults returns the results of a single query execution specified by QueryExecutionId.

func (*Client) GetQueryResultsPages

func (s *Client) GetQueryResultsPages(input *athena.GetQueryResultsInput, fn func(*athena.GetQueryResultsOutput, bool) bool) error

GetQueryResultsPages iterates over the pages of a GetQueryResults operation, calling the callback function with the response data for each page.

func (*Client) GetQueryResultsPagesWithContext

func (s *Client) GetQueryResultsPagesWithContext(ctx aws.Context, input *athena.GetQueryResultsInput, fn func(*athena.GetQueryResultsOutput, bool) bool, opts ...request.Option) error

GetQueryResultsPagesWithContext same as GetQueryResultsPages except it takes a Context and allows setting request options on the pages.

func (*Client) GetQueryResultsWithContext

func (s *Client) GetQueryResultsWithContext(ctx aws.Context, input *athena.GetQueryResultsInput, opts ...request.Option) (*athena.GetQueryResultsOutput, error)

GetQueryResultsWithContext is the same as GetQueryResults with the addition of the ability to pass a context and additional request options.

func (*Client) ListQueryExecutions

func (s *Client) ListQueryExecutions(input *athena.ListQueryExecutionsInput) (*athena.ListQueryExecutionsOutput, error)

ListQueryExecutions provides a list of all available query execution IDs.

func (*Client) ListQueryExecutionsPages

func (s *Client) ListQueryExecutionsPages(input *athena.ListQueryExecutionsInput, fn func(*athena.ListQueryExecutionsOutput, bool) bool) error

ListQueryExecutionsPages iterates over the pages of a ListQueryExecutions operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

func (*Client) ListQueryExecutionsPagesWithContext

func (s *Client) ListQueryExecutionsPagesWithContext(ctx aws.Context, input *athena.ListQueryExecutionsInput, fn func(*athena.ListQueryExecutionsOutput, bool) bool, opts ...request.Option) error

ListQueryExecutionsPagesWithContext same as ListQueryExecutionsPages except it takes a Context and allows setting request options on the pages.

func (*Client) ListQueryExecutionsWithContext

func (s *Client) ListQueryExecutionsWithContext(ctx aws.Context, input *athena.ListQueryExecutionsInput, opts ...request.Option) (*athena.ListQueryExecutionsOutput, error)

ListQueryExecutionsWithContext is the same as ListQueryExecutions with the addition of the ability to pass a context and additional request options.

func (*Client) StartQueryExecution

func (s *Client) StartQueryExecution(input *athena.StartQueryExecutionInput) (*athena.StartQueryExecutionOutput, error)

StartQueryExecution runs the SQL query statements contained in the Query string.

func (*Client) StartQueryExecutionWithContext

func (s *Client) StartQueryExecutionWithContext(ctx aws.Context, input *athena.StartQueryExecutionInput, opts ...request.Option) (*athena.StartQueryExecutionOutput, error)

StartQueryExecutionWithContext is the same as StartQueryExecution with the addition of the ability to pass a context and additional request options.

func (*Client) StopQueryExecution

func (s *Client) StopQueryExecution(input *athena.StopQueryExecutionInput) (*athena.StopQueryExecutionOutput, error)

StopQueryExecution stops a query execution.

func (*Client) StopQueryExecutionWithContext

func (s *Client) StopQueryExecutionWithContext(ctx aws.Context, input *athena.StopQueryExecutionInput, opts ...request.Option) (*athena.StopQueryExecutionOutput, error)

StopQueryExecutionWithContext is the same as StopQueryExecution with the addition of the ability to pass a context and additional request options.

type FinalState

type FinalState int

FinalState represents a final state of a query execution, such as SUCCEEDED, FAILED or CANCELLED.

const (
	// Succeeded represents SUCCEEDED state.
	Succeeded FinalState = iota
	// Failed represents FAILED state.
	Failed
	// Cancelled represents CANCELLED state.
	Cancelled
)

type GetQueryExecutionStub

type GetQueryExecutionStub struct {
	athenaiface.AthenaAPI
	// contains filtered or unexported fields
}

GetQueryExecutionStub simulates GetQueryExecution API.

func NewGetQueryExecutionStub

func NewGetQueryExecutionStub(rs ...*Result) *GetQueryExecutionStub

NewGetQueryExecutionStub creates a new GetQueryExecutionStub which returns stub responses based on rs.

func (*GetQueryExecutionStub) GetQueryExecution

GetQueryExecution returns information about a single execution of a query.

func (*GetQueryExecutionStub) GetQueryExecutionWithContext

func (s *GetQueryExecutionStub) GetQueryExecutionWithContext(ctx aws.Context, input *athena.GetQueryExecutionInput, opts ...request.Option) (*athena.GetQueryExecutionOutput, error)

GetQueryExecutionWithContext is the same as GetQueryExecution with the addition of the ability to pass a context and additional request options.

type GetQueryResultsStub

type GetQueryResultsStub struct {
	athenaiface.AthenaAPI
	MaxPages int
	// contains filtered or unexported fields
}

GetQueryResultsStub simulates GetQueryResults and GetQueryResultsPages API.

func NewGetQueryResultsStub

func NewGetQueryResultsStub(rs ...*Result) *GetQueryResultsStub

NewGetQueryResultsStub creates a new GetQueryResultsStub which returns stub responses based on rs.

func (*GetQueryResultsStub) GetQueryResults

GetQueryResults returns the results of a single query execution specified by QueryExecutionId.

func (*GetQueryResultsStub) GetQueryResultsPages

func (s *GetQueryResultsStub) GetQueryResultsPages(input *athena.GetQueryResultsInput, fn func(*athena.GetQueryResultsOutput, bool) bool) error

GetQueryResultsPages iterates over the pages of a GetQueryResults operation, calling the callback function with the response data for each page.

func (*GetQueryResultsStub) GetQueryResultsPagesWithContext

func (s *GetQueryResultsStub) GetQueryResultsPagesWithContext(ctx aws.Context, input *athena.GetQueryResultsInput, fn func(*athena.GetQueryResultsOutput, bool) bool, opts ...request.Option) error

GetQueryResultsPagesWithContext same as GetQueryResultsPages except it takes a Context and allows setting request options on the pages.

func (*GetQueryResultsStub) GetQueryResultsWithContext

func (s *GetQueryResultsStub) GetQueryResultsWithContext(ctx aws.Context, input *athena.GetQueryResultsInput, opts ...request.Option) (*athena.GetQueryResultsOutput, error)

GetQueryResultsWithContext is the same as GetQueryResults with the addition of the ability to pass a context and additional request options.

type ListQueryExecutionsStub

type ListQueryExecutionsStub struct {
	athenaiface.AthenaAPI
	// contains filtered or unexported fields
}

ListQueryExecutionsStub simulates ListQueryExecutions API.

func NewListQueryExecutionsStub

func NewListQueryExecutionsStub(rs ...*Result) *ListQueryExecutionsStub

NewListQueryExecutionsStub creates a new ListQueryExecutionsStub which returns stub responses based on rs.

func (*ListQueryExecutionsStub) ListQueryExecutions

ListQueryExecutions provides a list of all available query execution IDs.

func (*ListQueryExecutionsStub) ListQueryExecutionsPages

ListQueryExecutionsPages iterates over the pages of a ListQueryExecutions operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

func (*ListQueryExecutionsStub) ListQueryExecutionsPagesWithContext

func (s *ListQueryExecutionsStub) ListQueryExecutionsPagesWithContext(ctx aws.Context, input *athena.ListQueryExecutionsInput, fn func(*athena.ListQueryExecutionsOutput, bool) bool, opts ...request.Option) error

ListQueryExecutionsPagesWithContext same as ListQueryExecutionsPages except it takes a Context and allows setting request options on the pages.

func (*ListQueryExecutionsStub) ListQueryExecutionsWithContext

func (s *ListQueryExecutionsStub) ListQueryExecutionsWithContext(ctx aws.Context, input *athena.ListQueryExecutionsInput, opts ...request.Option) (*athena.ListQueryExecutionsOutput, error)

ListQueryExecutionsWithContext is the same as ListQueryExecutions with the addition of the ability to pass a context and additional request options.

type Result

type Result struct {
	ID           string
	Query        string
	FinalState   FinalState // default: Succeeded
	SubmitTime   time.Time
	ExecTime     int64
	ScannedBytes int64
	athena.ResultSet
	ErrMsg string
}

Result represents a stub result of a query execution.

type StartQueryExecutionStub

type StartQueryExecutionStub struct {
	athenaiface.AthenaAPI
	// contains filtered or unexported fields
}

StartQueryExecutionStub simulates StartQueryExecution API.

func NewStartQueryExecutionStub

func NewStartQueryExecutionStub(rs ...*Result) *StartQueryExecutionStub

NewStartQueryExecutionStub creates a new StartQueryExecutionStub which returns stub responses based on rs.

func (*StartQueryExecutionStub) StartQueryExecution

StartQueryExecution runs the SQL query statements contained in the Query string. It returns an error if a query other than SELECT, SHOW or DESCRIBE statement is given.

func (*StartQueryExecutionStub) StartQueryExecutionWithContext

func (s *StartQueryExecutionStub) StartQueryExecutionWithContext(ctx aws.Context, input *athena.StartQueryExecutionInput, opts ...request.Option) (*athena.StartQueryExecutionOutput, error)

StartQueryExecutionWithContext is the same as StartQueryExecution with the addition of the ability to pass a context and additional request options.

type StopQueryExecutionStub

type StopQueryExecutionStub struct {
	athenaiface.AthenaAPI
	// contains filtered or unexported fields
}

StopQueryExecutionStub simulates StopQueryExecution API.

func NewStopQueryExecutionStub

func NewStopQueryExecutionStub(rs ...*Result) *StopQueryExecutionStub

NewStopQueryExecutionStub creates a new StopQueryExecutionStub which returns stub responses based on rs.

func (*StopQueryExecutionStub) StopQueryExecution

StopQueryExecution stops a query execution.

func (*StopQueryExecutionStub) StopQueryExecutionWithContext

func (s *StopQueryExecutionStub) StopQueryExecutionWithContext(ctx aws.Context, input *athena.StopQueryExecutionInput, opts ...request.Option) (*athena.StopQueryExecutionOutput, error)

StopQueryExecutionWithContext is the same as StopQueryExecution with the addition of the ability to pass a context and additional request options.

Jump to

Keyboard shortcuts

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