aws-sdk-go: github.com/aws/aws-sdk-go/service/qldbsession Index | Files | Directories

package qldbsession

import "github.com/aws/aws-sdk-go/service/qldbsession"

Package qldbsession provides the client and types for making API requests to Amazon QLDB Session.

The transactional data APIs for Amazon QLDB

See https://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11 for more information on this service.

See qldbsession package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/qldbsession/

Using the Client

To contact Amazon QLDB Session with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Amazon QLDB Session client QLDBSession for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/qldbsession/#New

Index

Package Files

api.go doc.go errors.go service.go

Constants

const (

    // ErrCodeBadRequestException for service response error code
    // "BadRequestException".
    //
    // Returned if the request is malformed or contains an error such as an invalid
    // parameter value or a missing required parameter.
    ErrCodeBadRequestException = "BadRequestException"

    // ErrCodeInvalidSessionException for service response error code
    // "InvalidSessionException".
    //
    // Returned if the session doesn't exist anymore because it timed-out or expired.
    ErrCodeInvalidSessionException = "InvalidSessionException"

    // ErrCodeLimitExceededException for service response error code
    // "LimitExceededException".
    //
    // Returned if a resource limit such as number of active sessions is exceeded.
    ErrCodeLimitExceededException = "LimitExceededException"

    // ErrCodeOccConflictException for service response error code
    // "OccConflictException".
    //
    // Returned when a transaction cannot be written to the journal due to a failure
    // in the verification phase of Optimistic Concurrency Control.
    ErrCodeOccConflictException = "OccConflictException"

    // ErrCodeRateExceededException for service response error code
    // "RateExceededException".
    //
    // Returned when the rate of requests exceeds the allowed throughput.
    ErrCodeRateExceededException = "RateExceededException"
)
const (
    ServiceName = "QLDB Session" // Name of service.
    EndpointsID = "session.qldb" // ID to lookup a service endpoint with.
    ServiceID   = "QLDB Session" // ServiceID is a unique identifer of a specific service.
)

Service information constants

type AbortTransactionRequest Uses

type AbortTransactionRequest struct {
    // contains filtered or unexported fields
}

Contains the details of the transaction to abort.

func (AbortTransactionRequest) GoString Uses

func (s AbortTransactionRequest) GoString() string

GoString returns the string representation

func (AbortTransactionRequest) String Uses

func (s AbortTransactionRequest) String() string

String returns the string representation

type AbortTransactionResult Uses

type AbortTransactionResult struct {
    // contains filtered or unexported fields
}

Contains the details of the aborted transaction.

func (AbortTransactionResult) GoString Uses

func (s AbortTransactionResult) GoString() string

GoString returns the string representation

func (AbortTransactionResult) String Uses

func (s AbortTransactionResult) String() string

String returns the string representation

type CommitTransactionRequest Uses

type CommitTransactionRequest struct {

    // Specifies the commit digest for the transaction to commit. For every active
    // transaction, the commit digest must be passed. QLDB validates CommitDigest
    // and rejects the commit with an error if the digest computed on the client
    // does not match the digest computed by QLDB.
    //
    // CommitDigest is automatically base64 encoded/decoded by the SDK.
    //
    // CommitDigest is a required field
    CommitDigest []byte `type:"blob" required:"true"`

    // Specifies the transaction id of the transaction to commit.
    //
    // TransactionId is a required field
    TransactionId *string `min:"22" type:"string" required:"true"`
    // contains filtered or unexported fields
}

Contains the details of the transaction to commit.

func (CommitTransactionRequest) GoString Uses

func (s CommitTransactionRequest) GoString() string

GoString returns the string representation

func (*CommitTransactionRequest) SetCommitDigest Uses

func (s *CommitTransactionRequest) SetCommitDigest(v []byte) *CommitTransactionRequest

SetCommitDigest sets the CommitDigest field's value.

func (*CommitTransactionRequest) SetTransactionId Uses

func (s *CommitTransactionRequest) SetTransactionId(v string) *CommitTransactionRequest

SetTransactionId sets the TransactionId field's value.

func (CommitTransactionRequest) String Uses

func (s CommitTransactionRequest) String() string

String returns the string representation

func (*CommitTransactionRequest) Validate Uses

func (s *CommitTransactionRequest) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CommitTransactionResult Uses

type CommitTransactionResult struct {

    // The commit digest of the committed transaction.
    //
    // CommitDigest is automatically base64 encoded/decoded by the SDK.
    CommitDigest []byte `type:"blob"`

    // The transaction id of the committed transaction.
    TransactionId *string `min:"22" type:"string"`
    // contains filtered or unexported fields
}

