forked from selectel/craas-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschemas.go
More file actions
30 lines (25 loc) · 816 Bytes
/
schemas.go
File metadata and controls
30 lines (25 loc) · 816 Bytes
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
package tokenv2
import "time"
type TokenV2 struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
Expiration Expiration `json:"expiration"`
Scope Scope `json:"scope"`
Status string `json:"status,omitempty"`
Token string `json:"token,omitempty"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`
}
type Scope struct {
ModeRW bool `json:"modeRW"`
AllRegistries bool `json:"allRegistries"`
RegistryIDs []string `json:"registryIds,omitempty"`
}
type Expiration struct {
IsSet bool `json:"isSet"`
ExpiresAt time.Time `json:"expiresAt,omitempty"`
}
type TokensV2 struct {
Tokens []TokenV2 `json:"tokens"`
TotalCount int64 `json:"totalCount"`
}