mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+28
-33
@@ -1,6 +1,5 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudsearchdomain provides a client for Amazon CloudSearch Domain.
|
||||
package cloudsearchdomain
|
||||
|
||||
import (
|
||||
@@ -15,19 +14,18 @@ const opSearch = "Search"
|
||||
|
||||
// SearchRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the Search operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See Search for usage and error information.
|
||||
// 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.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the Search method directly
|
||||
// instead.
|
||||
// See Search for more information on using the Search
|
||||
// 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.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the SearchRequest method.
|
||||
// req, resp := client.SearchRequest(params)
|
||||
@@ -112,19 +110,18 @@ const opSuggest = "Suggest"
|
||||
|
||||
// SuggestRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the Suggest operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See Suggest for usage and error information.
|
||||
// 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.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the Suggest method directly
|
||||
// instead.
|
||||
// See Suggest for more information on using the Suggest
|
||||
// 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.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the SuggestRequest method.
|
||||
// req, resp := client.SuggestRequest(params)
|
||||
@@ -205,19 +202,18 @@ const opUploadDocuments = "UploadDocuments"
|
||||
|
||||
// UploadDocumentsRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the UploadDocuments operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See UploadDocuments for usage and error information.
|
||||
// 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.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the UploadDocuments method directly
|
||||
// instead.
|
||||
// See UploadDocuments for more information on using the UploadDocuments
|
||||
// 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.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the UploadDocumentsRequest method.
|
||||
// req, resp := client.UploadDocumentsRequest(params)
|
||||
@@ -856,7 +852,6 @@ type SearchInput struct {
|
||||
// * dismax: search using the simplified subset of the Apache Lucene query
|
||||
// parser syntax defined by the DisMax query parser. For more information,
|
||||
// see DisMax Query Parser Syntax (http://wiki.apache.org/solr/DisMaxQParserPlugin#Query_Syntax).
|
||||
//
|
||||
QueryParser *string `location:"querystring" locationName:"q.parser" type:"string" enum:"QueryParser"`
|
||||
|
||||
// Specifies the field and expression values to include in the response. Multiple
|
||||
|
||||
Generated
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// 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.
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
//
|
||||
// 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 the SDK's request pipeline.
|
||||
// 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.
|
||||
|
||||
+35
@@ -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 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
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearchdomain
|
||||
|
||||
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cloudsearchdomain_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/cloudsearchdomain"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudSearchDomain_Search() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearchdomain.New(sess)
|
||||
|
||||
params := &cloudsearchdomain.SearchInput{
|
||||
Query: aws.String("Query"), // Required
|
||||
Cursor: aws.String("Cursor"),
|
||||
Expr: aws.String("Expr"),
|
||||
Facet: aws.String("Facet"),
|
||||
FilterQuery: aws.String("FilterQuery"),
|
||||
Highlight: aws.String("Highlight"),
|
||||
Partial: aws.Bool(true),
|
||||
QueryOptions: aws.String("QueryOptions"),
|
||||
QueryParser: aws.String("QueryParser"),
|
||||
Return: aws.String("Return"),
|
||||
Size: aws.Int64(1),
|
||||
Sort: aws.String("Sort"),
|
||||
Start: aws.Int64(1),
|
||||
Stats: aws.String("Stat"),
|
||||
}
|
||||
resp, err := svc.Search(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCloudSearchDomain_Suggest() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearchdomain.New(sess)
|
||||
|
||||
params := &cloudsearchdomain.SuggestInput{
|
||||
Query: aws.String("Query"), // Required
|
||||
Suggester: aws.String("Suggester"), // Required
|
||||
Size: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.Suggest(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCloudSearchDomain_UploadDocuments() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearchdomain.New(sess)
|
||||
|
||||
params := &cloudsearchdomain.UploadDocumentsInput{
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
Documents: bytes.NewReader([]byte("PAYLOAD")), // Required
|
||||
}
|
||||
resp, err := svc.UploadDocuments(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
+6
-12
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearchdomain
|
||||
|
||||
@@ -11,18 +11,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restjson"
|
||||
)
|
||||
|
||||
// You use the AmazonCloudSearch2013 API to upload documents to a search domain
|
||||
// and search those documents.
|
||||
// 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.
|
||||
//
|
||||
// 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).
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user