mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Conver to regular Go vendor + dep tool
This commit is contained in:
+6431
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+160
@@ -0,0 +1,160 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
// Package cloudsearchiface provides an interface to enable mocking the Amazon CloudSearch 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 cloudsearchiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/cloudsearch"
|
||||
)
|
||||
|
||||
// CloudSearchAPI provides an interface to enable mocking the
|
||||
// cloudsearch.CloudSearch 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 the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // Amazon CloudSearch.
|
||||
// func myFunc(svc cloudsearchiface.CloudSearchAPI) bool {
|
||||
// // Make svc.BuildSuggesters request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := cloudsearch.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockCloudSearchClient struct {
|
||||
// cloudsearchiface.CloudSearchAPI
|
||||
// }
|
||||
// func (m *mockCloudSearchClient) BuildSuggesters(input *cloudsearch.BuildSuggestersInput) (*cloudsearch.BuildSuggestersOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockCloudSearchClient{}
|
||||
//
|
||||
// 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 CloudSearchAPI interface {
|
||||
BuildSuggesters(*cloudsearch.BuildSuggestersInput) (*cloudsearch.BuildSuggestersOutput, error)
|
||||
BuildSuggestersWithContext(aws.Context, *cloudsearch.BuildSuggestersInput, ...request.Option) (*cloudsearch.BuildSuggestersOutput, error)
|
||||
BuildSuggestersRequest(*cloudsearch.BuildSuggestersInput) (*request.Request, *cloudsearch.BuildSuggestersOutput)
|
||||
|
||||
CreateDomain(*cloudsearch.CreateDomainInput) (*cloudsearch.CreateDomainOutput, error)
|
||||
CreateDomainWithContext(aws.Context, *cloudsearch.CreateDomainInput, ...request.Option) (*cloudsearch.CreateDomainOutput, error)
|
||||
CreateDomainRequest(*cloudsearch.CreateDomainInput) (*request.Request, *cloudsearch.CreateDomainOutput)
|
||||
|
||||
DefineAnalysisScheme(*cloudsearch.DefineAnalysisSchemeInput) (*cloudsearch.DefineAnalysisSchemeOutput, error)
|
||||
DefineAnalysisSchemeWithContext(aws.Context, *cloudsearch.DefineAnalysisSchemeInput, ...request.Option) (*cloudsearch.DefineAnalysisSchemeOutput, error)
|
||||
DefineAnalysisSchemeRequest(*cloudsearch.DefineAnalysisSchemeInput) (*request.Request, *cloudsearch.DefineAnalysisSchemeOutput)
|
||||
|
||||
DefineExpression(*cloudsearch.DefineExpressionInput) (*cloudsearch.DefineExpressionOutput, error)
|
||||
DefineExpressionWithContext(aws.Context, *cloudsearch.DefineExpressionInput, ...request.Option) (*cloudsearch.DefineExpressionOutput, error)
|
||||
DefineExpressionRequest(*cloudsearch.DefineExpressionInput) (*request.Request, *cloudsearch.DefineExpressionOutput)
|
||||
|
||||
DefineIndexField(*cloudsearch.DefineIndexFieldInput) (*cloudsearch.DefineIndexFieldOutput, error)
|
||||
DefineIndexFieldWithContext(aws.Context, *cloudsearch.DefineIndexFieldInput, ...request.Option) (*cloudsearch.DefineIndexFieldOutput, error)
|
||||
DefineIndexFieldRequest(*cloudsearch.DefineIndexFieldInput) (*request.Request, *cloudsearch.DefineIndexFieldOutput)
|
||||
|
||||
DefineSuggester(*cloudsearch.DefineSuggesterInput) (*cloudsearch.DefineSuggesterOutput, error)
|
||||
DefineSuggesterWithContext(aws.Context, *cloudsearch.DefineSuggesterInput, ...request.Option) (*cloudsearch.DefineSuggesterOutput, error)
|
||||
DefineSuggesterRequest(*cloudsearch.DefineSuggesterInput) (*request.Request, *cloudsearch.DefineSuggesterOutput)
|
||||
|
||||
DeleteAnalysisScheme(*cloudsearch.DeleteAnalysisSchemeInput) (*cloudsearch.DeleteAnalysisSchemeOutput, error)
|
||||
DeleteAnalysisSchemeWithContext(aws.Context, *cloudsearch.DeleteAnalysisSchemeInput, ...request.Option) (*cloudsearch.DeleteAnalysisSchemeOutput, error)
|
||||
DeleteAnalysisSchemeRequest(*cloudsearch.DeleteAnalysisSchemeInput) (*request.Request, *cloudsearch.DeleteAnalysisSchemeOutput)
|
||||
|
||||
DeleteDomain(*cloudsearch.DeleteDomainInput) (*cloudsearch.DeleteDomainOutput, error)
|
||||
DeleteDomainWithContext(aws.Context, *cloudsearch.DeleteDomainInput, ...request.Option) (*cloudsearch.DeleteDomainOutput, error)
|
||||
DeleteDomainRequest(*cloudsearch.DeleteDomainInput) (*request.Request, *cloudsearch.DeleteDomainOutput)
|
||||
|
||||
DeleteExpression(*cloudsearch.DeleteExpressionInput) (*cloudsearch.DeleteExpressionOutput, error)
|
||||
DeleteExpressionWithContext(aws.Context, *cloudsearch.DeleteExpressionInput, ...request.Option) (*cloudsearch.DeleteExpressionOutput, error)
|
||||
DeleteExpressionRequest(*cloudsearch.DeleteExpressionInput) (*request.Request, *cloudsearch.DeleteExpressionOutput)
|
||||
|
||||
DeleteIndexField(*cloudsearch.DeleteIndexFieldInput) (*cloudsearch.DeleteIndexFieldOutput, error)
|
||||
DeleteIndexFieldWithContext(aws.Context, *cloudsearch.DeleteIndexFieldInput, ...request.Option) (*cloudsearch.DeleteIndexFieldOutput, error)
|
||||
DeleteIndexFieldRequest(*cloudsearch.DeleteIndexFieldInput) (*request.Request, *cloudsearch.DeleteIndexFieldOutput)
|
||||
|
||||
DeleteSuggester(*cloudsearch.DeleteSuggesterInput) (*cloudsearch.DeleteSuggesterOutput, error)
|
||||
DeleteSuggesterWithContext(aws.Context, *cloudsearch.DeleteSuggesterInput, ...request.Option) (*cloudsearch.DeleteSuggesterOutput, error)
|
||||
DeleteSuggesterRequest(*cloudsearch.DeleteSuggesterInput) (*request.Request, *cloudsearch.DeleteSuggesterOutput)
|
||||
|
||||
DescribeAnalysisSchemes(*cloudsearch.DescribeAnalysisSchemesInput) (*cloudsearch.DescribeAnalysisSchemesOutput, error)
|
||||
DescribeAnalysisSchemesWithContext(aws.Context, *cloudsearch.DescribeAnalysisSchemesInput, ...request.Option) (*cloudsearch.DescribeAnalysisSchemesOutput, error)
|
||||
DescribeAnalysisSchemesRequest(*cloudsearch.DescribeAnalysisSchemesInput) (*request.Request, *cloudsearch.DescribeAnalysisSchemesOutput)
|
||||
|
||||
DescribeAvailabilityOptions(*cloudsearch.DescribeAvailabilityOptionsInput) (*cloudsearch.DescribeAvailabilityOptionsOutput, error)
|
||||
DescribeAvailabilityOptionsWithContext(aws.Context, *cloudsearch.DescribeAvailabilityOptionsInput, ...request.Option) (*cloudsearch.DescribeAvailabilityOptionsOutput, error)
|
||||
DescribeAvailabilityOptionsRequest(*cloudsearch.DescribeAvailabilityOptionsInput) (*request.Request, *cloudsearch.DescribeAvailabilityOptionsOutput)
|
||||
|
||||
DescribeDomains(*cloudsearch.DescribeDomainsInput) (*cloudsearch.DescribeDomainsOutput, error)
|
||||
DescribeDomainsWithContext(aws.Context, *cloudsearch.DescribeDomainsInput, ...request.Option) (*cloudsearch.DescribeDomainsOutput, error)
|
||||
DescribeDomainsRequest(*cloudsearch.DescribeDomainsInput) (*request.Request, *cloudsearch.DescribeDomainsOutput)
|
||||
|
||||
DescribeExpressions(*cloudsearch.DescribeExpressionsInput) (*cloudsearch.DescribeExpressionsOutput, error)
|
||||
DescribeExpressionsWithContext(aws.Context, *cloudsearch.DescribeExpressionsInput, ...request.Option) (*cloudsearch.DescribeExpressionsOutput, error)
|
||||
DescribeExpressionsRequest(*cloudsearch.DescribeExpressionsInput) (*request.Request, *cloudsearch.DescribeExpressionsOutput)
|
||||
|
||||
DescribeIndexFields(*cloudsearch.DescribeIndexFieldsInput) (*cloudsearch.DescribeIndexFieldsOutput, error)
|
||||
DescribeIndexFieldsWithContext(aws.Context, *cloudsearch.DescribeIndexFieldsInput, ...request.Option) (*cloudsearch.DescribeIndexFieldsOutput, error)
|
||||
DescribeIndexFieldsRequest(*cloudsearch.DescribeIndexFieldsInput) (*request.Request, *cloudsearch.DescribeIndexFieldsOutput)
|
||||
|
||||
DescribeScalingParameters(*cloudsearch.DescribeScalingParametersInput) (*cloudsearch.DescribeScalingParametersOutput, error)
|
||||
DescribeScalingParametersWithContext(aws.Context, *cloudsearch.DescribeScalingParametersInput, ...request.Option) (*cloudsearch.DescribeScalingParametersOutput, error)
|
||||
DescribeScalingParametersRequest(*cloudsearch.DescribeScalingParametersInput) (*request.Request, *cloudsearch.DescribeScalingParametersOutput)
|
||||
|
||||
DescribeServiceAccessPolicies(*cloudsearch.DescribeServiceAccessPoliciesInput) (*cloudsearch.DescribeServiceAccessPoliciesOutput, error)
|
||||
DescribeServiceAccessPoliciesWithContext(aws.Context, *cloudsearch.DescribeServiceAccessPoliciesInput, ...request.Option) (*cloudsearch.DescribeServiceAccessPoliciesOutput, error)
|
||||
DescribeServiceAccessPoliciesRequest(*cloudsearch.DescribeServiceAccessPoliciesInput) (*request.Request, *cloudsearch.DescribeServiceAccessPoliciesOutput)
|
||||
|
||||
DescribeSuggesters(*cloudsearch.DescribeSuggestersInput) (*cloudsearch.DescribeSuggestersOutput, error)
|
||||
DescribeSuggestersWithContext(aws.Context, *cloudsearch.DescribeSuggestersInput, ...request.Option) (*cloudsearch.DescribeSuggestersOutput, error)
|
||||
DescribeSuggestersRequest(*cloudsearch.DescribeSuggestersInput) (*request.Request, *cloudsearch.DescribeSuggestersOutput)
|
||||
|
||||
IndexDocuments(*cloudsearch.IndexDocumentsInput) (*cloudsearch.IndexDocumentsOutput, error)
|
||||
IndexDocumentsWithContext(aws.Context, *cloudsearch.IndexDocumentsInput, ...request.Option) (*cloudsearch.IndexDocumentsOutput, error)
|
||||
IndexDocumentsRequest(*cloudsearch.IndexDocumentsInput) (*request.Request, *cloudsearch.IndexDocumentsOutput)
|
||||
|
||||
ListDomainNames(*cloudsearch.ListDomainNamesInput) (*cloudsearch.ListDomainNamesOutput, error)
|
||||
ListDomainNamesWithContext(aws.Context, *cloudsearch.ListDomainNamesInput, ...request.Option) (*cloudsearch.ListDomainNamesOutput, error)
|
||||
ListDomainNamesRequest(*cloudsearch.ListDomainNamesInput) (*request.Request, *cloudsearch.ListDomainNamesOutput)
|
||||
|
||||
UpdateAvailabilityOptions(*cloudsearch.UpdateAvailabilityOptionsInput) (*cloudsearch.UpdateAvailabilityOptionsOutput, error)
|
||||
UpdateAvailabilityOptionsWithContext(aws.Context, *cloudsearch.UpdateAvailabilityOptionsInput, ...request.Option) (*cloudsearch.UpdateAvailabilityOptionsOutput, error)
|
||||
UpdateAvailabilityOptionsRequest(*cloudsearch.UpdateAvailabilityOptionsInput) (*request.Request, *cloudsearch.UpdateAvailabilityOptionsOutput)
|
||||
|
||||
UpdateScalingParameters(*cloudsearch.UpdateScalingParametersInput) (*cloudsearch.UpdateScalingParametersOutput, error)
|
||||
UpdateScalingParametersWithContext(aws.Context, *cloudsearch.UpdateScalingParametersInput, ...request.Option) (*cloudsearch.UpdateScalingParametersOutput, error)
|
||||
UpdateScalingParametersRequest(*cloudsearch.UpdateScalingParametersInput) (*request.Request, *cloudsearch.UpdateScalingParametersOutput)
|
||||
|
||||
UpdateServiceAccessPolicies(*cloudsearch.UpdateServiceAccessPoliciesInput) (*cloudsearch.UpdateServiceAccessPoliciesOutput, error)
|
||||
UpdateServiceAccessPoliciesWithContext(aws.Context, *cloudsearch.UpdateServiceAccessPoliciesInput, ...request.Option) (*cloudsearch.UpdateServiceAccessPoliciesOutput, error)
|
||||
UpdateServiceAccessPoliciesRequest(*cloudsearch.UpdateServiceAccessPoliciesInput) (*request.Request, *cloudsearch.UpdateServiceAccessPoliciesOutput)
|
||||
}
|
||||
|
||||
var _ CloudSearchAPI = (*cloudsearch.CloudSearch)(nil)
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cloudsearch
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeBaseException for service response error code
|
||||
// "BaseException".
|
||||
//
|
||||
// An error occurred while processing the request.
|
||||
ErrCodeBaseException = "BaseException"
|
||||
|
||||
// ErrCodeDisabledOperationException for service response error code
|
||||
// "DisabledAction".
|
||||
//
|
||||
// The request was rejected because it attempted an operation which is not enabled.
|
||||
ErrCodeDisabledOperationException = "DisabledAction"
|
||||
|
||||
// ErrCodeInternalException for service response error code
|
||||
// "InternalException".
|
||||
//
|
||||
// An internal error occurred while processing the request. If this problem
|
||||
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
|
||||
ErrCodeInternalException = "InternalException"
|
||||
|
||||
// ErrCodeInvalidTypeException for service response error code
|
||||
// "InvalidType".
|
||||
//
|
||||
// The request was rejected because it specified an invalid type definition.
|
||||
ErrCodeInvalidTypeException = "InvalidType"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceeded".
|
||||
//
|
||||
// The request was rejected because a resource limit has already been met.
|
||||
ErrCodeLimitExceededException = "LimitExceeded"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFound".
|
||||
//
|
||||
// The request was rejected because it attempted to reference a resource that
|
||||
// does not exist.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFound"
|
||||
)
|
||||
+664
@@ -0,0 +1,664 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cloudsearch_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/cloudsearch"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudSearch_BuildSuggesters() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.BuildSuggestersInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.BuildSuggesters(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 ExampleCloudSearch_CreateDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.CreateDomainInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.CreateDomain(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 ExampleCloudSearch_DefineAnalysisScheme() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DefineAnalysisSchemeInput{
|
||||
AnalysisScheme: &cloudsearch.AnalysisScheme{ // Required
|
||||
AnalysisSchemeLanguage: aws.String("AnalysisSchemeLanguage"), // Required
|
||||
AnalysisSchemeName: aws.String("StandardName"), // Required
|
||||
AnalysisOptions: &cloudsearch.AnalysisOptions{
|
||||
AlgorithmicStemming: aws.String("AlgorithmicStemming"),
|
||||
JapaneseTokenizationDictionary: aws.String("String"),
|
||||
StemmingDictionary: aws.String("String"),
|
||||
Stopwords: aws.String("String"),
|
||||
Synonyms: aws.String("String"),
|
||||
},
|
||||
},
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DefineAnalysisScheme(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 ExampleCloudSearch_DefineExpression() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DefineExpressionInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Expression: &cloudsearch.Expression{ // Required
|
||||
ExpressionName: aws.String("StandardName"), // Required
|
||||
ExpressionValue: aws.String("ExpressionValue"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DefineExpression(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 ExampleCloudSearch_DefineIndexField() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DefineIndexFieldInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
IndexField: &cloudsearch.IndexField{ // Required
|
||||
IndexFieldName: aws.String("DynamicFieldName"), // Required
|
||||
IndexFieldType: aws.String("IndexFieldType"), // Required
|
||||
DateArrayOptions: &cloudsearch.DateArrayOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
DateOptions: &cloudsearch.DateOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
DoubleArrayOptions: &cloudsearch.DoubleArrayOptions{
|
||||
DefaultValue: aws.Float64(1.0),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
DoubleOptions: &cloudsearch.DoubleOptions{
|
||||
DefaultValue: aws.Float64(1.0),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
IntArrayOptions: &cloudsearch.IntArrayOptions{
|
||||
DefaultValue: aws.Int64(1),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
IntOptions: &cloudsearch.IntOptions{
|
||||
DefaultValue: aws.Int64(1),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
LatLonOptions: &cloudsearch.LatLonOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
LiteralArrayOptions: &cloudsearch.LiteralArrayOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
LiteralOptions: &cloudsearch.LiteralOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
TextArrayOptions: &cloudsearch.TextArrayOptions{
|
||||
AnalysisScheme: aws.String("Word"),
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
HighlightEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
TextOptions: &cloudsearch.TextOptions{
|
||||
AnalysisScheme: aws.String("Word"),
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
HighlightEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.DefineIndexField(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 ExampleCloudSearch_DefineSuggester() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DefineSuggesterInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Suggester: &cloudsearch.Suggester{ // Required
|
||||
DocumentSuggesterOptions: &cloudsearch.DocumentSuggesterOptions{ // Required
|
||||
SourceField: aws.String("FieldName"), // Required
|
||||
FuzzyMatching: aws.String("SuggesterFuzzyMatching"),
|
||||
SortExpression: aws.String("String"),
|
||||
},
|
||||
SuggesterName: aws.String("StandardName"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DefineSuggester(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 ExampleCloudSearch_DeleteAnalysisScheme() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteAnalysisSchemeInput{
|
||||
AnalysisSchemeName: aws.String("StandardName"), // Required
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteAnalysisScheme(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 ExampleCloudSearch_DeleteDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteDomainInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteDomain(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 ExampleCloudSearch_DeleteExpression() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteExpressionInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
ExpressionName: aws.String("StandardName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteExpression(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 ExampleCloudSearch_DeleteIndexField() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteIndexFieldInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
IndexFieldName: aws.String("DynamicFieldName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteIndexField(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 ExampleCloudSearch_DeleteSuggester() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteSuggesterInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
SuggesterName: aws.String("StandardName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteSuggester(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 ExampleCloudSearch_DescribeAnalysisSchemes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeAnalysisSchemesInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
AnalysisSchemeNames: []*string{
|
||||
aws.String("StandardName"), // Required
|
||||
// More values...
|
||||
},
|
||||
Deployed: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.DescribeAnalysisSchemes(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 ExampleCloudSearch_DescribeAvailabilityOptions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeAvailabilityOptionsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.DescribeAvailabilityOptions(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 ExampleCloudSearch_DescribeDomains() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeDomainsInput{
|
||||
DomainNames: []*string{
|
||||
aws.String("DomainName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeDomains(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 ExampleCloudSearch_DescribeExpressions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeExpressionsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
ExpressionNames: []*string{
|
||||
aws.String("StandardName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeExpressions(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 ExampleCloudSearch_DescribeIndexFields() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeIndexFieldsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
FieldNames: []*string{
|
||||
aws.String("DynamicFieldName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeIndexFields(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 ExampleCloudSearch_DescribeScalingParameters() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeScalingParametersInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeScalingParameters(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 ExampleCloudSearch_DescribeServiceAccessPolicies() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeServiceAccessPoliciesInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.DescribeServiceAccessPolicies(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 ExampleCloudSearch_DescribeSuggesters() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeSuggestersInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
SuggesterNames: []*string{
|
||||
aws.String("StandardName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeSuggesters(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 ExampleCloudSearch_IndexDocuments() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.IndexDocumentsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.IndexDocuments(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 ExampleCloudSearch_ListDomainNames() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
var params *cloudsearch.ListDomainNamesInput
|
||||
resp, err := svc.ListDomainNames(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 ExampleCloudSearch_UpdateAvailabilityOptions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.UpdateAvailabilityOptionsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
MultiAZ: aws.Bool(true), // Required
|
||||
}
|
||||
resp, err := svc.UpdateAvailabilityOptions(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 ExampleCloudSearch_UpdateScalingParameters() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.UpdateScalingParametersInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
ScalingParameters: &cloudsearch.ScalingParameters{ // Required
|
||||
DesiredInstanceType: aws.String("PartitionInstanceType"),
|
||||
DesiredPartitionCount: aws.Int64(1),
|
||||
DesiredReplicationCount: aws.Int64(1),
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateScalingParameters(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 ExampleCloudSearch_UpdateServiceAccessPolicies() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.UpdateServiceAccessPoliciesInput{
|
||||
AccessPolicies: aws.String("PolicyDocument"), // Required
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.UpdateServiceAccessPolicies(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)
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cloudsearch
|
||||
|
||||
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/query"
|
||||
)
|
||||
|
||||
// You use the Amazon CloudSearch configuration service to create, configure,
|
||||
// and manage search domains. Configuration service requests are submitted using
|
||||
// the AWS Query protocol. AWS Query requests are HTTP or HTTPS requests submitted
|
||||
// via HTTP GET or POST with a query parameter named Action.
|
||||
//
|
||||
// The endpoint for configuration service requests is region-specific: cloudsearch.region.amazonaws.com.
|
||||
// For example, cloudsearch.us-east-1.amazonaws.com. For a current list of supported
|
||||
// regions and endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#cloudsearch_region).
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
type CloudSearch 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 = "cloudsearch" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CloudSearch 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 CloudSearch client from just a session.
|
||||
// svc := cloudsearch.New(mySession)
|
||||
//
|
||||
// // Create a CloudSearch client with additional configuration
|
||||
// svc := cloudsearch.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudSearch {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
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) *CloudSearch {
|
||||
svc := &CloudSearch{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2013-01-01",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(query.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a CloudSearch operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudSearch) 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