generated from ZEISS/template-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacs.go
39 lines (33 loc) · 788 Bytes
/
acs.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
package acs
import (
"net/http"
"github.com/zeiss/carry"
"github.com/zeiss/go-acs/calls"
"github.com/zeiss/go-acs/identities"
"github.com/zeiss/go-acs/sms"
)
// DefaultVersion
var DefaultVersion = struct {
APIVersion string `url:"api-version"`
}{
APIVersion: "2024-06-15-preview",
}
// Client is the client for the ACS API.
type Client struct {
SMS *sms.Service
Call *calls.Service
Identity *identities.Service
}
// New creates a new Client.
func New(endpointURL, key string, c *http.Client) *Client {
base := carry.New().
Client(c).
Base(endpointURL).
QueryStruct(DefaultVersion).
SignProvider(carry.NewHMacSigner(key))
return &Client{
SMS: sms.NewService(base),
Identity: identities.NewService(base),
Call: calls.NewService(base),
}
}