Contains the details of the committed transaction.

func (CommitTransactionResult) GoString Uses

func (s CommitTransactionResult) GoString() string

GoString returns the string representation

func (*CommitTransactionResult) SetCommitDigest Uses

func (s *CommitTransactionResult) SetCommitDigest(v []byte) *CommitTransactionResult

SetCommitDigest sets the CommitDigest field's value.

func (*CommitTransactionResult) SetTransactionId Uses

func (s *CommitTransactionResult) SetTransactionId(v string) *CommitTransactionResult

SetTransactionId sets the TransactionId field's value.

func (CommitTransactionResult) String Uses

func (s CommitTransactionResult) String() string

String returns the string representation

type EndSessionRequest Uses

type EndSessionRequest struct {
    // contains filtered or unexported fields
}

Specifies a request to end the session.

func (EndSessionRequest) GoString Uses

func (s EndSessionRequest) GoString() string

GoString returns the string representation

func (EndSessionRequest) String Uses

func (s EndSessionRequest) String() string

String returns the string representation

type EndSessionResult Uses

type EndSessionResult struct {
    // contains filtered or unexported fields
}

Contains the details of the ended session.

func (EndSessionResult) GoString Uses

func (s EndSessionResult) GoString() string

GoString returns the string representation

func (EndSessionResult) String Uses

func (s EndSessionResult) String() string

String returns the string representation

type ExecuteStatementRequest Uses

type ExecuteStatementRequest struct {

    // Specifies the parameters for the parameterized statement in the request.
    Parameters []*ValueHolder `type:"list"`

    // Specifies the statement of the request.
    //
    // Statement is a required field
    Statement *string `min:"1" type:"string" required:"true"`

    // Specifies the transaction id of the request.
    //
    // TransactionId is a required field
    TransactionId *string `min:"22" type:"string" required:"true"`
    // contains filtered or unexported fields
}

Specifies a request to execute a statement.

func (ExecuteStatementRequest) GoString Uses

func (s ExecuteStatementRequest) GoString() string

GoString returns the string representation

func (*ExecuteStatementRequest) SetParameters Uses

func (s *ExecuteStatementRequest) SetParameters(v []*ValueHolder) *ExecuteStatementRequest

SetParameters sets the Parameters field's value.

func (*ExecuteStatementRequest) SetStatement Uses

func (s *ExecuteStatementRequest) SetStatement(v string) *ExecuteStatementRequest

SetStatement sets the Statement field's value.

func (*ExecuteStatementRequest) SetTransactionId Uses

func (s *ExecuteStatementRequest) SetTransactionId(v string) *ExecuteStatementRequest

SetTransactionId sets the TransactionId field's value.

func (ExecuteStatementRequest) String Uses

func (s ExecuteStatementRequest) String() string

String returns the string representation

func (*ExecuteStatementRequest) Validate Uses

func (s *ExecuteStatementRequest) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ExecuteStatementResult Uses

type ExecuteStatementResult struct {

    // Contains the details of the first fetched page.
    FirstPage *Page `type:"structure"`
    // contains filtered or unexported fields
}

Contains the details of the executed statement.

func (ExecuteStatementResult) GoString Uses

func (s ExecuteStatementResult) GoString() string

GoString returns the string representation

func (*ExecuteStatementResult) SetFirstPage Uses

func (s *ExecuteStatementResult) SetFirstPage(v *Page) *ExecuteStatementResult

SetFirstPage sets the FirstPage field's value.

func (ExecuteStatementResult) String Uses

func (s ExecuteStatementResult) String() string

String returns the string representation

type FetchPageRequest Uses

type FetchPageRequest struct {

    // Specifies the next page token of the page to be fetched.
    //
    // NextPageToken is a required field
    NextPageToken *string `min:"4" type:"string" required:"true"`

    // Specifies the transaction id of the page to be fetched.
    //
    // TransactionId is a required field
    TransactionId *string `min:"22" type:"string" required:"true"`
    // contains filtered or unexported fields
}

Specifies the details of the page to be fetched.

func (FetchPageRequest) GoString Uses

func (s FetchPageRequest) GoString() string

GoString returns the string representation

func (*FetchPageRequest) SetNextPageToken Uses

func (s *FetchPageRequest) SetNextPageToken(v string) *FetchPageRequest

SetNextPageToken sets the NextPageToken field's value.

func (*FetchPageRequest) SetTransactionId Uses

