API: Add service account routes to the swagger (#52398)
* API: Add service account routes to the swagger
This commit is contained in:
@@ -20,14 +20,22 @@ const (
|
||||
ServiceID = "sa"
|
||||
)
|
||||
|
||||
// swagger:model
|
||||
type TokenDTO struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Created *time.Time `json:"created"`
|
||||
LastUsedAt *time.Time `json:"lastUsedAt"`
|
||||
Expiration *time.Time `json:"expiration"`
|
||||
SecondsUntilExpiration *float64 `json:"secondsUntilExpiration"`
|
||||
HasExpired bool `json:"hasExpired"`
|
||||
// example: 1
|
||||
Id int64 `json:"id"`
|
||||
// example: grafana
|
||||
Name string `json:"name"`
|
||||
// example: 2022-03-23T10:31:02Z
|
||||
Created *time.Time `json:"created"`
|
||||
// example: 2022-03-23T10:31:02Z
|
||||
LastUsedAt *time.Time `json:"lastUsedAt"`
|
||||
// example: 2022-03-23T10:31:02Z
|
||||
Expiration *time.Time `json:"expiration"`
|
||||
// example: 0
|
||||
SecondsUntilExpiration *float64 `json:"secondsUntilExpiration"`
|
||||
// example: false
|
||||
HasExpired bool `json:"hasExpired"`
|
||||
}
|
||||
|
||||
func hasExpired(expiration *int64) bool {
|
||||
|
||||
Reference in New Issue
Block a user