Documentation ¶
Overview ¶
Package azkeyvault is a generated GoMock package.
Index ¶
- Constants
- func GetTLSCertificate(ctx context.Context, certClient CertificatesClient, keysClient KeysClient, ...) (*tls.Certificate, error)
- func NewCertificatesClient(keyVaultURL string, credentialType string, insecure bool) (*azcertificates.Client, error)
- func NewKeysClient(keyVaultURL string, credentialType string, insecure bool) (*azkeys.Client, error)
- type CertificatesClient
- type HttpRequestDoer
- type KeysClient
- type MockCertificatesClient
- type MockCertificatesClientMockRecorder
- type MockKeysClient
- func (m *MockKeysClient) Decrypt(ctx context.Context, keyName, keyVersion string, ...) (azkeys.DecryptResponse, error)
- func (m *MockKeysClient) EXPECT() *MockKeysClientMockRecorder
- func (m *MockKeysClient) GetKey(ctx context.Context, name, version string, options *azkeys.GetKeyOptions) (azkeys.GetKeyResponse, error)
- func (m *MockKeysClient) Sign(ctx context.Context, name, version string, parameters azkeys.SignParameters, ...) (azkeys.SignResponse, error)
- type MockKeysClientMockRecorder
- func (mr *MockKeysClientMockRecorder) Decrypt(ctx, keyName, keyVersion, parameters, options any) *gomock.Call
- func (mr *MockKeysClientMockRecorder) GetKey(ctx, name, version, options any) *gomock.Call
- func (mr *MockKeysClientMockRecorder) Sign(ctx, name, version, parameters, options any) *gomock.Call
- type Suite
- func GetCertificate(ctx context.Context, certClient CertificatesClient, keysClient KeysClient, ...) (*x509.Certificate, *Suite, error)
- func GetCertificateChain(ctx context.Context, certClient CertificatesClient, keysClient KeysClient, ...) ([][]byte, *Suite, error)
- func GetKey(client KeysClient, keyName string) (*Suite, error)
- func GetSignatureCertificate(ctx context.Context, certClient CertificatesClient, keysClient KeysClient, ...) (*tls.Certificate, *Suite, error)
- func (s Suite) DecryptRsaOaep(cipherText []byte, dm libCrypto.DigestMethod) ([]byte, error)
- func (a Suite) KeyID() string
- func (a Suite) Public() crypto.PublicKey
- func (a Suite) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)
- func (a Suite) SigningAlgorithm() string
- func (s Suite) SigningKey() crypto.Signer
- type TestAzureKeyVault
Constants ¶
const AzureKeyVaultTimeout = 10 * time.Second
Variables ¶
This section is empty.
Functions ¶
func GetTLSCertificate ¶
func GetTLSCertificate(ctx context.Context, certClient CertificatesClient, keysClient KeysClient, certificateName string) (*tls.Certificate, error)
func NewCertificatesClient ¶
Types ¶
type CertificatesClient ¶
type CertificatesClient interface {
GetCertificate(ctx context.Context, certificateName string, certificateVersion string, options *azcertificates.GetCertificateOptions) (azcertificates.GetCertificateResponse, error)
}
type HttpRequestDoer ¶
var AzureHttpRequestDoer HttpRequestDoer = http.DefaultClient
type KeysClient ¶
type KeysClient interface { Decrypt(ctx context.Context, keyName string, keyVersion string, parameters azkeys.KeyOperationParameters, options *azkeys.DecryptOptions) (azkeys.DecryptResponse, error) GetKey(ctx context.Context, name string, version string, options *azkeys.GetKeyOptions) (azkeys.GetKeyResponse, error) Sign(ctx context.Context, name string, version string, parameters azkeys.SignParameters, options *azkeys.SignOptions) (azkeys.SignResponse, error) }
type MockCertificatesClient ¶
type MockCertificatesClient struct {
// contains filtered or unexported fields
}
MockCertificatesClient is a mock of CertificatesClient interface.
func NewMockCertificatesClient ¶
func NewMockCertificatesClient(ctrl *gomock.Controller) *MockCertificatesClient
NewMockCertificatesClient creates a new mock instance.
func (*MockCertificatesClient) EXPECT ¶
func (m *MockCertificatesClient) EXPECT() *MockCertificatesClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCertificatesClient) GetCertificate ¶
func (m *MockCertificatesClient) GetCertificate(ctx context.Context, certificateName, certificateVersion string, options *azcertificates.GetCertificateOptions) (azcertificates.GetCertificateResponse, error)
GetCertificate mocks base method.
type MockCertificatesClientMockRecorder ¶
type MockCertificatesClientMockRecorder struct {
// contains filtered or unexported fields
}
MockCertificatesClientMockRecorder is the mock recorder for MockCertificatesClient.
func (*MockCertificatesClientMockRecorder) GetCertificate ¶
func (mr *MockCertificatesClientMockRecorder) GetCertificate(ctx, certificateName, certificateVersion, options any) *gomock.Call
GetCertificate indicates an expected call of GetCertificate.
type MockKeysClient ¶
type MockKeysClient struct {
// contains filtered or unexported fields
}
MockKeysClient is a mock of KeysClient interface.
func NewMockKeysClient ¶
func NewMockKeysClient(ctrl *gomock.Controller) *MockKeysClient
NewMockKeysClient creates a new mock instance.
func (*MockKeysClient) Decrypt ¶
func (m *MockKeysClient) Decrypt(ctx context.Context, keyName, keyVersion string, parameters azkeys.KeyOperationParameters, options *azkeys.DecryptOptions) (azkeys.DecryptResponse, error)
Decrypt mocks base method.
func (*MockKeysClient) EXPECT ¶
func (m *MockKeysClient) EXPECT() *MockKeysClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockKeysClient) GetKey ¶
func (m *MockKeysClient) GetKey(ctx context.Context, name, version string, options *azkeys.GetKeyOptions) (azkeys.GetKeyResponse, error)
GetKey mocks base method.
func (*MockKeysClient) Sign ¶
func (m *MockKeysClient) Sign(ctx context.Context, name, version string, parameters azkeys.SignParameters, options *azkeys.SignOptions) (azkeys.SignResponse, error)
Sign mocks base method.
type MockKeysClientMockRecorder ¶
type MockKeysClientMockRecorder struct {
// contains filtered or unexported fields
}
MockKeysClientMockRecorder is the mock recorder for MockKeysClient.
func (*MockKeysClientMockRecorder) Decrypt ¶
func (mr *MockKeysClientMockRecorder) Decrypt(ctx, keyName, keyVersion, parameters, options any) *gomock.Call
Decrypt indicates an expected call of Decrypt.
type Suite ¶
type Suite struct {
// contains filtered or unexported fields
}
func GetCertificate ¶
func GetCertificate(ctx context.Context, certClient CertificatesClient, keysClient KeysClient, certificateName string) (*x509.Certificate, *Suite, error)
func GetCertificateChain ¶
func GetCertificateChain(ctx context.Context, certClient CertificatesClient, keysClient KeysClient, certificateName string) ([][]byte, *Suite, error)
GetCertificateChain retrieves the full chain from Azure Key Vault
func GetSignatureCertificate ¶
func GetSignatureCertificate(ctx context.Context, certClient CertificatesClient, keysClient KeysClient, certificateName string) (*tls.Certificate, *Suite, error)
func (Suite) DecryptRsaOaep ¶
func (Suite) SigningAlgorithm ¶
func (a Suite) SigningAlgorithm() string
func (Suite) SigningKey ¶
type TestAzureKeyVault ¶
type TestAzureKeyVault struct { TestHttpServer *httptest.Server // contains filtered or unexported fields }
func NewTestServer ¶
func NewTestServer() *TestAzureKeyVault
func (TestAzureKeyVault) AddCertificate ¶
func (t TestAzureKeyVault) AddCertificate(name string, cert *tls.Certificate)
func (TestAzureKeyVault) AddKey ¶
func (t TestAzureKeyVault) AddKey(name string, key *rsa.PrivateKey)