Switch to using the dep tool and update all the dependencies
This commit is contained in:
parent
5135ff73cb
commit
98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions
3419
vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go
generated
vendored
Normal file
3419
vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
108
vendor/github.com/aws/aws-sdk-go/service/codebuild/codebuildiface/interface.go
generated
vendored
Normal file
108
vendor/github.com/aws/aws-sdk-go/service/codebuild/codebuildiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,108 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package codebuildiface provides an interface to enable mocking the AWS CodeBuild 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 codebuildiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/codebuild"
|
||||
)
|
||||
|
||||
// CodeBuildAPI provides an interface to enable mocking the
|
||||
// codebuild.CodeBuild 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
|
||||
// // AWS CodeBuild.
|
||||
// func myFunc(svc codebuildiface.CodeBuildAPI) bool {
|
||||
// // Make svc.BatchGetBuilds request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := codebuild.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockCodeBuildClient struct {
|
||||
// codebuildiface.CodeBuildAPI
|
||||
// }
|
||||
// func (m *mockCodeBuildClient) BatchGetBuilds(input *codebuild.BatchGetBuildsInput) (*codebuild.BatchGetBuildsOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockCodeBuildClient{}
|
||||
//
|
||||
// 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 CodeBuildAPI interface {
|
||||
BatchGetBuilds(*codebuild.BatchGetBuildsInput) (*codebuild.BatchGetBuildsOutput, error)
|
||||
BatchGetBuildsWithContext(aws.Context, *codebuild.BatchGetBuildsInput, ...request.Option) (*codebuild.BatchGetBuildsOutput, error)
|
||||
BatchGetBuildsRequest(*codebuild.BatchGetBuildsInput) (*request.Request, *codebuild.BatchGetBuildsOutput)
|
||||
|
||||
BatchGetProjects(*codebuild.BatchGetProjectsInput) (*codebuild.BatchGetProjectsOutput, error)
|
||||
BatchGetProjectsWithContext(aws.Context, *codebuild.BatchGetProjectsInput, ...request.Option) (*codebuild.BatchGetProjectsOutput, error)
|
||||
BatchGetProjectsRequest(*codebuild.BatchGetProjectsInput) (*request.Request, *codebuild.BatchGetProjectsOutput)
|
||||
|
||||
CreateProject(*codebuild.CreateProjectInput) (*codebuild.CreateProjectOutput, error)
|
||||
CreateProjectWithContext(aws.Context, *codebuild.CreateProjectInput, ...request.Option) (*codebuild.CreateProjectOutput, error)
|
||||
CreateProjectRequest(*codebuild.CreateProjectInput) (*request.Request, *codebuild.CreateProjectOutput)
|
||||
|
||||
DeleteProject(*codebuild.DeleteProjectInput) (*codebuild.DeleteProjectOutput, error)
|
||||
DeleteProjectWithContext(aws.Context, *codebuild.DeleteProjectInput, ...request.Option) (*codebuild.DeleteProjectOutput, error)
|
||||
DeleteProjectRequest(*codebuild.DeleteProjectInput) (*request.Request, *codebuild.DeleteProjectOutput)
|
||||
|
||||
ListBuilds(*codebuild.ListBuildsInput) (*codebuild.ListBuildsOutput, error)
|
||||
ListBuildsWithContext(aws.Context, *codebuild.ListBuildsInput, ...request.Option) (*codebuild.ListBuildsOutput, error)
|
||||
ListBuildsRequest(*codebuild.ListBuildsInput) (*request.Request, *codebuild.ListBuildsOutput)
|
||||
|
||||
ListBuildsForProject(*codebuild.ListBuildsForProjectInput) (*codebuild.ListBuildsForProjectOutput, error)
|
||||
ListBuildsForProjectWithContext(aws.Context, *codebuild.ListBuildsForProjectInput, ...request.Option) (*codebuild.ListBuildsForProjectOutput, error)
|
||||
ListBuildsForProjectRequest(*codebuild.ListBuildsForProjectInput) (*request.Request, *codebuild.ListBuildsForProjectOutput)
|
||||
|
||||
ListCuratedEnvironmentImages(*codebuild.ListCuratedEnvironmentImagesInput) (*codebuild.ListCuratedEnvironmentImagesOutput, error)
|
||||
ListCuratedEnvironmentImagesWithContext(aws.Context, *codebuild.ListCuratedEnvironmentImagesInput, ...request.Option) (*codebuild.ListCuratedEnvironmentImagesOutput, error)
|
||||
ListCuratedEnvironmentImagesRequest(*codebuild.ListCuratedEnvironmentImagesInput) (*request.Request, *codebuild.ListCuratedEnvironmentImagesOutput)
|
||||
|
||||
ListProjects(*codebuild.ListProjectsInput) (*codebuild.ListProjectsOutput, error)
|
||||
ListProjectsWithContext(aws.Context, *codebuild.ListProjectsInput, ...request.Option) (*codebuild.ListProjectsOutput, error)
|
||||
ListProjectsRequest(*codebuild.ListProjectsInput) (*request.Request, *codebuild.ListProjectsOutput)
|
||||
|
||||
StartBuild(*codebuild.StartBuildInput) (*codebuild.StartBuildOutput, error)
|
||||
StartBuildWithContext(aws.Context, *codebuild.StartBuildInput, ...request.Option) (*codebuild.StartBuildOutput, error)
|
||||
StartBuildRequest(*codebuild.StartBuildInput) (*request.Request, *codebuild.StartBuildOutput)
|
||||
|
||||
StopBuild(*codebuild.StopBuildInput) (*codebuild.StopBuildOutput, error)
|
||||
StopBuildWithContext(aws.Context, *codebuild.StopBuildInput, ...request.Option) (*codebuild.StopBuildOutput, error)
|
||||
StopBuildRequest(*codebuild.StopBuildInput) (*request.Request, *codebuild.StopBuildOutput)
|
||||
|
||||
UpdateProject(*codebuild.UpdateProjectInput) (*codebuild.UpdateProjectOutput, error)
|
||||
UpdateProjectWithContext(aws.Context, *codebuild.UpdateProjectInput, ...request.Option) (*codebuild.UpdateProjectOutput, error)
|
||||
UpdateProjectRequest(*codebuild.UpdateProjectInput) (*request.Request, *codebuild.UpdateProjectOutput)
|
||||
}
|
||||
|
||||
var _ CodeBuildAPI = (*codebuild.CodeBuild)(nil)
|
123
vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go
generated
vendored
Normal file
123
vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,123 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package codebuild provides the client and types for making API
|
||||
// requests to AWS CodeBuild.
|
||||
//
|
||||
// AWS CodeBuild is a fully managed build service in the cloud. AWS CodeBuild
|
||||
// compiles your source code, runs unit tests, and produces artifacts that are
|
||||
// ready to deploy. AWS CodeBuild eliminates the need to provision, manage,
|
||||
// and scale your own build servers. It provides prepackaged build environments
|
||||
// for the most popular programming languages and build tools, such as Apach
|
||||
// Maven, Gradle, and more. You can also fully customize build environments
|
||||
// in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically
|
||||
// to meet peak build requests, and you pay only for the build time you consume.
|
||||
// For more information about AWS CodeBuild, see the AWS CodeBuild User Guide.
|
||||
//
|
||||
// AWS CodeBuild supports these operations:
|
||||
//
|
||||
// * BatchGetProjects: Gets information about one or more build projects.
|
||||
// A build project defines how AWS CodeBuild will run a build. This includes
|
||||
// information such as where to get the source code to build, the build environment
|
||||
// to use, the build commands to run, and where to store the build output.
|
||||
// A build environment represents a combination of operating system, programming
|
||||
// language runtime, and tools that AWS CodeBuild will use to run a build.
|
||||
// Also, you can add tags to build projects to help manage your resources
|
||||
// and costs.
|
||||
//
|
||||
// * CreateProject: Creates a build project.
|
||||
//
|
||||
// * DeleteProject: Deletes a build project.
|
||||
//
|
||||
// * ListProjects: Gets a list of build project names, with each build project
|
||||
// name representing a single build project.
|
||||
//
|
||||
// * UpdateProject: Changes the settings of an existing build project.
|
||||
//
|
||||
// * BatchGetBuilds: Gets information about one or more builds.
|
||||
//
|
||||
// * ListBuilds: Gets a list of build IDs, with each build ID representing
|
||||
// a single build.
|
||||
//
|
||||
// * ListBuildsForProject: Gets a list of build IDs for the specified build
|
||||
// project, with each build ID representing a single build.
|
||||
//
|
||||
// * StartBuild: Starts running a build.
|
||||
//
|
||||
// * StopBuild: Attempts to stop running a build.
|
||||
//
|
||||
// * ListCuratedEnvironmentImages: Gets information about Docker images that
|
||||
// are managed by AWS CodeBuild.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06 for more information on this service.
|
||||
//
|
||||
// See codebuild package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/codebuild/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for AWS CodeBuild you will first need
|
||||
// to create a new instance of it.
|
||||
//
|
||||
// When creating a client for an AWS service you'll first need to have a Session
|
||||
// already created. The Session provides configuration that can be shared
|
||||
// between multiple service clients. Additional configuration can be applied to
|
||||
// the Session and service's client when they are constructed. The aws package's
|
||||
// Config type contains several fields such as Region for the AWS Region the
|
||||
// client should make API requests too. The optional Config value can be provided
|
||||
// as the variadic argument for Sessions and client creation.
|
||||
//
|
||||
// Once the service's client is created you can use it to make API requests the
|
||||
// AWS service. These clients are safe to use concurrently.
|
||||
//
|
||||
// // Create a session to share configuration, and load external configuration.
|
||||
// sess := session.Must(session.NewSession())
|
||||
//
|
||||
// // Create the service's client with the session.
|
||||
// svc := codebuild.New(sess)
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use service clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws package's Config type for more information on configuration options.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the AWS CodeBuild client CodeBuild for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/codebuild/#New
|
||||
//
|
||||
// Once the client is created you can make an API request to the service.
|
||||
// Each API method takes a input parameter, and returns the service response
|
||||
// and an error.
|
||||
//
|
||||
// The API method will document which error codes the service can be returned
|
||||
// by the operation if the service models the API operation's errors. These
|
||||
// errors will also be available as const strings prefixed with "ErrCode".
|
||||
//
|
||||
// result, err := svc.BatchGetBuilds(params)
|
||||
// if err != nil {
|
||||
// // Cast err to awserr.Error to handle specific error codes.
|
||||
// aerr, ok := err.(awserr.Error)
|
||||
// if ok && aerr.Code() == <error code to check for> {
|
||||
// // Specific error code handling
|
||||
// }
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// fmt.Println("BatchGetBuilds result:")
|
||||
// fmt.Println(result)
|
||||
//
|
||||
// Using the Client with Context
|
||||
//
|
||||
// The service's client also provides methods to make API requests with a Context
|
||||
// value. This allows you to control the timeout, and cancellation of pending
|
||||
// requests. These methods also take request Option as variadic parameter to apply
|
||||
// additional configuration to the API request.
|
||||
//
|
||||
// ctx := context.Background()
|
||||
//
|
||||
// result, err := svc.BatchGetBuildsWithContext(ctx, params)
|
||||
//
|
||||
// See the request package documentation for more information on using Context pattern
|
||||
// with the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
|
||||
package codebuild
|
31
vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go
generated
vendored
Normal file
31
vendor/github.com/aws/aws-sdk-go/service/codebuild/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package codebuild
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAccountLimitExceededException for service response error code
|
||||
// "AccountLimitExceededException".
|
||||
//
|
||||
// An AWS service limit was exceeded for the calling AWS account.
|
||||
ErrCodeAccountLimitExceededException = "AccountLimitExceededException"
|
||||
|
||||
// ErrCodeInvalidInputException for service response error code
|
||||
// "InvalidInputException".
|
||||
//
|
||||
// The input value that was provided is not valid.
|
||||
ErrCodeInvalidInputException = "InvalidInputException"
|
||||
|
||||
// ErrCodeResourceAlreadyExistsException for service response error code
|
||||
// "ResourceAlreadyExistsException".
|
||||
//
|
||||
// The specified AWS resource cannot be created, because an AWS resource with
|
||||
// the same settings already exists.
|
||||
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// The specified AWS resource cannot be found.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
)
|
354
vendor/github.com/aws/aws-sdk-go/service/codebuild/examples_test.go
generated
vendored
Normal file
354
vendor/github.com/aws/aws-sdk-go/service/codebuild/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,354 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package codebuild_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/codebuild"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCodeBuild_BatchGetBuilds() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.BatchGetBuildsInput{
|
||||
Ids: []*string{ // Required
|
||||
aws.String("NonEmptyString"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetBuilds(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 ExampleCodeBuild_BatchGetProjects() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.BatchGetProjectsInput{
|
||||
Names: []*string{ // Required
|
||||
aws.String("NonEmptyString"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.BatchGetProjects(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 ExampleCodeBuild_CreateProject() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.CreateProjectInput{
|
||||
Artifacts: &codebuild.ProjectArtifacts{ // Required
|
||||
Type: aws.String("ArtifactsType"), // Required
|
||||
Location: aws.String("String"),
|
||||
Name: aws.String("String"),
|
||||
NamespaceType: aws.String("ArtifactNamespace"),
|
||||
Packaging: aws.String("ArtifactPackaging"),
|
||||
Path: aws.String("String"),
|
||||
},
|
||||
Environment: &codebuild.ProjectEnvironment{ // Required
|
||||
ComputeType: aws.String("ComputeType"), // Required
|
||||
Image: aws.String("NonEmptyString"), // Required
|
||||
Type: aws.String("EnvironmentType"), // Required
|
||||
EnvironmentVariables: []*codebuild.EnvironmentVariable{
|
||||
{ // Required
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
Value: aws.String("String"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
Name: aws.String("ProjectName"), // Required
|
||||
Source: &codebuild.ProjectSource{ // Required
|
||||
Type: aws.String("SourceType"), // Required
|
||||
Auth: &codebuild.SourceAuth{
|
||||
Type: aws.String("SourceAuthType"), // Required
|
||||
Resource: aws.String("String"),
|
||||
},
|
||||
Buildspec: aws.String("String"),
|
||||
Location: aws.String("String"),
|
||||
},
|
||||
Description: aws.String("ProjectDescription"),
|
||||
EncryptionKey: aws.String("NonEmptyString"),
|
||||
ServiceRole: aws.String("NonEmptyString"),
|
||||
Tags: []*codebuild.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("KeyInput"),
|
||||
Value: aws.String("ValueInput"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TimeoutInMinutes: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.CreateProject(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 ExampleCodeBuild_DeleteProject() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.DeleteProjectInput{
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteProject(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 ExampleCodeBuild_ListBuilds() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.ListBuildsInput{
|
||||
NextToken: aws.String("String"),
|
||||
SortOrder: aws.String("SortOrderType"),
|
||||
}
|
||||
resp, err := svc.ListBuilds(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 ExampleCodeBuild_ListBuildsForProject() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.ListBuildsForProjectInput{
|
||||
ProjectName: aws.String("NonEmptyString"), // Required
|
||||
NextToken: aws.String("String"),
|
||||
SortOrder: aws.String("SortOrderType"),
|
||||
}
|
||||
resp, err := svc.ListBuildsForProject(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 ExampleCodeBuild_ListCuratedEnvironmentImages() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
var params *codebuild.ListCuratedEnvironmentImagesInput
|
||||
resp, err := svc.ListCuratedEnvironmentImages(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 ExampleCodeBuild_ListProjects() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.ListProjectsInput{
|
||||
NextToken: aws.String("NonEmptyString"),
|
||||
SortBy: aws.String("ProjectSortByType"),
|
||||
SortOrder: aws.String("SortOrderType"),
|
||||
}
|
||||
resp, err := svc.ListProjects(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 ExampleCodeBuild_StartBuild() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.StartBuildInput{
|
||||
ProjectName: aws.String("NonEmptyString"), // Required
|
||||
ArtifactsOverride: &codebuild.ProjectArtifacts{
|
||||
Type: aws.String("ArtifactsType"), // Required
|
||||
Location: aws.String("String"),
|
||||
Name: aws.String("String"),
|
||||
NamespaceType: aws.String("ArtifactNamespace"),
|
||||
Packaging: aws.String("ArtifactPackaging"),
|
||||
Path: aws.String("String"),
|
||||
},
|
||||
BuildspecOverride: aws.String("String"),
|
||||
EnvironmentVariablesOverride: []*codebuild.EnvironmentVariable{
|
||||
{ // Required
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
Value: aws.String("String"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
SourceVersion: aws.String("String"),
|
||||
TimeoutInMinutesOverride: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.StartBuild(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 ExampleCodeBuild_StopBuild() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.StopBuildInput{
|
||||
Id: aws.String("NonEmptyString"), // Required
|
||||
}
|
||||
resp, err := svc.StopBuild(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 ExampleCodeBuild_UpdateProject() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := codebuild.New(sess)
|
||||
|
||||
params := &codebuild.UpdateProjectInput{
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
Artifacts: &codebuild.ProjectArtifacts{
|
||||
Type: aws.String("ArtifactsType"), // Required
|
||||
Location: aws.String("String"),
|
||||
Name: aws.String("String"),
|
||||
NamespaceType: aws.String("ArtifactNamespace"),
|
||||
Packaging: aws.String("ArtifactPackaging"),
|
||||
Path: aws.String("String"),
|
||||
},
|
||||
Description: aws.String("ProjectDescription"),
|
||||
EncryptionKey: aws.String("NonEmptyString"),
|
||||
Environment: &codebuild.ProjectEnvironment{
|
||||
ComputeType: aws.String("ComputeType"), // Required
|
||||
Image: aws.String("NonEmptyString"), // Required
|
||||
Type: aws.String("EnvironmentType"), // Required
|
||||
EnvironmentVariables: []*codebuild.EnvironmentVariable{
|
||||
{ // Required
|
||||
Name: aws.String("NonEmptyString"), // Required
|
||||
Value: aws.String("String"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
ServiceRole: aws.String("NonEmptyString"),
|
||||
Source: &codebuild.ProjectSource{
|
||||
Type: aws.String("SourceType"), // Required
|
||||
Auth: &codebuild.SourceAuth{
|
||||
Type: aws.String("SourceAuthType"), // Required
|
||||
Resource: aws.String("String"),
|
||||
},
|
||||
Buildspec: aws.String("String"),
|
||||
Location: aws.String("String"),
|
||||
},
|
||||
Tags: []*codebuild.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("KeyInput"),
|
||||
Value: aws.String("ValueInput"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TimeoutInMinutes: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.UpdateProject(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)
|
||||
}
|
95
vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go
generated
vendored
Normal file
95
vendor/github.com/aws/aws-sdk-go/service/codebuild/service.go
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package codebuild
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// CodeBuild provides the API operation methods for making requests to
|
||||
// AWS CodeBuild. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CodeBuild methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CodeBuild 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 = "codebuild" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CodeBuild 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 CodeBuild client from just a session.
|
||||
// svc := codebuild.New(mySession)
|
||||
//
|
||||
// // Create a CodeBuild client with additional configuration
|
||||
// svc := codebuild.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CodeBuild {
|
||||
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) *CodeBuild {
|
||||
svc := &CodeBuild{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2016-10-06",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "CodeBuild_20161006",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a CodeBuild operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CodeBuild) 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue