tq,lfsapi/ssh: convert int64 to int
This commit is contained in:
parent
b65800a06d
commit
804a91dbd6
@ -85,7 +85,7 @@ omitted.
|
||||
to the request.
|
||||
* `expires_in` - Whole number of seconds after local client time when
|
||||
transfer will expire. Preferred over `expires_at` if both are provided.
|
||||
Maximum of 9223372036, minimum of -9223372036.
|
||||
Maximum of 2147483647, minimum of -2147483647.
|
||||
* `expires_at` - String ISO 8601 formatted timestamp for when the given
|
||||
action expires (usually due to a temporary token).
|
||||
|
||||
|
@ -58,7 +58,7 @@ type sshAuthResponse struct {
|
||||
Href string `json:"href"`
|
||||
Header map[string]string `json:"header"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
ExpiresIn int64 `json:"expires_in"`
|
||||
ExpiresIn int `json:"expires_in"`
|
||||
}
|
||||
|
||||
func (r *sshAuthResponse) IsExpiredWithin(d time.Duration) (time.Time, bool) {
|
||||
|
@ -180,7 +180,7 @@ type lfsLink struct {
|
||||
Href string `json:"href"`
|
||||
Header map[string]string `json:"header,omitempty"`
|
||||
ExpiresAt time.Time `json:"expires_at,omitempty"`
|
||||
ExpiresIn int64 `json:"expires_in,omitempty"`
|
||||
ExpiresIn int `json:"expires_in,omitempty"`
|
||||
}
|
||||
|
||||
type lfsError struct {
|
||||
|
@ -14,7 +14,7 @@ type sshResponse struct {
|
||||
Href string `json:"href"`
|
||||
Header map[string]string `json:"header"`
|
||||
ExpiresAt time.Time `json:"expires_at,omitempty"`
|
||||
ExpiresIn int64 `json:"expires_in,omitempty"`
|
||||
ExpiresIn int `json:"expires_in,omitempty"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
@ -16,8 +16,8 @@
|
||||
},
|
||||
"expires_in": {
|
||||
"type": "number",
|
||||
"maximum": 9223372036,
|
||||
"minimum": -9223372036
|
||||
"maximum": 2147483647,
|
||||
"minimum": -2147483647
|
||||
},
|
||||
"expires_at": {
|
||||
"type": "string"
|
||||
|
@ -113,7 +113,7 @@ type Action struct {
|
||||
Href string `json:"href"`
|
||||
Header map[string]string `json:"header,omitempty"`
|
||||
ExpiresAt time.Time `json:"expires_at,omitempty"`
|
||||
ExpiresIn int64 `json:"expires_in,omitempty"`
|
||||
ExpiresIn int `json:"expires_in,omitempty"`
|
||||
}
|
||||
|
||||
func (a *Action) IsExpiredWithin(d time.Duration) (time.Time, bool) {
|
||||
|
Loading…
Reference in New Issue
Block a user