Replace minio-go with aws-sdk-go for s3-compatible log backend (#670)

* Logs should support specifying region when using S3-compatible object store

* Use aws-sdk-go client for s3 backed logstore

* fixes vendor with aws-sdk-go dependencies
This commit is contained in:
Gerardo Viedma
2018-01-10 17:44:04 +00:00
committed by Reed Allman
parent 930d1e8dcc
commit 60d2e92c9a
2817 changed files with 1881133 additions and 33102 deletions

2166
vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,110 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloud9iface provides an interface to enable mocking the AWS Cloud9 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 cloud9iface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloud9"
)
// Cloud9API provides an interface to enable mocking the
// cloud9.Cloud9 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 Cloud9.
// func myFunc(svc cloud9iface.Cloud9API) bool {
// // Make svc.CreateEnvironmentEC2 request
// }
//
// func main() {
// sess := session.New()
// svc := cloud9.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCloud9Client struct {
// cloud9iface.Cloud9API
// }
// func (m *mockCloud9Client) CreateEnvironmentEC2(input *cloud9.CreateEnvironmentEC2Input) (*cloud9.CreateEnvironmentEC2Output, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCloud9Client{}
//
// 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 Cloud9API interface {
CreateEnvironmentEC2(*cloud9.CreateEnvironmentEC2Input) (*cloud9.CreateEnvironmentEC2Output, error)
CreateEnvironmentEC2WithContext(aws.Context, *cloud9.CreateEnvironmentEC2Input, ...request.Option) (*cloud9.CreateEnvironmentEC2Output, error)
CreateEnvironmentEC2Request(*cloud9.CreateEnvironmentEC2Input) (*request.Request, *cloud9.CreateEnvironmentEC2Output)
CreateEnvironmentMembership(*cloud9.CreateEnvironmentMembershipInput) (*cloud9.CreateEnvironmentMembershipOutput, error)
CreateEnvironmentMembershipWithContext(aws.Context, *cloud9.CreateEnvironmentMembershipInput, ...request.Option) (*cloud9.CreateEnvironmentMembershipOutput, error)
CreateEnvironmentMembershipRequest(*cloud9.CreateEnvironmentMembershipInput) (*request.Request, *cloud9.CreateEnvironmentMembershipOutput)
DeleteEnvironment(*cloud9.DeleteEnvironmentInput) (*cloud9.DeleteEnvironmentOutput, error)
DeleteEnvironmentWithContext(aws.Context, *cloud9.DeleteEnvironmentInput, ...request.Option) (*cloud9.DeleteEnvironmentOutput, error)
DeleteEnvironmentRequest(*cloud9.DeleteEnvironmentInput) (*request.Request, *cloud9.DeleteEnvironmentOutput)
DeleteEnvironmentMembership(*cloud9.DeleteEnvironmentMembershipInput) (*cloud9.DeleteEnvironmentMembershipOutput, error)
DeleteEnvironmentMembershipWithContext(aws.Context, *cloud9.DeleteEnvironmentMembershipInput, ...request.Option) (*cloud9.DeleteEnvironmentMembershipOutput, error)
DeleteEnvironmentMembershipRequest(*cloud9.DeleteEnvironmentMembershipInput) (*request.Request, *cloud9.DeleteEnvironmentMembershipOutput)
DescribeEnvironmentMemberships(*cloud9.DescribeEnvironmentMembershipsInput) (*cloud9.DescribeEnvironmentMembershipsOutput, error)
DescribeEnvironmentMembershipsWithContext(aws.Context, *cloud9.DescribeEnvironmentMembershipsInput, ...request.Option) (*cloud9.DescribeEnvironmentMembershipsOutput, error)
DescribeEnvironmentMembershipsRequest(*cloud9.DescribeEnvironmentMembershipsInput) (*request.Request, *cloud9.DescribeEnvironmentMembershipsOutput)
DescribeEnvironmentMembershipsPages(*cloud9.DescribeEnvironmentMembershipsInput, func(*cloud9.DescribeEnvironmentMembershipsOutput, bool) bool) error
DescribeEnvironmentMembershipsPagesWithContext(aws.Context, *cloud9.DescribeEnvironmentMembershipsInput, func(*cloud9.DescribeEnvironmentMembershipsOutput, bool) bool, ...request.Option) error
DescribeEnvironmentStatus(*cloud9.DescribeEnvironmentStatusInput) (*cloud9.DescribeEnvironmentStatusOutput, error)
DescribeEnvironmentStatusWithContext(aws.Context, *cloud9.DescribeEnvironmentStatusInput, ...request.Option) (*cloud9.DescribeEnvironmentStatusOutput, error)
DescribeEnvironmentStatusRequest(*cloud9.DescribeEnvironmentStatusInput) (*request.Request, *cloud9.DescribeEnvironmentStatusOutput)
DescribeEnvironments(*cloud9.DescribeEnvironmentsInput) (*cloud9.DescribeEnvironmentsOutput, error)
DescribeEnvironmentsWithContext(aws.Context, *cloud9.DescribeEnvironmentsInput, ...request.Option) (*cloud9.DescribeEnvironmentsOutput, error)
DescribeEnvironmentsRequest(*cloud9.DescribeEnvironmentsInput) (*request.Request, *cloud9.DescribeEnvironmentsOutput)
ListEnvironments(*cloud9.ListEnvironmentsInput) (*cloud9.ListEnvironmentsOutput, error)
ListEnvironmentsWithContext(aws.Context, *cloud9.ListEnvironmentsInput, ...request.Option) (*cloud9.ListEnvironmentsOutput, error)
ListEnvironmentsRequest(*cloud9.ListEnvironmentsInput) (*request.Request, *cloud9.ListEnvironmentsOutput)
ListEnvironmentsPages(*cloud9.ListEnvironmentsInput, func(*cloud9.ListEnvironmentsOutput, bool) bool) error
ListEnvironmentsPagesWithContext(aws.Context, *cloud9.ListEnvironmentsInput, func(*cloud9.ListEnvironmentsOutput, bool) bool, ...request.Option) error
UpdateEnvironment(*cloud9.UpdateEnvironmentInput) (*cloud9.UpdateEnvironmentOutput, error)
UpdateEnvironmentWithContext(aws.Context, *cloud9.UpdateEnvironmentInput, ...request.Option) (*cloud9.UpdateEnvironmentOutput, error)
UpdateEnvironmentRequest(*cloud9.UpdateEnvironmentInput) (*request.Request, *cloud9.UpdateEnvironmentOutput)
UpdateEnvironmentMembership(*cloud9.UpdateEnvironmentMembershipInput) (*cloud9.UpdateEnvironmentMembershipOutput, error)
UpdateEnvironmentMembershipWithContext(aws.Context, *cloud9.UpdateEnvironmentMembershipInput, ...request.Option) (*cloud9.UpdateEnvironmentMembershipOutput, error)
UpdateEnvironmentMembershipRequest(*cloud9.UpdateEnvironmentMembershipInput) (*request.Request, *cloud9.UpdateEnvironmentMembershipOutput)
}
var _ Cloud9API = (*cloud9.Cloud9)(nil)

