-
Notifications
You must be signed in to change notification settings - Fork 1
/
quotas.go
36 lines (28 loc) · 900 Bytes
/
quotas.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
package globalsign
import (
"net/http"
)
// QuotasResponse GlobalSign API response of `/quotas/signatures` and `/quotas/timestamps` endpoint.
type QuotasResponse struct {
Value int `json:"value"`
}
// QuotasSignatures GlobalSign DSS quotas/signatures API service.
func (s *globalSignDSSService) QuotasSignatures() (*QuotasResponse, error) {
path := baseAPI + "/quotas/signatures"
result := new(QuotasResponse)
err := s.client.DoNewRequest(http.MethodGet, path, result, struct{}{})
if err != nil {
return nil, err
}
return result, nil
}
// QuotasTimestamps GlobalSign DSS quotas/timestamps API service.
func (s *globalSignDSSService) QuotasTimestamps() (*QuotasResponse, error) {
path := baseAPI + "/quotas/timestamps"
result := new(QuotasResponse)
err := s.client.DoNewRequest(http.MethodGet, path, result, struct{}{})
if err != nil {
return nil, err
}
return result, nil
}