mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
Update Go AWS SDK to the latest version
This commit is contained in:
committed by
Andrey Smirnov
parent
d08be990ef
commit
94a72b23ff
+184
@@ -0,0 +1,184 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package amplifyiface provides an interface to enable mocking the AWS Amplify 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 amplifyiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/amplify"
|
||||
)
|
||||
|
||||
// AmplifyAPI provides an interface to enable mocking the
|
||||
// amplify.Amplify 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
|
||||
// // AWS Amplify.
|
||||
// func myFunc(svc amplifyiface.AmplifyAPI) bool {
|
||||
// // Make svc.CreateApp request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := amplify.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockAmplifyClient struct {
|
||||
// amplifyiface.AmplifyAPI
|
||||
// }
|
||||
// func (m *mockAmplifyClient) CreateApp(input *amplify.CreateAppInput) (*amplify.CreateAppOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockAmplifyClient{}
|
||||
//
|
||||
// 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 AmplifyAPI interface {
|
||||
CreateApp(*amplify.CreateAppInput) (*amplify.CreateAppOutput, error)
|
||||
CreateAppWithContext(aws.Context, *amplify.CreateAppInput, ...request.Option) (*amplify.CreateAppOutput, error)
|
||||
CreateAppRequest(*amplify.CreateAppInput) (*request.Request, *amplify.CreateAppOutput)
|
||||
|
||||
CreateBranch(*amplify.CreateBranchInput) (*amplify.CreateBranchOutput, error)
|
||||
CreateBranchWithContext(aws.Context, *amplify.CreateBranchInput, ...request.Option) (*amplify.CreateBranchOutput, error)
|
||||
CreateBranchRequest(*amplify.CreateBranchInput) (*request.Request, *amplify.CreateBranchOutput)
|
||||
|
||||
CreateDeployment(*amplify.CreateDeploymentInput) (*amplify.CreateDeploymentOutput, error)
|
||||
CreateDeploymentWithContext(aws.Context, *amplify.CreateDeploymentInput, ...request.Option) (*amplify.CreateDeploymentOutput, error)
|
||||
CreateDeploymentRequest(*amplify.CreateDeploymentInput) (*request.Request, *amplify.CreateDeploymentOutput)
|
||||
|
||||
CreateDomainAssociation(*amplify.CreateDomainAssociationInput) (*amplify.CreateDomainAssociationOutput, error)
|
||||
CreateDomainAssociationWithContext(aws.Context, *amplify.CreateDomainAssociationInput, ...request.Option) (*amplify.CreateDomainAssociationOutput, error)
|
||||
CreateDomainAssociationRequest(*amplify.CreateDomainAssociationInput) (*request.Request, *amplify.CreateDomainAssociationOutput)
|
||||
|
||||
CreateWebhook(*amplify.CreateWebhookInput) (*amplify.CreateWebhookOutput, error)
|
||||
CreateWebhookWithContext(aws.Context, *amplify.CreateWebhookInput, ...request.Option) (*amplify.CreateWebhookOutput, error)
|
||||
CreateWebhookRequest(*amplify.CreateWebhookInput) (*request.Request, *amplify.CreateWebhookOutput)
|
||||
|
||||
DeleteApp(*amplify.DeleteAppInput) (*amplify.DeleteAppOutput, error)
|
||||
DeleteAppWithContext(aws.Context, *amplify.DeleteAppInput, ...request.Option) (*amplify.DeleteAppOutput, error)
|
||||
DeleteAppRequest(*amplify.DeleteAppInput) (*request.Request, *amplify.DeleteAppOutput)
|
||||
|
||||
DeleteBranch(*amplify.DeleteBranchInput) (*amplify.DeleteBranchOutput, error)
|
||||
DeleteBranchWithContext(aws.Context, *amplify.DeleteBranchInput, ...request.Option) (*amplify.DeleteBranchOutput, error)
|
||||
DeleteBranchRequest(*amplify.DeleteBranchInput) (*request.Request, *amplify.DeleteBranchOutput)
|
||||
|
||||
DeleteDomainAssociation(*amplify.DeleteDomainAssociationInput) (*amplify.DeleteDomainAssociationOutput, error)
|
||||
DeleteDomainAssociationWithContext(aws.Context, *amplify.DeleteDomainAssociationInput, ...request.Option) (*amplify.DeleteDomainAssociationOutput, error)
|
||||
DeleteDomainAssociationRequest(*amplify.DeleteDomainAssociationInput) (*request.Request, *amplify.DeleteDomainAssociationOutput)
|
||||
|
||||
DeleteJob(*amplify.DeleteJobInput) (*amplify.DeleteJobOutput, error)
|
||||
DeleteJobWithContext(aws.Context, *amplify.DeleteJobInput, ...request.Option) (*amplify.DeleteJobOutput, error)
|
||||
DeleteJobRequest(*amplify.DeleteJobInput) (*request.Request, *amplify.DeleteJobOutput)
|
||||
|
||||
DeleteWebhook(*amplify.DeleteWebhookInput) (*amplify.DeleteWebhookOutput, error)
|
||||
DeleteWebhookWithContext(aws.Context, *amplify.DeleteWebhookInput, ...request.Option) (*amplify.DeleteWebhookOutput, error)
|
||||
DeleteWebhookRequest(*amplify.DeleteWebhookInput) (*request.Request, *amplify.DeleteWebhookOutput)
|
||||
|
||||
GetApp(*amplify.GetAppInput) (*amplify.GetAppOutput, error)
|
||||
GetAppWithContext(aws.Context, *amplify.GetAppInput, ...request.Option) (*amplify.GetAppOutput, error)
|
||||
GetAppRequest(*amplify.GetAppInput) (*request.Request, *amplify.GetAppOutput)
|
||||
|
||||
GetBranch(*amplify.GetBranchInput) (*amplify.GetBranchOutput, error)
|
||||
GetBranchWithContext(aws.Context, *amplify.GetBranchInput, ...request.Option) (*amplify.GetBranchOutput, error)
|
||||
GetBranchRequest(*amplify.GetBranchInput) (*request.Request, *amplify.GetBranchOutput)
|
||||
|
||||
GetDomainAssociation(*amplify.GetDomainAssociationInput) (*amplify.GetDomainAssociationOutput, error)
|
||||
GetDomainAssociationWithContext(aws.Context, *amplify.GetDomainAssociationInput, ...request.Option) (*amplify.GetDomainAssociationOutput, error)
|
||||
GetDomainAssociationRequest(*amplify.GetDomainAssociationInput) (*request.Request, *amplify.GetDomainAssociationOutput)
|
||||
|
||||
GetJob(*amplify.GetJobInput) (*amplify.GetJobOutput, error)
|
||||
GetJobWithContext(aws.Context, *amplify.GetJobInput, ...request.Option) (*amplify.GetJobOutput, error)
|
||||
GetJobRequest(*amplify.GetJobInput) (*request.Request, *amplify.GetJobOutput)
|
||||
|
||||
GetWebhook(*amplify.GetWebhookInput) (*amplify.GetWebhookOutput, error)
|
||||
GetWebhookWithContext(aws.Context, *amplify.GetWebhookInput, ...request.Option) (*amplify.GetWebhookOutput, error)
|
||||
GetWebhookRequest(*amplify.GetWebhookInput) (*request.Request, *amplify.GetWebhookOutput)
|
||||
|
||||
ListApps(*amplify.ListAppsInput) (*amplify.ListAppsOutput, error)
|
||||
ListAppsWithContext(aws.Context, *amplify.ListAppsInput, ...request.Option) (*amplify.ListAppsOutput, error)
|
||||
ListAppsRequest(*amplify.ListAppsInput) (*request.Request, *amplify.ListAppsOutput)
|
||||
|
||||
ListBranches(*amplify.ListBranchesInput) (*amplify.ListBranchesOutput, error)
|
||||
ListBranchesWithContext(aws.Context, *amplify.ListBranchesInput, ...request.Option) (*amplify.ListBranchesOutput, error)
|
||||
ListBranchesRequest(*amplify.ListBranchesInput) (*request.Request, *amplify.ListBranchesOutput)
|
||||
|
||||
ListDomainAssociations(*amplify.ListDomainAssociationsInput) (*amplify.ListDomainAssociationsOutput, error)
|
||||
ListDomainAssociationsWithContext(aws.Context, *amplify.ListDomainAssociationsInput, ...request.Option) (*amplify.ListDomainAssociationsOutput, error)
|
||||
ListDomainAssociationsRequest(*amplify.ListDomainAssociationsInput) (*request.Request, *amplify.ListDomainAssociationsOutput)
|
||||
|
||||
ListJobs(*amplify.ListJobsInput) (*amplify.ListJobsOutput, error)
|
||||
ListJobsWithContext(aws.Context, *amplify.ListJobsInput, ...request.Option) (*amplify.ListJobsOutput, error)
|
||||
ListJobsRequest(*amplify.ListJobsInput) (*request.Request, *amplify.ListJobsOutput)
|
||||
|
||||
ListTagsForResource(*amplify.ListTagsForResourceInput) (*amplify.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceWithContext(aws.Context, *amplify.ListTagsForResourceInput, ...request.Option) (*amplify.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceRequest(*amplify.ListTagsForResourceInput) (*request.Request, *amplify.ListTagsForResourceOutput)
|
||||
|
||||
ListWebhooks(*amplify.ListWebhooksInput) (*amplify.ListWebhooksOutput, error)
|
||||
ListWebhooksWithContext(aws.Context, *amplify.ListWebhooksInput, ...request.Option) (*amplify.ListWebhooksOutput, error)
|
||||
ListWebhooksRequest(*amplify.ListWebhooksInput) (*request.Request, *amplify.ListWebhooksOutput)
|
||||
|
||||
StartDeployment(*amplify.StartDeploymentInput) (*amplify.StartDeploymentOutput, error)
|
||||
StartDeploymentWithContext(aws.Context, *amplify.StartDeploymentInput, ...request.Option) (*amplify.StartDeploymentOutput, error)
|
||||
StartDeploymentRequest(*amplify.StartDeploymentInput) (*request.Request, *amplify.StartDeploymentOutput)
|
||||
|
||||
StartJob(*amplify.StartJobInput) (*amplify.StartJobOutput, error)
|
||||
StartJobWithContext(aws.Context, *amplify.StartJobInput, ...request.Option) (*amplify.StartJobOutput, error)
|
||||
StartJobRequest(*amplify.StartJobInput) (*request.Request, *amplify.StartJobOutput)
|
||||
|
||||
StopJob(*amplify.StopJobInput) (*amplify.StopJobOutput, error)
|
||||
StopJobWithContext(aws.Context, *amplify.StopJobInput, ...request.Option) (*amplify.StopJobOutput, error)
|
||||
StopJobRequest(*amplify.StopJobInput) (*request.Request, *amplify.StopJobOutput)
|
||||
|
||||
TagResource(*amplify.TagResourceInput) (*amplify.TagResourceOutput, error)
|
||||
TagResourceWithContext(aws.Context, *amplify.TagResourceInput, ...request.Option) (*amplify.TagResourceOutput, error)
|
||||
TagResourceRequest(*amplify.TagResourceInput) (*request.Request, *amplify.TagResourceOutput)
|
||||
|
||||
UntagResource(*amplify.UntagResourceInput) (*amplify.UntagResourceOutput, error)
|
||||
UntagResourceWithContext(aws.Context, *amplify.UntagResourceInput, ...request.Option) (*amplify.UntagResourceOutput, error)
|
||||
UntagResourceRequest(*amplify.UntagResourceInput) (*request.Request, *amplify.UntagResourceOutput)
|
||||
|
||||
UpdateApp(*amplify.UpdateAppInput) (*amplify.UpdateAppOutput, error)
|
||||
UpdateAppWithContext(aws.Context, *amplify.UpdateAppInput, ...request.Option) (*amplify.UpdateAppOutput, error)
|
||||
UpdateAppRequest(*amplify.UpdateAppInput) (*request.Request, *amplify.UpdateAppOutput)
|
||||
|
||||
UpdateBranch(*amplify.UpdateBranchInput) (*amplify.UpdateBranchOutput, error)
|
||||
UpdateBranchWithContext(aws.Context, *amplify.UpdateBranchInput, ...request.Option) (*amplify.UpdateBranchOutput, error)
|
||||
UpdateBranchRequest(*amplify.UpdateBranchInput) (*request.Request, *amplify.UpdateBranchOutput)
|
||||
|
||||
UpdateDomainAssociation(*amplify.UpdateDomainAssociationInput) (*amplify.UpdateDomainAssociationOutput, error)
|
||||
UpdateDomainAssociationWithContext(aws.Context, *amplify.UpdateDomainAssociationInput, ...request.Option) (*amplify.UpdateDomainAssociationOutput, error)
|
||||
UpdateDomainAssociationRequest(*amplify.UpdateDomainAssociationInput) (*request.Request, *amplify.UpdateDomainAssociationOutput)
|
||||
|
||||
UpdateWebhook(*amplify.UpdateWebhookInput) (*amplify.UpdateWebhookOutput, error)
|
||||
UpdateWebhookWithContext(aws.Context, *amplify.UpdateWebhookInput, ...request.Option) (*amplify.UpdateWebhookOutput, error)
|
||||
UpdateWebhookRequest(*amplify.UpdateWebhookInput) (*request.Request, *amplify.UpdateWebhookOutput)
|
||||
}
|
||||
|
||||
var _ AmplifyAPI = (*amplify.Amplify)(nil)
|
||||
+7325
File diff suppressed because it is too large
Load Diff
+29
@@ -0,0 +1,29 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package amplify provides the client and types for making API
|
||||
// requests to AWS Amplify.
|
||||
//
|
||||
// Amplify is a fully managed continuous deployment and hosting service for
|
||||
// modern web apps.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25 for more information on this service.
|
||||
//
|
||||
// See amplify package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/amplify/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact AWS Amplify 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 AWS Amplify client Amplify for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/amplify/#New
|
||||
package amplify
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package amplify
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeBadRequestException for service response error code
|
||||
// "BadRequestException".
|
||||
//
|
||||
// Exception thrown when a request contains unexpected data.
|
||||
ErrCodeBadRequestException = "BadRequestException"
|
||||
|
||||
// ErrCodeDependentServiceFailureException for service response error code
|
||||
// "DependentServiceFailureException".
|
||||
//
|
||||
// Exception thrown when an operation fails due to a dependent service throwing
|
||||
// an exception.
|
||||
ErrCodeDependentServiceFailureException = "DependentServiceFailureException"
|
||||
|
||||
// ErrCodeInternalFailureException for service response error code
|
||||
// "InternalFailureException".
|
||||
//
|
||||
// Exception thrown when the service fails to perform an operation due to an
|
||||
// internal issue.
|
||||
ErrCodeInternalFailureException = "InternalFailureException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// Exception thrown when a resource could not be created because of service
|
||||
// limits.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeNotFoundException for service response error code
|
||||
// "NotFoundException".
|
||||
//
|
||||
// Exception thrown when an entity has not been found during an operation.
|
||||
ErrCodeNotFoundException = "NotFoundException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// Exception thrown when an operation fails due to non-existent resource.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
|
||||
// ErrCodeUnauthorizedException for service response error code
|
||||
// "UnauthorizedException".
|
||||
//
|
||||
// Exception thrown when an operation fails due to a lack of access.
|
||||
ErrCodeUnauthorizedException = "UnauthorizedException"
|
||||
)
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package amplify
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// Amplify provides the API operation methods for making requests to
|
||||
// AWS Amplify. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// Amplify methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type Amplify 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 = "Amplify" // Name of service.
|
||||
EndpointsID = "amplify" // ID to lookup a service endpoint with.
|
||||
ServiceID = "Amplify" // ServiceID is a unique identifer of a specific service.
|
||||
)
|
||||
|
||||
// New creates a new instance of the Amplify 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 Amplify client from just a session.
|
||||
// svc := amplify.New(mySession)
|
||||
//
|
||||
// // Create a Amplify client with additional configuration
|
||||
// svc := amplify.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Amplify {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "amplify"
|
||||
}
|
||||
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) *Amplify {
|
||||
svc := &Amplify{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2017-07-25",
|
||||
},
|
||||
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 Amplify operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *Amplify) 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