mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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:
committed by
Reed Allman
parent
930d1e8dcc
commit
60d2e92c9a
1204
vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go
generated
vendored
Normal file
1204
vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
29
vendor/github.com/aws/aws-sdk-go/service/mediastore/doc.go
generated
vendored
Normal file
29
vendor/github.com/aws/aws-sdk-go/service/mediastore/doc.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package mediastore provides the client and types for making API
|
||||
// requests to AWS Elemental MediaStore.
|
||||
//
|
||||
// An AWS Elemental MediaStore container is a namespace that holds folders and
|
||||
// objects. You use a container endpoint to create, read, and delete objects.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01 for more information on this service.
|
||||
//
|
||||
// See mediastore package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/mediastore/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact AWS Elemental MediaStore 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 Elemental MediaStore client MediaStore for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/mediastore/#New
|
||||
package mediastore
|
||||
36
vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go
generated
vendored
Normal file
36
vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package mediastore
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeContainerInUseException for service response error code
|
||||
// "ContainerInUseException".
|
||||
//
|
||||
// Resource already exists or is being updated.
|
||||
ErrCodeContainerInUseException = "ContainerInUseException"
|
||||
|
||||
// ErrCodeContainerNotFoundException for service response error code
|
||||
// "ContainerNotFoundException".
|
||||
//
|
||||
// Could not perform an operation on a container that does not exist.
|
||||
ErrCodeContainerNotFoundException = "ContainerNotFoundException"
|
||||
|
||||
// ErrCodeInternalServerError for service response error code
|
||||
// "InternalServerError".
|
||||
//
|
||||
// The service is temporarily unavailable.
|
||||
ErrCodeInternalServerError = "InternalServerError"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// A service limit has been exceeded.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodePolicyNotFoundException for service response error code
|
||||
// "PolicyNotFoundException".
|
||||
//
|
||||
// Could not perform an operation on a policy that does not exist.
|
||||
ErrCodePolicyNotFoundException = "PolicyNotFoundException"
|
||||
)
|
||||
92
vendor/github.com/aws/aws-sdk-go/service/mediastore/mediastoreiface/interface.go
generated
vendored
Normal file
92
vendor/github.com/aws/aws-sdk-go/service/mediastore/mediastoreiface/interface.go
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package mediastoreiface provides an interface to enable mocking the AWS Elemental MediaStore 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 mediastoreiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/mediastore"
|
||||
)
|
||||
|
||||
// MediaStoreAPI provides an interface to enable mocking the
|
||||
// mediastore.MediaStore 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 Elemental MediaStore.
|
||||
// func myFunc(svc mediastoreiface.MediaStoreAPI) bool {
|
||||
// // Make svc.CreateContainer request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := mediastore.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockMediaStoreClient struct {
|
||||
// mediastoreiface.MediaStoreAPI
|
||||
// }
|
||||
// func (m *mockMediaStoreClient) CreateContainer(input *mediastore.CreateContainerInput) (*mediastore.CreateContainerOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockMediaStoreClient{}
|
||||
//
|
||||
// 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 MediaStoreAPI interface {
|
||||
CreateContainer(*mediastore.CreateContainerInput) (*mediastore.CreateContainerOutput, error)
|
||||
CreateContainerWithContext(aws.Context, *mediastore.CreateContainerInput, ...request.Option) (*mediastore.CreateContainerOutput, error)
|
||||
CreateContainerRequest(*mediastore.CreateContainerInput) (*request.Request, *mediastore.CreateContainerOutput)
|
||||
|
||||
DeleteContainer(*mediastore.DeleteContainerInput) (*mediastore.DeleteContainerOutput, error)
|
||||
DeleteContainerWithContext(aws.Context, *mediastore.DeleteContainerInput, ...request.Option) (*mediastore.DeleteContainerOutput, error)
|
||||
DeleteContainerRequest(*mediastore.DeleteContainerInput) (*request.Request, *mediastore.DeleteContainerOutput)
|
||||
|
||||
DeleteContainerPolicy(*mediastore.DeleteContainerPolicyInput) (*mediastore.DeleteContainerPolicyOutput, error)
|
||||
DeleteContainerPolicyWithContext(aws.Context, *mediastore.DeleteContainerPolicyInput, ...request.Option) (*mediastore.DeleteContainerPolicyOutput, error)
|
||||
DeleteContainerPolicyRequest(*mediastore.DeleteContainerPolicyInput) (*request.Request, *mediastore.DeleteContainerPolicyOutput)
|
||||
|
||||
DescribeContainer(*mediastore.DescribeContainerInput) (*mediastore.DescribeContainerOutput, error)
|
||||
DescribeContainerWithContext(aws.Context, *mediastore.DescribeContainerInput, ...request.Option) (*mediastore.DescribeContainerOutput, error)
|
||||
DescribeContainerRequest(*mediastore.DescribeContainerInput) (*request.Request, *mediastore.DescribeContainerOutput)
|
||||
|
||||
GetContainerPolicy(*mediastore.GetContainerPolicyInput) (*mediastore.GetContainerPolicyOutput, error)
|
||||
GetContainerPolicyWithContext(aws.Context, *mediastore.GetContainerPolicyInput, ...request.Option) (*mediastore.GetContainerPolicyOutput, error)
|
||||
GetContainerPolicyRequest(*mediastore.GetContainerPolicyInput) (*request.Request, *mediastore.GetContainerPolicyOutput)
|
||||
|
||||
ListContainers(*mediastore.ListContainersInput) (*mediastore.ListContainersOutput, error)
|
||||
ListContainersWithContext(aws.Context, *mediastore.ListContainersInput, ...request.Option) (*mediastore.ListContainersOutput, error)
|
||||
ListContainersRequest(*mediastore.ListContainersInput) (*request.Request, *mediastore.ListContainersOutput)
|
||||
|
||||
PutContainerPolicy(*mediastore.PutContainerPolicyInput) (*mediastore.PutContainerPolicyOutput, error)
|
||||
PutContainerPolicyWithContext(aws.Context, *mediastore.PutContainerPolicyInput, ...request.Option) (*mediastore.PutContainerPolicyOutput, error)
|
||||
PutContainerPolicyRequest(*mediastore.PutContainerPolicyInput) (*request.Request, *mediastore.PutContainerPolicyOutput)
|
||||
}
|
||||
|
||||
var _ MediaStoreAPI = (*mediastore.MediaStore)(nil)
|
||||
98
vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go
generated
vendored
Normal file
98
vendor/github.com/aws/aws-sdk-go/service/mediastore/service.go
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package mediastore
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// MediaStore provides the API operation methods for making requests to
|
||||
// AWS Elemental MediaStore. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// MediaStore methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type MediaStore 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 = "mediastore" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the MediaStore 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 MediaStore client from just a session.
|
||||
// svc := mediastore.New(mySession)
|
||||
//
|
||||
// // Create a MediaStore client with additional configuration
|
||||
// svc := mediastore.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaStore {
|
||||
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) *MediaStore {
|
||||
if len(signingName) == 0 {
|
||||
signingName = "mediastore"
|
||||
}
|
||||
svc := &MediaStore{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2017-09-01",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "MediaStore_20170901",
|
||||
},
|
||||
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 MediaStore operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *MediaStore) 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