-
Notifications
You must be signed in to change notification settings - Fork 40
/
client.go
38 lines (30 loc) · 1.42 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
package v2016_06_01
import (
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connectiongateways"
"github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/connections"
"github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/customapis"
"github.com/hashicorp/go-azure-sdk/resource-manager/web/2016-06-01/managedapis"
)
type Client struct {
ConnectionGateways *connectiongateways.ConnectionGatewaysClient
Connections *connections.ConnectionsClient
CustomAPIs *customapis.CustomAPIsClient
ManagedAPIs *managedapis.ManagedAPIsClient
}
func NewClientWithBaseURI(endpoint string, configureAuthFunc func(c *autorest.Client)) Client {
connectionGatewaysClient := connectiongateways.NewConnectionGatewaysClientWithBaseURI(endpoint)
configureAuthFunc(&connectionGatewaysClient.Client)
connectionsClient := connections.NewConnectionsClientWithBaseURI(endpoint)
configureAuthFunc(&connectionsClient.Client)
customAPIsClient := customapis.NewCustomAPIsClientWithBaseURI(endpoint)
configureAuthFunc(&customAPIsClient.Client)
managedAPIsClient := managedapis.NewManagedAPIsClientWithBaseURI(endpoint)
configureAuthFunc(&managedAPIsClient.Client)
return Client{
ConnectionGateways: &connectionGatewaysClient,
Connections: &connectionsClient,
CustomAPIs: &customAPIsClient,
ManagedAPIs: &managedAPIsClient,
}
}