update the golang compiler version and the versions of several dependencies

Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
This commit is contained in:
Tariq Ibrahim 2019-06-19 22:39:19 -07:00
parent 84f47e7bb3
commit afe29bb697
No known key found for this signature in database
GPG key ID: DFC94E4A008B908A
209 changed files with 31657 additions and 7738 deletions

15
vendor/github.com/ncw/swift/auth.go generated vendored
View file

@ -6,6 +6,7 @@ import (
"net/http"
"net/url"
"strings"
"time"
)
// Auth defines the operations needed to authenticate with swift
@ -25,6 +26,11 @@ type Authenticator interface {
CdnUrl() string
}
// Expireser is an optional interface to read the expiration time of the token
type Expireser interface {
Expires() time.Time
}
type CustomEndpointAuthenticator interface {
StorageUrlForEndpoint(endpointType EndpointType) string
}
@ -240,6 +246,15 @@ func (auth *v2Auth) Token() string {
return auth.Auth.Access.Token.Id
}
// v2 Authentication - read expires
func (auth *v2Auth) Expires() time.Time {
t, err := time.Parse(time.RFC3339, auth.Auth.Access.Token.Expires)
if err != nil {
return time.Time{} // return Zero if not parsed
}
return t
}
// v2 Authentication - read cdn url
func (auth *v2Auth) CdnUrl() string {
return auth.endpointUrl("rax:object-cdn", EndpointTypePublic)