Update Go AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2019-07-13 00:03:55 +03:00
committed by Andrey Smirnov
parent d08be990ef
commit 94a72b23ff
2183 changed files with 885887 additions and 228114 deletions
File diff suppressed because it is too large Load Diff
+33
View File
@@ -0,0 +1,33 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package managedblockchain provides the client and types for making API
// requests to Amazon Managed Blockchain.
//
// Amazon Managed Blockchain is a fully managed service for creating and managing
// blockchain networks using open source frameworks. Blockchain allows you to
// build applications where multiple parties can securely and transparently
// run transactions and share data without the need for a trusted, central authority.
// Currently, Managed Blockchain supports the Hyperledger Fabric open source
// framework.
//
// See https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24 for more information on this service.
//
// See managedblockchain package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/managedblockchain/
//
// Using the Client
//
// To contact Amazon Managed Blockchain 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 Managed Blockchain client ManagedBlockchain for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/managedblockchain/#New
package managedblockchain
+67
View File
@@ -0,0 +1,67 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package managedblockchain
const (
// ErrCodeAccessDeniedException for service response error code
// "AccessDeniedException".
//
// You do not have sufficient access to perform this action.
ErrCodeAccessDeniedException = "AccessDeniedException"
// ErrCodeIllegalActionException for service response error code
// "IllegalActionException".
ErrCodeIllegalActionException = "IllegalActionException"
// ErrCodeInternalServiceErrorException for service response error code
// "InternalServiceErrorException".
//
// The request processing has failed because of an unknown error, exception
// or failure.
ErrCodeInternalServiceErrorException = "InternalServiceErrorException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// The action or operation requested is invalid. Verify that the action is typed
// correctly.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeResourceAlreadyExistsException for service response error code
// "ResourceAlreadyExistsException".
//
// A resource request is issued for a resource that already exists.
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"
// ErrCodeResourceLimitExceededException for service response error code
// "ResourceLimitExceededException".
//
// The maximum number of resources of that type already exist. Ensure the resources
// requested are within the boundaries of the service edition and your account
// limits.
ErrCodeResourceLimitExceededException = "ResourceLimitExceededException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// A requested resource does not exist on the network. It may have been deleted
// or referenced inaccurately.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeResourceNotReadyException for service response error code
// "ResourceNotReadyException".
//
// The requested resource exists but is not in a status that can complete the
// operation.
ErrCodeResourceNotReadyException = "ResourceNotReadyException"
// ErrCodeThrottlingException for service response error code
// "ThrottlingException".
//
// The request or operation could not be performed because a service is throttling
// requests. The most common source of throttling errors is launching EC2 instances
// such that your service limit for EC2 instances is exceeded. Request a limit
// increase or delete unused resources if possible.
ErrCodeThrottlingException = "ThrottlingException"
)
@@ -0,0 +1,154 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package managedblockchainiface provides an interface to enable mocking the Amazon Managed Blockchain service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters.
package managedblockchainiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/managedblockchain"
)
// ManagedBlockchainAPI provides an interface to enable mocking the
// managedblockchain.ManagedBlockchain service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // Amazon Managed Blockchain.
// func myFunc(svc managedblockchainiface.ManagedBlockchainAPI) bool {
// // Make svc.CreateMember request
// }
//
// func main() {
// sess := session.New()
// svc := managedblockchain.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockManagedBlockchainClient struct {
// managedblockchainiface.ManagedBlockchainAPI
// }
// func (m *mockManagedBlockchainClient) CreateMember(input *managedblockchain.CreateMemberInput) (*managedblockchain.CreateMemberOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockManagedBlockchainClient{}
//
// myfunc(mockSvc)
//
// // Verify myFunc's functionality
// }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type ManagedBlockchainAPI interface {
CreateMember(*managedblockchain.CreateMemberInput) (*managedblockchain.CreateMemberOutput, error)
CreateMemberWithContext(aws.Context, *managedblockchain.CreateMemberInput, ...request.Option) (*managedblockchain.CreateMemberOutput, error)
CreateMemberRequest(*managedblockchain.CreateMemberInput) (*request.Request, *managedblockchain.CreateMemberOutput)
CreateNetwork(*managedblockchain.CreateNetworkInput) (*managedblockchain.CreateNetworkOutput, error)
CreateNetworkWithContext(aws.Context, *managedblockchain.CreateNetworkInput, ...request.Option) (*managedblockchain.CreateNetworkOutput, error)
CreateNetworkRequest(*managedblockchain.CreateNetworkInput) (*request.Request, *managedblockchain.CreateNetworkOutput)
CreateNode(*managedblockchain.CreateNodeInput) (*managedblockchain.CreateNodeOutput, error)
CreateNodeWithContext(aws.Context, *managedblockchain.CreateNodeInput, ...request.Option) (*managedblockchain.CreateNodeOutput, error)
CreateNodeRequest(*managedblockchain.CreateNodeInput) (*request.Request, *managedblockchain.CreateNodeOutput)
CreateProposal(*managedblockchain.CreateProposalInput) (*managedblockchain.CreateProposalOutput, error)
CreateProposalWithContext(aws.Context, *managedblockchain.CreateProposalInput, ...request.Option) (*managedblockchain.CreateProposalOutput, error)
CreateProposalRequest(*managedblockchain.CreateProposalInput) (*request.Request, *managedblockchain.CreateProposalOutput)
DeleteMember(*managedblockchain.DeleteMemberInput) (*managedblockchain.DeleteMemberOutput, error)
DeleteMemberWithContext(aws.Context, *managedblockchain.DeleteMemberInput, ...request.Option) (*managedblockchain.DeleteMemberOutput, error)
DeleteMemberRequest(*managedblockchain.DeleteMemberInput) (*request.Request, *managedblockchain.DeleteMemberOutput)
DeleteNode(*managedblockchain.DeleteNodeInput) (*managedblockchain.DeleteNodeOutput, error)
DeleteNodeWithContext(aws.Context, *managedblockchain.DeleteNodeInput, ...request.Option) (*managedblockchain.DeleteNodeOutput, error)
DeleteNodeRequest(*managedblockchain.DeleteNodeInput) (*request.Request, *managedblockchain.DeleteNodeOutput)
GetMember(*managedblockchain.GetMemberInput) (*managedblockchain.GetMemberOutput, error)
GetMemberWithContext(aws.Context, *managedblockchain.GetMemberInput, ...request.Option) (*managedblockchain.GetMemberOutput, error)
GetMemberRequest(*managedblockchain.GetMemberInput) (*request.Request, *managedblockchain.GetMemberOutput)
GetNetwork(*managedblockchain.GetNetworkInput) (*managedblockchain.GetNetworkOutput, error)
GetNetworkWithContext(aws.Context, *managedblockchain.GetNetworkInput, ...request.Option) (*managedblockchain.GetNetworkOutput, error)
GetNetworkRequest(*managedblockchain.GetNetworkInput) (*request.Request, *managedblockchain.GetNetworkOutput)
GetNode(*managedblockchain.GetNodeInput) (*managedblockchain.GetNodeOutput, error)
GetNodeWithContext(aws.Context, *managedblockchain.GetNodeInput, ...request.Option) (*managedblockchain.GetNodeOutput, error)
GetNodeRequest(*managedblockchain.GetNodeInput) (*request.Request, *managedblockchain.GetNodeOutput)
GetProposal(*managedblockchain.GetProposalInput) (*managedblockchain.GetProposalOutput, error)
GetProposalWithContext(aws.Context, *managedblockchain.GetProposalInput, ...request.Option) (*managedblockchain.GetProposalOutput, error)
GetProposalRequest(*managedblockchain.GetProposalInput) (*request.Request, *managedblockchain.GetProposalOutput)
ListInvitations(*managedblockchain.ListInvitationsInput) (*managedblockchain.ListInvitationsOutput, error)
ListInvitationsWithContext(aws.Context, *managedblockchain.ListInvitationsInput, ...request.Option) (*managedblockchain.ListInvitationsOutput, error)
ListInvitationsRequest(*managedblockchain.ListInvitationsInput) (*request.Request, *managedblockchain.ListInvitationsOutput)
ListInvitationsPages(*managedblockchain.ListInvitationsInput, func(*managedblockchain.ListInvitationsOutput, bool) bool) error
ListInvitationsPagesWithContext(aws.Context, *managedblockchain.ListInvitationsInput, func(*managedblockchain.ListInvitationsOutput, bool) bool, ...request.Option) error
ListMembers(*managedblockchain.ListMembersInput) (*managedblockchain.ListMembersOutput, error)
ListMembersWithContext(aws.Context, *managedblockchain.ListMembersInput, ...request.Option) (*managedblockchain.ListMembersOutput, error)
ListMembersRequest(*managedblockchain.ListMembersInput) (*request.Request, *managedblockchain.ListMembersOutput)
ListMembersPages(*managedblockchain.ListMembersInput, func(*managedblockchain.ListMembersOutput, bool) bool) error
ListMembersPagesWithContext(aws.Context, *managedblockchain.ListMembersInput, func(*managedblockchain.ListMembersOutput, bool) bool, ...request.Option) error
ListNetworks(*managedblockchain.ListNetworksInput) (*managedblockchain.ListNetworksOutput, error)
ListNetworksWithContext(aws.Context, *managedblockchain.ListNetworksInput, ...request.Option) (*managedblockchain.ListNetworksOutput, error)
ListNetworksRequest(*managedblockchain.ListNetworksInput) (*request.Request, *managedblockchain.ListNetworksOutput)
ListNetworksPages(*managedblockchain.ListNetworksInput, func(*managedblockchain.ListNetworksOutput, bool) bool) error
ListNetworksPagesWithContext(aws.Context, *managedblockchain.ListNetworksInput, func(*managedblockchain.ListNetworksOutput, bool) bool, ...request.Option) error
ListNodes(*managedblockchain.ListNodesInput) (*managedblockchain.ListNodesOutput, error)
ListNodesWithContext(aws.Context, *managedblockchain.ListNodesInput, ...request.Option) (*managedblockchain.ListNodesOutput, error)
ListNodesRequest(*managedblockchain.ListNodesInput) (*request.Request, *managedblockchain.ListNodesOutput)
ListNodesPages(*managedblockchain.ListNodesInput, func(*managedblockchain.ListNodesOutput, bool) bool) error
ListNodesPagesWithContext(aws.Context, *managedblockchain.ListNodesInput, func(*managedblockchain.ListNodesOutput, bool) bool, ...request.Option) error
ListProposalVotes(*managedblockchain.ListProposalVotesInput) (*managedblockchain.ListProposalVotesOutput, error)
ListProposalVotesWithContext(aws.Context, *managedblockchain.ListProposalVotesInput, ...request.Option) (*managedblockchain.ListProposalVotesOutput, error)
ListProposalVotesRequest(*managedblockchain.ListProposalVotesInput) (*request.Request, *managedblockchain.ListProposalVotesOutput)
ListProposalVotesPages(*managedblockchain.ListProposalVotesInput, func(*managedblockchain.ListProposalVotesOutput, bool) bool) error
ListProposalVotesPagesWithContext(aws.Context, *managedblockchain.ListProposalVotesInput, func(*managedblockchain.ListProposalVotesOutput, bool) bool, ...request.Option) error
ListProposals(*managedblockchain.ListProposalsInput) (*managedblockchain.ListProposalsOutput, error)
ListProposalsWithContext(aws.Context, *managedblockchain.ListProposalsInput, ...request.Option) (*managedblockchain.ListProposalsOutput, error)
ListProposalsRequest(*managedblockchain.ListProposalsInput) (*request.Request, *managedblockchain.ListProposalsOutput)
ListProposalsPages(*managedblockchain.ListProposalsInput, func(*managedblockchain.ListProposalsOutput, bool) bool) error
ListProposalsPagesWithContext(aws.Context, *managedblockchain.ListProposalsInput, func(*managedblockchain.ListProposalsOutput, bool) bool, ...request.Option) error
RejectInvitation(*managedblockchain.RejectInvitationInput) (*managedblockchain.RejectInvitationOutput, error)
RejectInvitationWithContext(aws.Context, *managedblockchain.RejectInvitationInput, ...request.Option) (*managedblockchain.RejectInvitationOutput, error)
RejectInvitationRequest(*managedblockchain.RejectInvitationInput) (*request.Request, *managedblockchain.RejectInvitationOutput)
VoteOnProposal(*managedblockchain.VoteOnProposalInput) (*managedblockchain.VoteOnProposalOutput, error)
VoteOnProposalWithContext(aws.Context, *managedblockchain.VoteOnProposalInput, ...request.Option) (*managedblockchain.VoteOnProposalOutput, error)
VoteOnProposalRequest(*managedblockchain.VoteOnProposalInput) (*request.Request, *managedblockchain.VoteOnProposalOutput)
}
var _ ManagedBlockchainAPI = (*managedblockchain.ManagedBlockchain)(nil)
+98
View File
@@ -0,0 +1,98 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package managedblockchain
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// ManagedBlockchain provides the API operation methods for making requests to
// Amazon Managed Blockchain. See this package's package overview docs
// for details on the service.
//
// ManagedBlockchain methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type ManagedBlockchain struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "ManagedBlockchain" // Name of service.
EndpointsID = "managedblockchain" // ID to lookup a service endpoint with.
ServiceID = "ManagedBlockchain" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the ManagedBlockchain 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 ManagedBlockchain client from just a session.
// svc := managedblockchain.New(mySession)
//
// // Create a ManagedBlockchain client with additional configuration
// svc := managedblockchain.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ManagedBlockchain {
c := p.ClientConfig(EndpointsID, cfgs...)
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "managedblockchain"
}
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ManagedBlockchain {
svc := &ManagedBlockchain{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2018-09-24",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a ManagedBlockchain operation and runs any
// custom request initialization.
func (c *ManagedBlockchain) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}