Vendor aws-sdk-go (dep ensure) (#178)
This commit is contained in:
1431
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/api.go
generated
vendored
Normal file
1431
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
76
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/cloudsearchdomainiface/interface.go
generated
vendored
Normal file
76
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/cloudsearchdomainiface/interface.go
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudsearchdomainiface provides an interface to enable mocking the Amazon CloudSearch Domain 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 cloudsearchdomainiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/cloudsearchdomain"
|
||||
)
|
||||
|
||||
// CloudSearchDomainAPI provides an interface to enable mocking the
|
||||
// cloudsearchdomain.CloudSearchDomain 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 CloudSearch Domain.
|
||||
// func myFunc(svc cloudsearchdomainiface.CloudSearchDomainAPI) bool {
|
||||
// // Make svc.Search request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := cloudsearchdomain.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockCloudSearchDomainClient struct {
|
||||
// cloudsearchdomainiface.CloudSearchDomainAPI
|
||||
// }
|
||||
// func (m *mockCloudSearchDomainClient) Search(input *cloudsearchdomain.SearchInput) (*cloudsearchdomain.SearchOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockCloudSearchDomainClient{}
|
||||
//
|
||||
// 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 CloudSearchDomainAPI interface {
|
||||
Search(*cloudsearchdomain.SearchInput) (*cloudsearchdomain.SearchOutput, error)
|
||||
SearchWithContext(aws.Context, *cloudsearchdomain.SearchInput, ...request.Option) (*cloudsearchdomain.SearchOutput, error)
|
||||
SearchRequest(*cloudsearchdomain.SearchInput) (*request.Request, *cloudsearchdomain.SearchOutput)
|
||||
|
||||
Suggest(*cloudsearchdomain.SuggestInput) (*cloudsearchdomain.SuggestOutput, error)
|
||||
SuggestWithContext(aws.Context, *cloudsearchdomain.SuggestInput, ...request.Option) (*cloudsearchdomain.SuggestOutput, error)
|
||||
SuggestRequest(*cloudsearchdomain.SuggestInput) (*request.Request, *cloudsearchdomain.SuggestOutput)
|
||||
|
||||
UploadDocuments(*cloudsearchdomain.UploadDocumentsInput) (*cloudsearchdomain.UploadDocumentsOutput, error)
|
||||
UploadDocumentsWithContext(aws.Context, *cloudsearchdomain.UploadDocumentsInput, ...request.Option) (*cloudsearchdomain.UploadDocumentsOutput, error)
|
||||
UploadDocumentsRequest(*cloudsearchdomain.UploadDocumentsInput) (*request.Request, *cloudsearchdomain.UploadDocumentsOutput)
|
||||
}
|
||||
|
||||
var _ CloudSearchDomainAPI = (*cloudsearchdomain.CloudSearchDomain)(nil)
|
||||
63
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/customizations_test.go
generated
vendored
Normal file
63
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/customizations_test.go
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
package cloudsearchdomain_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/unit"
|
||||
"github.com/aws/aws-sdk-go/service/cloudsearchdomain"
|
||||
)
|
||||
|
||||
func TestRequireEndpointIfRegionProvided(t *testing.T) {
|
||||
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
|
||||
Region: aws.String("mock-region"),
|
||||
DisableParamValidation: aws.Bool(true),
|
||||
})
|
||||
req, _ := svc.SearchRequest(nil)
|
||||
err := req.Build()
|
||||
|
||||
if e, a := "", svc.Endpoint; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if err == nil {
|
||||
t.Errorf("expect error, got none")
|
||||
}
|
||||
if e, a := aws.ErrMissingEndpoint, err; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRequireEndpointIfNoRegionProvided(t *testing.T) {
|
||||
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
|
||||
DisableParamValidation: aws.Bool(true),
|
||||
})
|
||||
req, _ := svc.SearchRequest(nil)
|
||||
err := req.Build()
|
||||
|
||||
if e, a := "", svc.Endpoint; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if err == nil {
|
||||
t.Errorf("expect error, got none")
|
||||
}
|
||||
if e, a := aws.ErrMissingEndpoint, err; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRequireEndpointUsed(t *testing.T) {
|
||||
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
|
||||
Region: aws.String("mock-region"),
|
||||
DisableParamValidation: aws.Bool(true),
|
||||
Endpoint: aws.String("https://endpoint"),
|
||||
})
|
||||
req, _ := svc.SearchRequest(nil)
|
||||
err := req.Build()
|
||||
|
||||
if e, a := "https://endpoint", svc.Endpoint; e != a {
|
||||
t.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
if err != nil {
|
||||
t.Errorf("expect no error, got %v", err)
|
||||
}
|
||||
}
|
||||
35
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/doc.go
generated
vendored
Normal file
35
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/doc.go
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudsearchdomain provides the client and types for making API
|
||||
// requests to Amazon CloudSearch Domain.
|
||||
//
|
||||
// You use the AmazonCloudSearch2013 API to upload documents to a search domain
|
||||
// and search those documents.
|
||||
//
|
||||
// The endpoints for submitting UploadDocuments, Search, and Suggest requests
|
||||
// are domain-specific. To get the endpoints for your domain, use the Amazon
|
||||
// CloudSearch configuration service DescribeDomains action. The domain endpoints
|
||||
// are also displayed on the domain dashboard in the Amazon CloudSearch console.
|
||||
// You submit suggest requests to the search endpoint.
|
||||
//
|
||||
// For more information, see the Amazon CloudSearch Developer Guide (http://docs.aws.amazon.com/cloudsearch/latest/developerguide).
|
||||
//
|
||||
// See cloudsearchdomain package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearchdomain/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact Amazon CloudSearch Domain 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 CloudSearch Domain client CloudSearchDomain for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearchdomain/#New
|
||||
package cloudsearchdomain
|
||||
18
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/errors.go
generated
vendored
Normal file
18
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/errors.go
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearchdomain
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeDocumentServiceException for service response error code
|
||||
// "DocumentServiceException".
|
||||
//
|
||||
// Information about any problems encountered while processing an upload request.
|
||||
ErrCodeDocumentServiceException = "DocumentServiceException"
|
||||
|
||||
// ErrCodeSearchException for service response error code
|
||||
// "SearchException".
|
||||
//
|
||||
// Information about any problems encountered while processing a search request.
|
||||
ErrCodeSearchException = "SearchException"
|
||||
)
|
||||
102
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/service.go
generated
vendored
Normal file
102
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/service.go
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearchdomain
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// CloudSearchDomain provides the API operation methods for making requests to
|
||||
// Amazon CloudSearch Domain. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CloudSearchDomain methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudSearchDomain 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 = "cloudsearchdomain" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CloudSearchDomain 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 CloudSearchDomain client from just a session.
|
||||
// svc := cloudsearchdomain.New(mySession)
|
||||
//
|
||||
// // Create a CloudSearchDomain client with additional configuration
|
||||
// svc := cloudsearchdomain.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudSearchDomain {
|
||||
var c client.Config
|
||||
if v, ok := p.(client.ConfigNoResolveEndpointProvider); ok {
|
||||
c = v.ClientConfigNoResolveEndpoint(cfgs...)
|
||||
} else {
|
||||
c = p.ClientConfig(EndpointsID, cfgs...)
|
||||
}
|
||||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "cloudsearch"
|
||||
}
|
||||
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) *CloudSearchDomain {
|
||||
svc := &CloudSearchDomain{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2013-01-01",
|
||||
JSONVersion: "1.1",
|
||||
},
|
||||
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 CloudSearchDomain operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudSearchDomain) 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
|
||||
}
|
||||
Reference in New Issue
Block a user