-
Notifications
You must be signed in to change notification settings - Fork 43
/
client.go
44 lines (35 loc) · 1.89 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
package v2021_07_01
import (
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/account"
"github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/defaultaccount"
"github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/privateendpointconnection"
"github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/privatelinkresource"
"github.com/hashicorp/go-azure-sdk/resource-manager/purview/2021-07-01/provider"
)
type Client struct {
Account *account.AccountClient
DefaultAccount *defaultaccount.DefaultAccountClient
PrivateEndpointConnection *privateendpointconnection.PrivateEndpointConnectionClient
PrivateLinkResource *privatelinkresource.PrivateLinkResourceClient
Provider *provider.ProviderClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
accountClient := account.NewAccountClientWithBaseURI(endpoint)
configureAuthFunc(&accountClient.Client)
defaultAccountClient := defaultaccount.NewDefaultAccountClientWithBaseURI(endpoint)
configureAuthFunc(&defaultAccountClient.Client)
privateEndpointConnectionClient := privateendpointconnection.NewPrivateEndpointConnectionClientWithBaseURI(endpoint)
configureAuthFunc(&privateEndpointConnectionClient.Client)
privateLinkResourceClient := privatelinkresource.NewPrivateLinkResourceClientWithBaseURI(endpoint)
configureAuthFunc(&privateLinkResourceClient.Client)
providerClient := provider.NewProviderClientWithBaseURI(endpoint)
configureAuthFunc(&providerClient.Client)
return Client{
Account: &accountClient,
DefaultAccount: &defaultAccountClient,
PrivateEndpointConnection: &privateEndpointConnectionClient,
PrivateLinkResource: &privateLinkResourceClient,
Provider: &providerClient,
}
}