-
Notifications
You must be signed in to change notification settings - Fork 46
/
client.go
32 lines (25 loc) · 956 Bytes
/
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
package dataplane
import (
"context"
"github.com/hashicorp/go-azure-sdk/sdk/client"
)
type Client struct {
Client *client.Client
// ApiVersion specifies the version of the API being used, which (by design) will be consistent across a client
// as we intentionally split out multiple API Versions into different clients, rather than using composite API
// Versions/packages which can cause confusion about which version is being used.
ApiVersion string
}
func NewDataPlaneClient(baseUri string, serviceName, apiVersion string) *Client {
client := &Client{
Client: client.NewClient(baseUri, serviceName, apiVersion),
ApiVersion: apiVersion,
}
return client
}
func (c *Client) Execute(ctx context.Context, req *client.Request) (*client.Response, error) {
return c.Client.Execute(ctx, req)
}
func (c *Client) ExecutePaged(ctx context.Context, req *client.Request) (*client.Response, error) {
return c.Client.ExecutePaged(ctx, req)
}