mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-08 22:30:41 +00:00
Update vendored deps, including AWS SDK, openpgp, ftp, ...
This commit is contained in:
+4475
File diff suppressed because it is too large
Load Diff
+108
@@ -0,0 +1,108 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package secretsmanager provides the client and types for making API
|
||||
// requests to AWS Secrets Manager.
|
||||
//
|
||||
// AWS Secrets Manager is a web service that enables you to store, manage, and
|
||||
// retrieve, secrets.
|
||||
//
|
||||
// This guide provides descriptions of the AWS Secrets Manager API. For more
|
||||
// information about using this service, see the AWS Secrets Manager User Guide
|
||||
// (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/secretsmanager/latest/userguide/introduction.html).
|
||||
//
|
||||
// API Version
|
||||
//
|
||||
// This version of the AWS Secrets Manager API Reference documents the AWS Secrets
|
||||
// Manager API version 2017-10-17.
|
||||
//
|
||||
// As an alternative to using the API directly, you can use one of the AWS SDKs,
|
||||
// which consist of libraries and sample code for various programming languages
|
||||
// and platforms (such as Java, Ruby, .NET, iOS, and Android). The SDKs provide
|
||||
// a convenient way to create programmatic access to AWS Secrets Manager. For
|
||||
// example, the SDKs take care of cryptographically signing requests, managing
|
||||
// errors, and retrying requests automatically. For more information about the
|
||||
// AWS SDKs, including how to download and install them, see Tools for Amazon
|
||||
// Web Services (http://aws.amazon.com/tools/).
|
||||
//
|
||||
// We recommend that you use the AWS SDKs to make programmatic API calls to
|
||||
// AWS Secrets Manager. However, you also can use the AWS Secrets Manager HTTP
|
||||
// Query API to make direct calls to the AWS Secrets Manager web service. To
|
||||
// learn more about the AWS Secrets Manager HTTP Query API, see Making Query
|
||||
// Requests (http://docs.aws.amazon.com/secretsmanager/latest/userguide/orgs_query-requests.html)
|
||||
// in the AWS Secrets Manager User Guide.
|
||||
//
|
||||
// AWS Secrets Manager supports GET and POST requests for all actions. That
|
||||
// is, the API doesn't require you to use GET for some actions and POST for
|
||||
// others. However, GET requests are subject to the limitation size of a URL.
|
||||
// Therefore, for operations that require larger sizes, use a POST request.
|
||||
//
|
||||
// Signing Requests
|
||||
//
|
||||
// When you send HTTP requests to AWS, you must sign the requests so that AWS
|
||||
// can identify who sent them. You sign requests with your AWS access key, which
|
||||
// consists of an access key ID and a secret access key. We strongly recommend
|
||||
// that you don't create an access key for your root account. Anyone who has
|
||||
// the access key for your root account has unrestricted access to all the resources
|
||||
// in your account. Instead, create an access key for an IAM user account that
|
||||
// has the permissions required for the task at hand. As another option, use
|
||||
// AWS Security Token Service to generate temporary security credentials, and
|
||||
// use those credentials to sign requests.
|
||||
//
|
||||
// To sign requests, you must use Signature Version 4 (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
|
||||
// If you have an existing application that uses Signature Version 2, you must
|
||||
// update it to use Signature Version 4.
|
||||
//
|
||||
// When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs
|
||||
// to make requests to AWS, these tools automatically sign the requests for
|
||||
// you with the access key that you specify when you configure the tools.
|
||||
//
|
||||
// Support and Feedback for AWS Secrets Manager
|
||||
//
|
||||
// We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com
|
||||
// (mailto:awssecretsmanager-feedback@amazon.com), or post your feedback and
|
||||
// questions in the AWS Secrets Manager Discussion Forum (http://forums.aws.amazon.com/forum.jspa?forumID=296).
|
||||
// For more information about the AWS Discussion Forums, see Forums Help (http://forums.aws.amazon.com/help.jspa).
|
||||
//
|
||||
// How examples are presented
|
||||
//
|
||||
// The JSON that AWS Secrets Manager returns as a response to your requests
|
||||
// is a single long string without line breaks or white space formatting. Both
|
||||
// line breaks and white space are included in the examples in this guide to
|
||||
// improve readability. When example input parameters would also result in long
|
||||
// strings that extend beyond the screen, we insert line breaks to enhance readability.
|
||||
// You should always submit the input as a single JSON text string.
|
||||
//
|
||||
// Logging API Requests
|
||||
//
|
||||
// AWS Secrets Manager supports AWS CloudTrail, a service that records AWS API
|
||||
// calls for your AWS account and delivers log files to an Amazon S3 bucket.
|
||||
// By using information that's collected by AWS CloudTrail, you can determine
|
||||
// which requests were successfully made to AWS Secrets Manager, who made the
|
||||
// request, when it was made, and so on. For more about AWS Secrets Manager
|
||||
// and its support for AWS CloudTrail, see Logging AWS Secrets Manager Events
|
||||
// with AWS CloudTrail (http://docs.aws.amazon.com/secretsmanager/latest/userguide/orgs_cloudtrail-integration.html)
|
||||
// in the AWS Secrets Manager User Guide. To learn more about CloudTrail, including
|
||||
// how to turn it on and find your log files, see the AWS CloudTrail User Guide
|
||||
// (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17 for more information on this service.
|
||||
//
|
||||
// See secretsmanager package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/secretsmanager/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact AWS Secrets Manager 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 Secrets Manager client SecretsManager for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/secretsmanager/#New
|
||||
package secretsmanager
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package secretsmanager
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeDecryptionFailure for service response error code
|
||||
// "DecryptionFailure".
|
||||
//
|
||||
// AWS Secrets Manager can't decrypt the protected secret text using the provided
|
||||
// KMS key.
|
||||
ErrCodeDecryptionFailure = "DecryptionFailure"
|
||||
|
||||
// ErrCodeEncryptionFailure for service response error code
|
||||
// "EncryptionFailure".
|
||||
//
|
||||
// AWS Secrets Manager can't encrypt the protected secret text using the provided
|
||||
// KMS key. Check that the customer master key (CMK) is available, enabled,
|
||||
// and not in an invalid state. For more information, see How Key State Affects
|
||||
// Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html).
|
||||
ErrCodeEncryptionFailure = "EncryptionFailure"
|
||||
|
||||
// ErrCodeInternalServiceError for service response error code
|
||||
// "InternalServiceError".
|
||||
//
|
||||
// An error occurred on the server side.
|
||||
ErrCodeInternalServiceError = "InternalServiceError"
|
||||
|
||||
// ErrCodeInvalidNextTokenException for service response error code
|
||||
// "InvalidNextTokenException".
|
||||
//
|
||||
// You provided an invalid NextToken value.
|
||||
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
|
||||
|
||||
// ErrCodeInvalidParameterException for service response error code
|
||||
// "InvalidParameterException".
|
||||
//
|
||||
// You provided an invalid value for a parameter.
|
||||
ErrCodeInvalidParameterException = "InvalidParameterException"
|
||||
|
||||
// ErrCodeInvalidRequestException for service response error code
|
||||
// "InvalidRequestException".
|
||||
//
|
||||
// You provided a parameter value that is not valid for the current state of
|
||||
// the resource. For example, if you try to enable rotation on a secret, you
|
||||
// must already have a Lambda function ARN configured or included as a parameter
|
||||
// in this call.
|
||||
ErrCodeInvalidRequestException = "InvalidRequestException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// The request failed because it would exceed one of the AWS Secrets Manager
|
||||
// internal limits.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeMalformedPolicyDocumentException for service response error code
|
||||
// "MalformedPolicyDocumentException".
|
||||
//
|
||||
// The policy document that you provided isn't valid.
|
||||
ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException"
|
||||
|
||||
// ErrCodeResourceExistsException for service response error code
|
||||
// "ResourceExistsException".
|
||||
//
|
||||
// A resource with the ID you requested already exists.
|
||||
ErrCodeResourceExistsException = "ResourceExistsException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// We can't find the resource that you asked for.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
)
|
||||
Generated
Vendored
+130
@@ -0,0 +1,130 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package secretsmanageriface provides an interface to enable mocking the AWS Secrets Manager 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 secretsmanageriface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/secretsmanager"
|
||||
)
|
||||
|
||||
// SecretsManagerAPI provides an interface to enable mocking the
|
||||
// secretsmanager.SecretsManager 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 Secrets Manager.
|
||||
// func myFunc(svc secretsmanageriface.SecretsManagerAPI) bool {
|
||||
// // Make svc.CancelRotateSecret request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := secretsmanager.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockSecretsManagerClient struct {
|
||||
// secretsmanageriface.SecretsManagerAPI
|
||||
// }
|
||||
// func (m *mockSecretsManagerClient) CancelRotateSecret(input *secretsmanager.CancelRotateSecretInput) (*secretsmanager.CancelRotateSecretOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockSecretsManagerClient{}
|
||||
//
|
||||
// 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 SecretsManagerAPI interface {
|
||||
CancelRotateSecret(*secretsmanager.CancelRotateSecretInput) (*secretsmanager.CancelRotateSecretOutput, error)
|
||||
CancelRotateSecretWithContext(aws.Context, *secretsmanager.CancelRotateSecretInput, ...request.Option) (*secretsmanager.CancelRotateSecretOutput, error)
|
||||
CancelRotateSecretRequest(*secretsmanager.CancelRotateSecretInput) (*request.Request, *secretsmanager.CancelRotateSecretOutput)
|
||||
|
||||
CreateSecret(*secretsmanager.CreateSecretInput) (*secretsmanager.CreateSecretOutput, error)
|
||||
CreateSecretWithContext(aws.Context, *secretsmanager.CreateSecretInput, ...request.Option) (*secretsmanager.CreateSecretOutput, error)
|
||||
CreateSecretRequest(*secretsmanager.CreateSecretInput) (*request.Request, *secretsmanager.CreateSecretOutput)
|
||||
|
||||
DeleteSecret(*secretsmanager.DeleteSecretInput) (*secretsmanager.DeleteSecretOutput, error)
|
||||
DeleteSecretWithContext(aws.Context, *secretsmanager.DeleteSecretInput, ...request.Option) (*secretsmanager.DeleteSecretOutput, error)
|
||||
DeleteSecretRequest(*secretsmanager.DeleteSecretInput) (*request.Request, *secretsmanager.DeleteSecretOutput)
|
||||
|
||||
DescribeSecret(*secretsmanager.DescribeSecretInput) (*secretsmanager.DescribeSecretOutput, error)
|
||||
DescribeSecretWithContext(aws.Context, *secretsmanager.DescribeSecretInput, ...request.Option) (*secretsmanager.DescribeSecretOutput, error)
|
||||
DescribeSecretRequest(*secretsmanager.DescribeSecretInput) (*request.Request, *secretsmanager.DescribeSecretOutput)
|
||||
|
||||
GetRandomPassword(*secretsmanager.GetRandomPasswordInput) (*secretsmanager.GetRandomPasswordOutput, error)
|
||||
GetRandomPasswordWithContext(aws.Context, *secretsmanager.GetRandomPasswordInput, ...request.Option) (*secretsmanager.GetRandomPasswordOutput, error)
|
||||
GetRandomPasswordRequest(*secretsmanager.GetRandomPasswordInput) (*request.Request, *secretsmanager.GetRandomPasswordOutput)
|
||||
|
||||
GetSecretValue(*secretsmanager.GetSecretValueInput) (*secretsmanager.GetSecretValueOutput, error)
|
||||
GetSecretValueWithContext(aws.Context, *secretsmanager.GetSecretValueInput, ...request.Option) (*secretsmanager.GetSecretValueOutput, error)
|
||||
GetSecretValueRequest(*secretsmanager.GetSecretValueInput) (*request.Request, *secretsmanager.GetSecretValueOutput)
|
||||
|
||||
ListSecretVersionIds(*secretsmanager.ListSecretVersionIdsInput) (*secretsmanager.ListSecretVersionIdsOutput, error)
|
||||
ListSecretVersionIdsWithContext(aws.Context, *secretsmanager.ListSecretVersionIdsInput, ...request.Option) (*secretsmanager.ListSecretVersionIdsOutput, error)
|
||||
ListSecretVersionIdsRequest(*secretsmanager.ListSecretVersionIdsInput) (*request.Request, *secretsmanager.ListSecretVersionIdsOutput)
|
||||
|
||||
ListSecretVersionIdsPages(*secretsmanager.ListSecretVersionIdsInput, func(*secretsmanager.ListSecretVersionIdsOutput, bool) bool) error
|
||||
ListSecretVersionIdsPagesWithContext(aws.Context, *secretsmanager.ListSecretVersionIdsInput, func(*secretsmanager.ListSecretVersionIdsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListSecrets(*secretsmanager.ListSecretsInput) (*secretsmanager.ListSecretsOutput, error)
|
||||
ListSecretsWithContext(aws.Context, *secretsmanager.ListSecretsInput, ...request.Option) (*secretsmanager.ListSecretsOutput, error)
|
||||
ListSecretsRequest(*secretsmanager.ListSecretsInput) (*request.Request, *secretsmanager.ListSecretsOutput)
|
||||
|
||||
ListSecretsPages(*secretsmanager.ListSecretsInput, func(*secretsmanager.ListSecretsOutput, bool) bool) error
|
||||
ListSecretsPagesWithContext(aws.Context, *secretsmanager.ListSecretsInput, func(*secretsmanager.ListSecretsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
PutSecretValue(*secretsmanager.PutSecretValueInput) (*secretsmanager.PutSecretValueOutput, error)
|
||||
PutSecretValueWithContext(aws.Context, *secretsmanager.PutSecretValueInput, ...request.Option) (*secretsmanager.PutSecretValueOutput, error)
|
||||
PutSecretValueRequest(*secretsmanager.PutSecretValueInput) (*request.Request, *secretsmanager.PutSecretValueOutput)
|
||||
|
||||
RestoreSecret(*secretsmanager.RestoreSecretInput) (*secretsmanager.RestoreSecretOutput, error)
|
||||
RestoreSecretWithContext(aws.Context, *secretsmanager.RestoreSecretInput, ...request.Option) (*secretsmanager.RestoreSecretOutput, error)
|
||||
RestoreSecretRequest(*secretsmanager.RestoreSecretInput) (*request.Request, *secretsmanager.RestoreSecretOutput)
|
||||
|
||||
RotateSecret(*secretsmanager.RotateSecretInput) (*secretsmanager.RotateSecretOutput, error)
|
||||
RotateSecretWithContext(aws.Context, *secretsmanager.RotateSecretInput, ...request.Option) (*secretsmanager.RotateSecretOutput, error)
|
||||
RotateSecretRequest(*secretsmanager.RotateSecretInput) (*request.Request, *secretsmanager.RotateSecretOutput)
|
||||
|
||||
TagResource(*secretsmanager.TagResourceInput) (*secretsmanager.TagResourceOutput, error)
|
||||
TagResourceWithContext(aws.Context, *secretsmanager.TagResourceInput, ...request.Option) (*secretsmanager.TagResourceOutput, error)
|
||||
TagResourceRequest(*secretsmanager.TagResourceInput) (*request.Request, *secretsmanager.TagResourceOutput)
|
||||
|
||||
UntagResource(*secretsmanager.UntagResourceInput) (*secretsmanager.UntagResourceOutput, error)
|
||||
UntagResourceWithContext(aws.Context, *secretsmanager.UntagResourceInput, ...request.Option) (*secretsmanager.UntagResourceOutput, error)
|
||||
UntagResourceRequest(*secretsmanager.UntagResourceInput) (*request.Request, *secretsmanager.UntagResourceOutput)
|
||||
|
||||
UpdateSecret(*secretsmanager.UpdateSecretInput) (*secretsmanager.UpdateSecretOutput, error)
|
||||
UpdateSecretWithContext(aws.Context, *secretsmanager.UpdateSecretInput, ...request.Option) (*secretsmanager.UpdateSecretOutput, error)
|
||||
UpdateSecretRequest(*secretsmanager.UpdateSecretInput) (*request.Request, *secretsmanager.UpdateSecretOutput)
|
||||
|
||||
UpdateSecretVersionStage(*secretsmanager.UpdateSecretVersionStageInput) (*secretsmanager.UpdateSecretVersionStageOutput, error)
|
||||
UpdateSecretVersionStageWithContext(aws.Context, *secretsmanager.UpdateSecretVersionStageInput, ...request.Option) (*secretsmanager.UpdateSecretVersionStageOutput, error)
|
||||
UpdateSecretVersionStageRequest(*secretsmanager.UpdateSecretVersionStageInput) (*request.Request, *secretsmanager.UpdateSecretVersionStageOutput)
|
||||
}
|
||||
|
||||
var _ SecretsManagerAPI = (*secretsmanager.SecretsManager)(nil)
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package secretsmanager
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// SecretsManager provides the API operation methods for making requests to
|
||||
// AWS Secrets Manager. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// SecretsManager methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type SecretsManager 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 = "secretsmanager" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the SecretsManager 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 SecretsManager client from just a session.
|
||||
// svc := secretsmanager.New(mySession)
|
||||
//
|
||||
// // Create a SecretsManager client with additional configuration
|
||||
// svc := secretsmanager.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *SecretsManager {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "secretsmanager"
|
||||
}
|
||||
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) *SecretsManager {
|
||||
svc := &SecretsManager{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2017-10-17",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "secretsmanager",
|
||||
},
|
||||
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 SecretsManager operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *SecretsManager) 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