Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Authorization Headers SdcSignature = "Signature keyId=\"/%s/keys/%s\",algorithm=\"%s\" %s" MantaSignature = "Signature keyId=\"/%s/keys/%s\",algorithm=\"%s\",signature=\"%s\"" )
Variables ¶
This section is empty.
Functions ¶
func CreateAuthorizationHeader ¶
func CreateAuthorizationHeader(headers http.Header, credentials *Credentials, isMantaRequest bool) (string, error)
The CreateAuthorizationHeader returns the Authorization header for the give request.
func GetSignature ¶
The GetSignature method signs the specified key according to http://apidocs.joyent.com/cloudapi/#issuing-requests and http://apidocs.joyent.com/manta/api.html#authentication.
Types ¶
type Auth ¶
type Auth struct { User string PrivateKey PrivateKey Algorithm string }
type Credentials ¶
type Credentials struct { UserAuthentication *Auth SdcKeyId string SdcEndpoint Endpoint MantaKeyId string MantaEndpoint Endpoint }
func (*Credentials) Region ¶
func (cred *Credentials) Region() string
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.