func (s *FetchPageRequest) SetTransactionId(v string) *FetchPageRequest

SetTransactionId sets the TransactionId field's value.

func (FetchPageRequest) String Uses

func (s FetchPageRequest) String() string

String returns the string representation

func (*FetchPageRequest) Validate Uses

func (s *FetchPageRequest) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type FetchPageResult Uses

type FetchPageResult struct {

    // Contains details of the fetched page.
    Page *Page `type:"structure"`
    // contains filtered or unexported fields
}

Contains the page that was fetched.

func (FetchPageResult) GoString Uses

func (s FetchPageResult) GoString() string

GoString returns the string representation

func (*FetchPageResult) SetPage Uses

func (s *FetchPageResult) SetPage(v *Page) *FetchPageResult

SetPage sets the Page field's value.

func (FetchPageResult) String Uses

func (s FetchPageResult) String() string

String returns the string representation

type Page Uses

type Page struct {

    // The token of the next page.
    NextPageToken *string `min:"4" type:"string"`

    // A structure that contains values in multiple encoding formats.
    Values []*ValueHolder `type:"list"`
    // contains filtered or unexported fields
}

Contains details of the fetched page.

func (Page) GoString Uses

func (s Page) GoString() string

GoString returns the string representation

func (*Page) SetNextPageToken Uses

func (s *Page) SetNextPageToken(v string) *Page

SetNextPageToken sets the NextPageToken field's value.

func (*Page) SetValues Uses

func (s *Page) SetValues(v []*ValueHolder) *Page

SetValues sets the Values field's value.

func (Page) String Uses

func (s Page) String() string

String returns the string representation

type QLDBSession Uses

type QLDBSession struct {
    *client.Client
}

QLDBSession provides the API operation methods for making requests to Amazon QLDB Session. See this package's package overview docs for details on the service.

QLDBSession methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New Uses

func New(p client.ConfigProvider, cfgs ...*aws.Config) *QLDBSession

New creates a new instance of the QLDBSession client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

// Create a QLDBSession client from just a session.
svc := qldbsession.New(mySession)

// Create a QLDBSession client with additional configuration
svc := qldbsession.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*QLDBSession) SendCommand Uses

func (c *QLDBSession) SendCommand(input *SendCommandInput) (*SendCommandOutput, error)

SendCommand API operation for Amazon QLDB Session.

Sends a command to an Amazon QLDB ledger.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon QLDB Session's API operation SendCommand for usage and error information.

Returned Error Codes:

* ErrCodeBadRequestException "BadRequestException"
Returned if the request is malformed or contains an error such as an invalid
parameter value or a missing required parameter.

* ErrCodeInvalidSessionException "InvalidSessionException"
Returned if the session doesn't exist anymore because it timed-out or expired.

* ErrCodeOccConflictException "OccConflictException"
Returned when a transaction cannot be written to the journal due to a failure
in the verification phase of Optimistic Concurrency Control.

* ErrCodeRateExceededException "RateExceededException"
Returned when the rate of requests exceeds the allowed throughput.

* ErrCodeLimitExceededException "LimitExceededException"
Returned if a resource limit such as number of active sessions is exceeded.

See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/SendCommand

func (*QLDBSession) SendCommandRequest Uses

func (c *QLDBSession) SendCommandRequest(input *SendCommandInput) (req *request.Request, output *SendCommandOutput)

SendCommandRequest generates a "aws/request.Request" representing the client's request for the SendCommand operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See SendCommand for more information on using the SendCommand API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the SendCommandRequest method.
req, resp := client.SendCommandRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/SendCommand

func (*QLDBSession) SendCommandWithContext Uses

func (c *QLDBSession) SendCommandWithContext(ctx aws.Context, input *SendCommandInput, opts ...request.Option) (*SendCommandOutput, error)

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

See SendCommand for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

type SendCommandInput Uses

type SendCommandInput struct {

    // Command to abort the current transaction.
    AbortTransaction *AbortTransactionRequest `type:"structure"`

    // Command to commit the specified transaction.
    CommitTransaction *CommitTransactionRequest `type:"structure"`

    // Command to end the current session.
    EndSession *EndSessionRequest `type:"structure"`

    // Command to execute a statement in the specified transaction.
    ExecuteStatement *ExecuteStatementRequest `type:"structure"`

    // Command to fetch a page.
    FetchPage *FetchPageRequest `type:"structure"`

    // Specifies the session token for the current command. A session token is constant
    // throughout the life of the session.
    //
    // To obtain a session token, run the StartSession command. This SessionToken
    // is required for every subsequent command that is issued during the current
    // session.
    SessionToken *string `min:"4" type:"string"`

    // Command to start a new session. A session token is obtained as part of the
    // response.
    StartSession *StartSessionRequest `type:"structure"`

    // Command to start a new transaction.
    StartTransaction *StartTransactionRequest `type:"structure"`
    // contains filtered or unexported fields
}

