-
Notifications
You must be signed in to change notification settings - Fork 40
/
client.go
86 lines (70 loc) · 4.93 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
84
85
86
package v2021_08_27
import (
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/attacheddatabaseconfigurations"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/clusterprincipalassignments"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/clusters"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/databaseprincipalassignments"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/databases"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/dataconnections"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/kusto"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/managedprivateendpoints"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/outboundnetworkdependenciesendpoints"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/privateendpointconnections"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/privatelinkresources"
"github.com/hashicorp/go-azure-sdk/resource-manager/kusto/2021-08-27/scripts"
)
type Client struct {
AttachedDatabaseConfigurations *attacheddatabaseconfigurations.AttachedDatabaseConfigurationsClient
ClusterPrincipalAssignments *clusterprincipalassignments.ClusterPrincipalAssignmentsClient
Clusters *clusters.ClustersClient
DataConnections *dataconnections.DataConnectionsClient
DatabasePrincipalAssignments *databaseprincipalassignments.DatabasePrincipalAssignmentsClient
Databases *databases.DatabasesClient
Kusto *kusto.KustoClient
ManagedPrivateEndpoints *managedprivateendpoints.ManagedPrivateEndpointsClient
OutboundNetworkDependenciesEndpoints *outboundnetworkdependenciesendpoints.OutboundNetworkDependenciesEndpointsClient
PrivateEndpointConnections *privateendpointconnections.PrivateEndpointConnectionsClient
PrivateLinkResources *privatelinkresources.PrivateLinkResourcesClient
Scripts *scripts.ScriptsClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
attachedDatabaseConfigurationsClient := attacheddatabaseconfigurations.NewAttachedDatabaseConfigurationsClientWithBaseURI(endpoint)
configureAuthFunc(&attachedDatabaseConfigurationsClient.Client)
clusterPrincipalAssignmentsClient := clusterprincipalassignments.NewClusterPrincipalAssignmentsClientWithBaseURI(endpoint)
configureAuthFunc(&clusterPrincipalAssignmentsClient.Client)
clustersClient := clusters.NewClustersClientWithBaseURI(endpoint)
configureAuthFunc(&clustersClient.Client)
dataConnectionsClient := dataconnections.NewDataConnectionsClientWithBaseURI(endpoint)
configureAuthFunc(&dataConnectionsClient.Client)
databasePrincipalAssignmentsClient := databaseprincipalassignments.NewDatabasePrincipalAssignmentsClientWithBaseURI(endpoint)
configureAuthFunc(&databasePrincipalAssignmentsClient.Client)
databasesClient := databases.NewDatabasesClientWithBaseURI(endpoint)
configureAuthFunc(&databasesClient.Client)
kustoClient := kusto.NewKustoClientWithBaseURI(endpoint)
configureAuthFunc(&kustoClient.Client)
managedPrivateEndpointsClient := managedprivateendpoints.NewManagedPrivateEndpointsClientWithBaseURI(endpoint)
configureAuthFunc(&managedPrivateEndpointsClient.Client)
outboundNetworkDependenciesEndpointsClient := outboundnetworkdependenciesendpoints.NewOutboundNetworkDependenciesEndpointsClientWithBaseURI(endpoint)
configureAuthFunc(&outboundNetworkDependenciesEndpointsClient.Client)
privateEndpointConnectionsClient := privateendpointconnections.NewPrivateEndpointConnectionsClientWithBaseURI(endpoint)
configureAuthFunc(&privateEndpointConnectionsClient.Client)
privateLinkResourcesClient := privatelinkresources.NewPrivateLinkResourcesClientWithBaseURI(endpoint)
configureAuthFunc(&privateLinkResourcesClient.Client)
scriptsClient := scripts.NewScriptsClientWithBaseURI(endpoint)
configureAuthFunc(&scriptsClient.Client)
return Client{
AttachedDatabaseConfigurations: &attachedDatabaseConfigurationsClient,
ClusterPrincipalAssignments: &clusterPrincipalAssignmentsClient,
Clusters: &clustersClient,
DataConnections: &dataConnectionsClient,
DatabasePrincipalAssignments: &databasePrincipalAssignmentsClient,
Databases: &databasesClient,
Kusto: &kustoClient,
ManagedPrivateEndpoints: &managedPrivateEndpointsClient,
OutboundNetworkDependenciesEndpoints: &outboundNetworkDependenciesEndpointsClient,
PrivateEndpointConnections: &privateEndpointConnectionsClient,
PrivateLinkResources: &privateLinkResourcesClient,
Scripts: &scriptsClient,
}
}