Upgrade AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2017-09-28 17:57:05 +03:00
parent 9a767b7631
commit 182c21e38c
1096 changed files with 309697 additions and 132612 deletions
+172 -178
View File
@@ -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 codecommit provides a client for AWS CodeCommit.
package codecommit
import (
@@ -18,19 +17,18 @@ const opBatchGetRepositories = "BatchGetRepositories"
// BatchGetRepositoriesRequest generates a "aws/request.Request" representing the
// client's request for the BatchGetRepositories 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 BatchGetRepositories 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 BatchGetRepositories method directly
// instead.
// See BatchGetRepositories for more information on using the BatchGetRepositories
// 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 BatchGetRepositoriesRequest method.
// req, resp := client.BatchGetRepositoriesRequest(params)
@@ -130,19 +128,18 @@ const opCreateBranch = "CreateBranch"
// CreateBranchRequest generates a "aws/request.Request" representing the
// client's request for the CreateBranch 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 CreateBranch 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 CreateBranch method directly
// instead.
// See CreateBranch for more information on using the CreateBranch
// 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 CreateBranchRequest method.
// req, resp := client.CreateBranchRequest(params)
@@ -259,19 +256,18 @@ const opCreateRepository = "CreateRepository"
// CreateRepositoryRequest generates a "aws/request.Request" representing the
// client's request for the CreateRepository 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 CreateRepository 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 CreateRepository method directly
// instead.
// See CreateRepository for more information on using the CreateRepository
// 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 CreateRepositoryRequest method.
// req, resp := client.CreateRepositoryRequest(params)
@@ -370,19 +366,18 @@ const opDeleteRepository = "DeleteRepository"
// DeleteRepositoryRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRepository 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 DeleteRepository 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 DeleteRepository method directly
// instead.
// See DeleteRepository for more information on using the DeleteRepository
// 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 DeleteRepositoryRequest method.
// req, resp := client.DeleteRepositoryRequest(params)
@@ -477,19 +472,18 @@ const opGetBlob = "GetBlob"
// GetBlobRequest generates a "aws/request.Request" representing the
// client's request for the GetBlob 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 GetBlob 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 GetBlob method directly
// instead.
// See GetBlob for more information on using the GetBlob
// 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 GetBlobRequest method.
// req, resp := client.GetBlobRequest(params)
@@ -596,19 +590,18 @@ const opGetBranch = "GetBranch"
// GetBranchRequest generates a "aws/request.Request" representing the
// client's request for the GetBranch 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 GetBranch 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 GetBranch method directly
// instead.
// See GetBranch for more information on using the GetBranch
// 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 GetBranchRequest method.
// req, resp := client.GetBranchRequest(params)
@@ -711,19 +704,18 @@ const opGetCommit = "GetCommit"
// GetCommitRequest generates a "aws/request.Request" representing the
// client's request for the GetCommit 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 GetCommit 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 GetCommit method directly
// instead.
// See GetCommit for more information on using the GetCommit
// 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 GetCommitRequest method.
// req, resp := client.GetCommitRequest(params)
@@ -826,19 +818,18 @@ const opGetDifferences = "GetDifferences"
// GetDifferencesRequest generates a "aws/request.Request" representing the
// client's request for the GetDifferences 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 GetDifferences 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 GetDifferences method directly
// instead.
// See GetDifferences for more information on using the GetDifferences
// 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 GetDifferencesRequest method.
// req, resp := client.GetDifferencesRequest(params)
@@ -991,8 +982,12 @@ func (c *CodeCommit) GetDifferencesPages(input *GetDifferencesInput, fn func(*Ge
func (c *CodeCommit) GetDifferencesPagesWithContext(ctx aws.Context, input *GetDifferencesInput, fn func(*GetDifferencesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.GetDifferencesRequest(&inCpy)
var inCpy *GetDifferencesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetDifferencesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -1010,19 +1005,18 @@ const opGetRepository = "GetRepository"
// GetRepositoryRequest generates a "aws/request.Request" representing the
// client's request for the GetRepository 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 GetRepository 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 GetRepository method directly
// instead.
// See GetRepository for more information on using the GetRepository
// 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 GetRepositoryRequest method.
// req, resp := client.GetRepositoryRequest(params)
@@ -1121,19 +1115,18 @@ const opGetRepositoryTriggers = "GetRepositoryTriggers"
// GetRepositoryTriggersRequest generates a "aws/request.Request" representing the
// client's request for the GetRepositoryTriggers 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 GetRepositoryTriggers 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 GetRepositoryTriggers method directly
// instead.
// See GetRepositoryTriggers for more information on using the GetRepositoryTriggers
// 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 GetRepositoryTriggersRequest method.
// req, resp := client.GetRepositoryTriggersRequest(params)
@@ -1226,19 +1219,18 @@ const opListBranches = "ListBranches"
// ListBranchesRequest generates a "aws/request.Request" representing the
// client's request for the ListBranches 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 ListBranches 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 ListBranches method directly
// instead.
// See ListBranches for more information on using the ListBranches
// 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 ListBranchesRequest method.
// req, resp := client.ListBranchesRequest(params)
@@ -1367,8 +1359,12 @@ func (c *CodeCommit) ListBranchesPages(input *ListBranchesInput, fn func(*ListBr
func (c *CodeCommit) ListBranchesPagesWithContext(ctx aws.Context, input *ListBranchesInput, fn func(*ListBranchesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.ListBranchesRequest(&inCpy)
var inCpy *ListBranchesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListBranchesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -1386,19 +1382,18 @@ const opListRepositories = "ListRepositories"
// ListRepositoriesRequest generates a "aws/request.Request" representing the
// client's request for the ListRepositories 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 ListRepositories 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 ListRepositories method directly
// instead.
// See ListRepositories for more information on using the ListRepositories
// 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 ListRepositoriesRequest method.
// req, resp := client.ListRepositoriesRequest(params)
@@ -1505,8 +1500,12 @@ func (c *CodeCommit) ListRepositoriesPages(input *ListRepositoriesInput, fn func
func (c *CodeCommit) ListRepositoriesPagesWithContext(ctx aws.Context, input *ListRepositoriesInput, fn func(*ListRepositoriesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.ListRepositoriesRequest(&inCpy)
var inCpy *ListRepositoriesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListRepositoriesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -1524,19 +1523,18 @@ const opPutRepositoryTriggers = "PutRepositoryTriggers"
// PutRepositoryTriggersRequest generates a "aws/request.Request" representing the
// client's request for the PutRepositoryTriggers 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 PutRepositoryTriggers 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 PutRepositoryTriggers method directly
// instead.
// See PutRepositoryTriggers for more information on using the PutRepositoryTriggers
// 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 PutRepositoryTriggersRequest method.
// req, resp := client.PutRepositoryTriggersRequest(params)
@@ -1675,19 +1673,18 @@ const opTestRepositoryTriggers = "TestRepositoryTriggers"
// TestRepositoryTriggersRequest generates a "aws/request.Request" representing the
// client's request for the TestRepositoryTriggers 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 TestRepositoryTriggers 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 TestRepositoryTriggers method directly
// instead.
// See TestRepositoryTriggers for more information on using the TestRepositoryTriggers
// 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 TestRepositoryTriggersRequest method.
// req, resp := client.TestRepositoryTriggersRequest(params)
@@ -1828,19 +1825,18 @@ const opUpdateDefaultBranch = "UpdateDefaultBranch"
// UpdateDefaultBranchRequest generates a "aws/request.Request" representing the
// client's request for the UpdateDefaultBranch 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 UpdateDefaultBranch 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 UpdateDefaultBranch method directly
// instead.
// See UpdateDefaultBranch for more information on using the UpdateDefaultBranch
// 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 UpdateDefaultBranchRequest method.
// req, resp := client.UpdateDefaultBranchRequest(params)
@@ -1948,19 +1944,18 @@ const opUpdateRepositoryDescription = "UpdateRepositoryDescription"
// UpdateRepositoryDescriptionRequest generates a "aws/request.Request" representing the
// client's request for the UpdateRepositoryDescription 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 UpdateRepositoryDescription 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 UpdateRepositoryDescription method directly
// instead.
// See UpdateRepositoryDescription for more information on using the UpdateRepositoryDescription
// 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 UpdateRepositoryDescriptionRequest method.
// req, resp := client.UpdateRepositoryDescriptionRequest(params)
@@ -2064,19 +2059,18 @@ const opUpdateRepositoryName = "UpdateRepositoryName"
// UpdateRepositoryNameRequest generates a "aws/request.Request" representing the
// client's request for the UpdateRepositoryName 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 UpdateRepositoryName 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 UpdateRepositoryName method directly
// instead.
// See UpdateRepositoryName for more information on using the UpdateRepositoryName
// 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 UpdateRepositoryNameRequest method.
// req, resp := client.UpdateRepositoryNameRequest(params)
@@ -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 codecommitiface provides an interface to enable mocking the AWS CodeCommit 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
// // AWS CodeCommit.
+89
View File
@@ -0,0 +1,89 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package codecommit provides the client and types for making API
// requests to AWS CodeCommit.
//
// This is the AWS CodeCommit API Reference. This reference provides descriptions
// of the operations and data types for AWS CodeCommit API along with usage
// examples.
//
// You can use the AWS CodeCommit API to work with the following objects:
//
// Repositories, by calling the following:
//
// * BatchGetRepositories, which returns information about one or more repositories
// associated with your AWS account
//
// * CreateRepository, which creates an AWS CodeCommit repository
//
// * DeleteRepository, which deletes an AWS CodeCommit repository
//
// * GetRepository, which returns information about a specified repository
//
// * ListRepositories, which lists all AWS CodeCommit repositories associated
// with your AWS account
//
// * UpdateRepositoryDescription, which sets or updates the description of
// the repository
//
// * UpdateRepositoryName, which changes the name of the repository. If you
// change the name of a repository, no other users of that repository will
// be able to access it until you send them the new HTTPS or SSH URL to use.
//
// Branches, by calling the following:
//
// * CreateBranch, which creates a new branch in a specified repository
//
// * GetBranch, which returns information about a specified branch
//
// * ListBranches, which lists all branches for a specified repository
//
// * UpdateDefaultBranch, which changes the default branch for a repository
//
// Information about committed code in a repository, by calling the following:
//
// * GetBlob, which returns the base-64 encoded content of an individual
// Git blob object within a repository
//
// * GetCommit, which returns information about a commit, including commit
// messages and author and committer information
//
// * GetDifferences, which returns information about the differences in a
// valid commit specifier (such as a branch, tag, HEAD, commit ID or other
// fully qualified reference)
//
// Triggers, by calling the following:
//
// * GetRepositoryTriggers, which returns information about triggers configured
// for a repository
//
// * PutRepositoryTriggers, which replaces all triggers for a repository
// and can be used to create or delete triggers
//
// * TestRepositoryTriggers, which tests the functionality of a repository
// trigger by sending data to the trigger target
//
// For information about how to use AWS CodeCommit, see the AWS CodeCommit User
// Guide (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html).
//
// See https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13 for more information on this service.
//
// See codecommit package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/codecommit/
//
// Using the Client
//
// To AWS CodeCommit 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 CodeCommit client CodeCommit for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/codecommit/#New
package codecommit
+1 -1
View File
@@ -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 codecommit
-426
View File
@@ -1,426 +0,0 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package codecommit_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/codecommit"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleCodeCommit_BatchGetRepositories() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.BatchGetRepositoriesInput{
RepositoryNames: []*string{ // Required
aws.String("RepositoryName"), // Required
// More values...
},
}
resp, err := svc.BatchGetRepositories(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 ExampleCodeCommit_CreateBranch() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.CreateBranchInput{
BranchName: aws.String("BranchName"), // Required
CommitId: aws.String("CommitId"), // Required
RepositoryName: aws.String("RepositoryName"), // Required
}
resp, err := svc.CreateBranch(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 ExampleCodeCommit_CreateRepository() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.CreateRepositoryInput{
RepositoryName: aws.String("RepositoryName"), // Required
RepositoryDescription: aws.String("RepositoryDescription"),
}
resp, err := svc.CreateRepository(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 ExampleCodeCommit_DeleteRepository() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.DeleteRepositoryInput{
RepositoryName: aws.String("RepositoryName"), // Required
}
resp, err := svc.DeleteRepository(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 ExampleCodeCommit_GetBlob() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.GetBlobInput{
BlobId: aws.String("ObjectId"), // Required
RepositoryName: aws.String("RepositoryName"), // Required
}
resp, err := svc.GetBlob(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 ExampleCodeCommit_GetBranch() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.GetBranchInput{
BranchName: aws.String("BranchName"),
RepositoryName: aws.String("RepositoryName"),
}
resp, err := svc.GetBranch(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 ExampleCodeCommit_GetCommit() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.GetCommitInput{
CommitId: aws.String("ObjectId"), // Required
RepositoryName: aws.String("RepositoryName"), // Required
}
resp, err := svc.GetCommit(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 ExampleCodeCommit_GetDifferences() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.GetDifferencesInput{
AfterCommitSpecifier: aws.String("CommitName"), // Required
RepositoryName: aws.String("RepositoryName"), // Required
AfterPath: aws.String("Path"),
BeforeCommitSpecifier: aws.String("CommitName"),
BeforePath: aws.String("Path"),
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.GetDifferences(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 ExampleCodeCommit_GetRepository() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.GetRepositoryInput{
RepositoryName: aws.String("RepositoryName"), // Required
}
resp, err := svc.GetRepository(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 ExampleCodeCommit_GetRepositoryTriggers() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.GetRepositoryTriggersInput{
RepositoryName: aws.String("RepositoryName"), // Required
}
resp, err := svc.GetRepositoryTriggers(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 ExampleCodeCommit_ListBranches() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.ListBranchesInput{
RepositoryName: aws.String("RepositoryName"), // Required
NextToken: aws.String("NextToken"),
}
resp, err := svc.ListBranches(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 ExampleCodeCommit_ListRepositories() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.ListRepositoriesInput{
NextToken: aws.String("NextToken"),
Order: aws.String("OrderEnum"),
SortBy: aws.String("SortByEnum"),
}
resp, err := svc.ListRepositories(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 ExampleCodeCommit_PutRepositoryTriggers() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.PutRepositoryTriggersInput{
RepositoryName: aws.String("RepositoryName"), // Required
Triggers: []*codecommit.RepositoryTrigger{ // Required
{ // Required
DestinationArn: aws.String("Arn"), // Required
Events: []*string{ // Required
aws.String("RepositoryTriggerEventEnum"), // Required
// More values...
},
Name: aws.String("RepositoryTriggerName"), // Required
Branches: []*string{
aws.String("BranchName"), // Required
// More values...
},
CustomData: aws.String("RepositoryTriggerCustomData"),
},
// More values...
},
}
resp, err := svc.PutRepositoryTriggers(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 ExampleCodeCommit_TestRepositoryTriggers() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.TestRepositoryTriggersInput{
RepositoryName: aws.String("RepositoryName"), // Required
Triggers: []*codecommit.RepositoryTrigger{ // Required
{ // Required
DestinationArn: aws.String("Arn"), // Required
Events: []*string{ // Required
aws.String("RepositoryTriggerEventEnum"), // Required
// More values...
},
Name: aws.String("RepositoryTriggerName"), // Required
Branches: []*string{
aws.String("BranchName"), // Required
// More values...
},
CustomData: aws.String("RepositoryTriggerCustomData"),
},
// More values...
},
}
resp, err := svc.TestRepositoryTriggers(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 ExampleCodeCommit_UpdateDefaultBranch() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.UpdateDefaultBranchInput{
DefaultBranchName: aws.String("BranchName"), // Required
RepositoryName: aws.String("RepositoryName"), // Required
}
resp, err := svc.UpdateDefaultBranch(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 ExampleCodeCommit_UpdateRepositoryDescription() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.UpdateRepositoryDescriptionInput{
RepositoryName: aws.String("RepositoryName"), // Required
RepositoryDescription: aws.String("RepositoryDescription"),
}
resp, err := svc.UpdateRepositoryDescription(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 ExampleCodeCommit_UpdateRepositoryName() {
sess := session.Must(session.NewSession())
svc := codecommit.New(sess)
params := &codecommit.UpdateRepositoryNameInput{
NewName: aws.String("RepositoryName"), // Required
OldName: aws.String("RepositoryName"), // Required
}
resp, err := svc.UpdateRepositoryName(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 -65
View File
@@ -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 codecommit
@@ -11,71 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// This is the AWS CodeCommit API Reference. This reference provides descriptions
// of the operations and data types for AWS CodeCommit API along with usage
// examples.
// CodeCommit provides the API operation methods for making requests to
// AWS CodeCommit. See this package's package overview docs
// for details on the service.
//
// You can use the AWS CodeCommit API to work with the following objects:
//
// Repositories, by calling the following:
//
// * BatchGetRepositories, which returns information about one or more repositories
// associated with your AWS account
//
// * CreateRepository, which creates an AWS CodeCommit repository
//
// * DeleteRepository, which deletes an AWS CodeCommit repository
//
// * GetRepository, which returns information about a specified repository
//
// * ListRepositories, which lists all AWS CodeCommit repositories associated
// with your AWS account
//
// * UpdateRepositoryDescription, which sets or updates the description of
// the repository
//
// * UpdateRepositoryName, which changes the name of the repository. If you
// change the name of a repository, no other users of that repository will
// be able to access it until you send them the new HTTPS or SSH URL to use.
//
// Branches, by calling the following:
//
// * CreateBranch, which creates a new branch in a specified repository
//
// * GetBranch, which returns information about a specified branch
//
// * ListBranches, which lists all branches for a specified repository
//
// * UpdateDefaultBranch, which changes the default branch for a repository
//
// Information about committed code in a repository, by calling the following:
//
// * GetBlob, which returns the base-64 encoded content of an individual
// Git blob object within a repository
//
// * GetCommit, which returns information about a commit, including commit
// messages and author and committer information
//
// * GetDifferences, which returns information about the differences in a
// valid commit specifier (such as a branch, tag, HEAD, commit ID or other
// fully qualified reference)
//
// Triggers, by calling the following:
//
// * GetRepositoryTriggers, which returns information about triggers configured
// for a repository
//
// * PutRepositoryTriggers, which replaces all triggers for a repository
// and can be used to create or delete triggers
//
// * TestRepositoryTriggers, which tests the functionality of a repository
// trigger by sending data to the trigger target
//
// For information about how to use AWS CodeCommit, see the AWS CodeCommit User
// Guide (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html).
// The service client's operations are safe to be used concurrently.
// It is not safe to mutate any of the client's properties though.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13
// CodeCommit methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type CodeCommit struct {
*client.Client
}