func (SendCommandInput) GoString Uses

func (s SendCommandInput) GoString() string

GoString returns the string representation

func (*SendCommandInput) SetAbortTransaction Uses

func (s *SendCommandInput) SetAbortTransaction(v *AbortTransactionRequest) *SendCommandInput

SetAbortTransaction sets the AbortTransaction field's value.

func (*SendCommandInput) SetCommitTransaction Uses

func (s *SendCommandInput) SetCommitTransaction(v *CommitTransactionRequest) *SendCommandInput

SetCommitTransaction sets the CommitTransaction field's value.

func (*SendCommandInput) SetEndSession Uses

func (s *SendCommandInput) SetEndSession(v *EndSessionRequest) *SendCommandInput

SetEndSession sets the EndSession field's value.

func (*SendCommandInput) SetExecuteStatement Uses

func (s *SendCommandInput) SetExecuteStatement(v *ExecuteStatementRequest) *SendCommandInput

SetExecuteStatement sets the ExecuteStatement field's value.

func (*SendCommandInput) SetFetchPage Uses

func (s *SendCommandInput) SetFetchPage(v *FetchPageRequest) *SendCommandInput

SetFetchPage sets the FetchPage field's value.

func (*SendCommandInput) SetSessionToken Uses

func (s *SendCommandInput) SetSessionToken(v string) *SendCommandInput

SetSessionToken sets the SessionToken field's value.

func (*SendCommandInput) SetStartSession Uses

func (s *SendCommandInput) SetStartSession(v *StartSessionRequest) *SendCommandInput

SetStartSession sets the StartSession field's value.

func (*SendCommandInput) SetStartTransaction Uses

func (s *SendCommandInput) SetStartTransaction(v *StartTransactionRequest) *SendCommandInput

SetStartTransaction sets the StartTransaction field's value.

func (SendCommandInput) String Uses

func (s SendCommandInput) String() string

String returns the string representation

func (*SendCommandInput) Validate Uses