64
vendor/github.com/aws/aws-sdk-go/service/cloud9/doc.go generated vendored Normal file
View File

@@ -0,0 +1,64 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package cloud9 provides the client and types for making API
// requests to AWS Cloud9.
//
// AWS Cloud9 is a collection of tools that you can use to code, build, run,
// test, debug, and release software in the cloud.
//
// In the background, these tools are available through development environments
// running on Amazon Elastic Compute Cloud (Amazon EC2) instances (known as
// Amazon EC2 environments), your own servers (known as SSH environments), or
// a combination. This enables you to create and switch between multiple environments,
// with each environment set up for a specific development project.
//
// For more information about AWS Cloud9, see the AWS Cloud9 User Guide.
//
// AWS Cloud9 supports these operations:
//
// * CreateEnvironmentEC2: Creates an AWS Cloud9 development environment,
// launches an Amazon EC2 instance, and then hosts the environment on the
// instance.
//
// * CreateEnvironmentMembership: Adds an environment member to an environment.
//
// * DeleteEnvironment: Deletes an environment. If the environment is hosted
// on an Amazon EC2 instance, also terminates the instance.
//
// * DeleteEnvironmentMembership: Deletes an environment member from an environment.
//
// * DescribeEnvironmentMemberships: Gets information about environment members
// for an environment.
//
// * DescribeEnvironments: Gets information about environments.
//
// * DescribeEnvironmentStatus: Gets status information for an environment.
//
// * ListEnvironments: Gets a list of environment identifiers.
//
// * UpdateEnvironment: Changes the settings of an existing environment.
//
// * UpdateEnvironmentMembership: Changes the settings of an existing environment
// member for an environment.
//
// See https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23 for more information on this service.
//
// See cloud9 package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloud9/
//
// Using the Client
//
// To contact AWS Cloud9 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 Cloud9 client Cloud9 for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloud9/#New
package cloud9

View File

@@ -0,0 +1,48 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloud9
const (
// ErrCodeBadRequestException for service response error code
// "BadRequestException".
//
// The target request is invalid.
ErrCodeBadRequestException = "BadRequestException"
// ErrCodeConflictException for service response error code
// "ConflictException".
//
// A conflict occurred.
ErrCodeConflictException = "ConflictException"
// ErrCodeForbiddenException for service response error code
// "ForbiddenException".
//
// An access permissions issue occurred.
ErrCodeForbiddenException = "ForbiddenException"
// ErrCodeInternalServerErrorException for service response error code
// "InternalServerErrorException".
//
// An internal server error occurred.
ErrCodeInternalServerErrorException = "InternalServerErrorException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// A service limit was exceeded.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeNotFoundException for service response error code
// "NotFoundException".
//
// The target resource cannot be found.
ErrCodeNotFoundException = "NotFoundException"
// ErrCodeTooManyRequestsException for service response error code
// "TooManyRequestsException".
//
// Too many service requests were made over the given time period.
ErrCodeTooManyRequestsException = "TooManyRequestsException"
)

View File

@@ -0,0 +1,95 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloud9
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"
)
// Cloud9 provides the API operation methods for making requests to
// AWS Cloud9. See this package's package overview docs
// for details on the service.
//
// Cloud9 methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type Cloud9 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 = "cloud9" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the Cloud9 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 Cloud9 client from just a session.
// svc := cloud9.New(mySession)
//
// // Create a Cloud9 client with additional configuration
// svc := cloud9.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Cloud9 {
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) *Cloud9 {
svc := &Cloud9{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2017-09-23",
JSONVersion: "1.1",
TargetPrefix: "AWSCloud9WorkspaceManagementService",
},
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 Cloud9 operation and runs any
// custom request initialization.
func (c *Cloud9) 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
}