-
Notifications
You must be signed in to change notification settings - Fork 40
/
client.go
83 lines (67 loc) · 4.5 KB
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package v2023_02_01
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/keys"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsmkeys"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/managedhsms"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/mhsmlistprivateendpointconnections"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/mhsmlistregions"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/mhsmprivateendpointconnections"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/mhsmprivatelinkresources"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/privateendpointconnections"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/privatelinkresources"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/secrets"
"github.com/hashicorp/go-azure-sdk/resource-manager/keyvault/2023-02-01/vaults"
)
type Client struct {
Keys *keys.KeysClient
MHSMListPrivateEndpointConnections *mhsmlistprivateendpointconnections.MHSMListPrivateEndpointConnectionsClient
MHSMListRegions *mhsmlistregions.MHSMListRegionsClient
MHSMPrivateEndpointConnections *mhsmprivateendpointconnections.MHSMPrivateEndpointConnectionsClient
MHSMPrivateLinkResources *mhsmprivatelinkresources.MHSMPrivateLinkResourcesClient
ManagedHsmKeys *managedhsmkeys.ManagedHsmKeysClient
ManagedHsms *managedhsms.ManagedHsmsClient
PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient
PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient
Secrets *secrets.SecretsClient
Vaults *vaults.VaultsClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
keysClient := keys.NewKeysClientWithBaseURI(endpoint)
configureAuthFunc(&keysClient.Client)
mHSMListPrivateEndpointConnectionsClient := mhsmlistprivateendpointconnections.NewMHSMListPrivateEndpointConnectionsClientWithBaseURI(endpoint)
configureAuthFunc(&mHSMListPrivateEndpointConnectionsClient.Client)
mHSMListRegionsClient := mhsmlistregions.NewMHSMListRegionsClientWithBaseURI(endpoint)
configureAuthFunc(&mHSMListRegionsClient.Client)
mHSMPrivateEndpointConnectionsClient := mhsmprivateendpointconnections.NewMHSMPrivateEndpointConnectionsClientWithBaseURI(endpoint)
configureAuthFunc(&mHSMPrivateEndpointConnectionsClient.Client)
mHSMPrivateLinkResourcesClient := mhsmprivatelinkresources.NewMHSMPrivateLinkResourcesClientWithBaseURI(endpoint)
configureAuthFunc(&mHSMPrivateLinkResourcesClient.Client)
managedHsmKeysClient := managedhsmkeys.NewManagedHsmKeysClientWithBaseURI(endpoint)
configureAuthFunc(&managedHsmKeysClient.Client)
managedHsmsClient := managedhsms.NewManagedHsmsClientWithBaseURI(endpoint)
configureAuthFunc(&managedHsmsClient.Client)
privateEndpointConnectionsClient := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(endpoint)
configureAuthFunc(&privateEndpointConnectionsClient.Client)
privateLinkResourcesClient := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI(endpoint)
configureAuthFunc(&privateLinkResourcesClient.Client)
secretsClient := secrets.NewSecretsClientWithBaseURI(endpoint)
configureAuthFunc(&secretsClient.Client)
vaultsClient := vaults.NewVaultsClientWithBaseURI(endpoint)
configureAuthFunc(&vaultsClient.Client)
return Client{
Keys: &keysClient,
MHSMListPrivateEndpointConnections: &mHSMListPrivateEndpointConnectionsClient,
MHSMListRegions: &mHSMListRegionsClient,
MHSMPrivateEndpointConnections: &mHSMPrivateEndpointConnectionsClient,
MHSMPrivateLinkResources: &mHSMPrivateLinkResourcesClient,
ManagedHsmKeys: &managedHsmKeysClient,
ManagedHsms: &managedHsmsClient,
PrivateEndpointConnections: &privateEndpointConnectionsClient,
PrivateLinkResources: &privateLinkResourcesClient,
Secrets: &secretsClient,
Vaults: &vaultsClient,
}
}