func (s *SendCommandInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type SendCommandOutput Uses

type SendCommandOutput struct {

    // Contains the details of the aborted transaction.
    AbortTransaction *AbortTransactionResult `type:"structure"`

    // Contains the details of the committed transaction.
    CommitTransaction *CommitTransactionResult `type:"structure"`

    // Contains the details of the ended session.
    EndSession *EndSessionResult `type:"structure"`

    // Contains the details of the executed statement.
    ExecuteStatement *ExecuteStatementResult `type:"structure"`

    // Contains the details of the fetched page.
    FetchPage *FetchPageResult `type:"structure"`

    // Contains the details of the started session that includes a session token.
    // This SessionToken is required for every subsequent command that is issued
    // during the current session.
    StartSession *StartSessionResult `type:"structure"`

    // Contains the details of the started transaction.
    StartTransaction *StartTransactionResult `type:"structure"`
    // contains filtered or unexported fields
}

func (SendCommandOutput) GoString Uses

func (s SendCommandOutput) GoString() string

GoString returns the string representation

func (*SendCommandOutput) SetAbortTransaction Uses

func (s *SendCommandOutput) SetAbortTransaction(v *AbortTransactionResult) *SendCommandOutput

SetAbortTransaction sets the AbortTransaction field's value.

func (*SendCommandOutput) SetCommitTransaction Uses

func (s *SendCommandOutput) SetCommitTransaction(v *CommitTransactionResult) *SendCommandOutput

SetCommitTransaction sets the CommitTransaction field's value.

func (*SendCommandOutput) SetEndSession Uses

func (s *SendCommandOutput) SetEndSession(v *EndSessionResult) *SendCommandOutput

SetEndSession sets the EndSession field's value.

func (*SendCommandOutput) SetExecuteStatement Uses

func (s *SendCommandOutput) SetExecuteStatement(v *ExecuteStatementResult) *SendCommandOutput

SetExecuteStatement sets the ExecuteStatement field's value.

func (*SendCommandOutput) SetFetchPage Uses

func (s *SendCommandOutput) SetFetchPage(v *FetchPageResult) *SendCommandOutput

SetFetchPage sets the FetchPage field's value.

func (*SendCommandOutput) SetStartSession Uses

func (s *SendCommandOutput) SetStartSession(v *StartSessionResult) *SendCommandOutput

SetStartSession sets the StartSession field's value.

func (*SendCommandOutput) SetStartTransaction Uses

func (s *SendCommandOutput) SetStartTransaction(v *StartTransactionResult) *SendCommandOutput

SetStartTransaction sets the StartTransaction field's value.

func (SendCommandOutput) String Uses

func (s SendCommandOutput) String() string

String returns the string representation

type StartSessionRequest Uses

type StartSessionRequest struct {

    // The name of the ledger to start a new session against.
    //
    // LedgerName is a required field
    LedgerName *string `min:"1" type:"string" required:"true"`
    // contains filtered or unexported fields
}

Specifies a request to start a a new session.

func (StartSessionRequest) GoString Uses

func (s StartSessionRequest) GoString() string

GoString returns the string representation

func (*StartSessionRequest) SetLedgerName Uses

func (s *StartSessionRequest) SetLedgerName(v string) *StartSessionRequest

SetLedgerName sets the LedgerName field's value.

func (StartSessionRequest) String Uses

func (s StartSessionRequest) String() string

String returns the string representation

func (*StartSessionRequest) Validate Uses

func (s *StartSessionRequest) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type StartSessionResult Uses

type StartSessionResult struct {

    // Session token of the started session. This SessionToken is required for every
    // subsequent command that is issued during the current session.
    SessionToken *string `min:"4" type:"string"`
    // contains filtered or unexported fields
}

Contains the details of the started session.

func (StartSessionResult) GoString Uses

func (s StartSessionResult) GoString() string

GoString returns the string representation

func (*StartSessionResult) SetSessionToken Uses

func (s *StartSessionResult) SetSessionToken(v string) *StartSessionResult

SetSessionToken sets the SessionToken field's value.

func (StartSessionResult) String Uses

func (s StartSessionResult) String() string

String returns the string representation

type StartTransactionRequest Uses

type StartTransactionRequest struct {
    // contains filtered or unexported fields
}

Specifies a request to start a transaction.

func (StartTransactionRequest) GoString Uses

func (s StartTransactionRequest) GoString() string

GoString returns the string representation

func (StartTransactionRequest) String Uses

func (s StartTransactionRequest) String() string

String returns the string representation

type StartTransactionResult Uses

type StartTransactionResult struct {

    // The transaction id of the started transaction.
    TransactionId *string `min:"22" type:"string"`
    // contains filtered or unexported fields
}

Contains the details of the started transaction.

func (StartTransactionResult) GoString Uses

func (s StartTransactionResult) GoString() string

GoString returns the string representation

func (*StartTransactionResult) SetTransactionId Uses

func (s *StartTransactionResult) SetTransactionId(v string) *StartTransactionResult

SetTransactionId sets the TransactionId field's value.

func (StartTransactionResult) String Uses

func (s StartTransactionResult) String() string

String returns the string representation

type ValueHolder Uses

type ValueHolder struct {

    // An Amazon Ion binary value contained in a ValueHolder structure.
    //
    // IonBinary is automatically base64 encoded/decoded by the SDK.
    IonBinary []byte `min:"1" type:"blob"`

    // An Amazon Ion plaintext value contained in a ValueHolder structure.
    IonText *string `min:"1" type:"string"`
    // contains filtered or unexported fields
}

A structure that can contains values in multiple encoding formats.

func (ValueHolder) GoString Uses

func (s ValueHolder) GoString() string

GoString returns the string representation

func (*ValueHolder) SetIonBinary Uses

func (s *ValueHolder) SetIonBinary(v []byte) *ValueHolder

SetIonBinary sets the IonBinary field's value.

func (*ValueHolder) SetIonText Uses

func (s *ValueHolder) SetIonText(v string) *ValueHolder

SetIonText sets the IonText field's value.

func (ValueHolder) String Uses

func (s ValueHolder) String() string

String returns the string representation

func (*ValueHolder) Validate Uses

func (s *ValueHolder) Validate() error

Validate inspects the fields of the type to determine if they are valid.

Directories

PathSynopsis
qldbsessionifacePackage qldbsessioniface provides an interface to enable mocking the Amazon QLDB Session service client for testing your code.

Package qldbsession imports 8 packages (graph) and is imported by 6 packages. Updated 2019-10-28. Refresh now. Tools for package owners.