auth

package module
v0.0.0-...-2be7981 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2020 License: MPL-2.0 Imports: 3 Imported by: 1

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 GetSignature

func GetSignature(auth *Auth, signing string) (string, error)

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. DELME

Types

type Auth

type Auth struct {
	User   string // for future use
	Pass   string // for future use
	ApiKey string
}

func NewAuth

func NewAuth(user string, pass string, apikey string) (*Auth, error)

NewAuth creates a new Auth. func NewAuth(user, privateKey, algorithm string) (*Auth, error) { DELME

type Credentials

type Credentials struct {
	UserAuthentication *Auth
	//SdcKeyId           string //DELME
	//SdcEndpoint        Endpoint //DELME
	ApiEndpoint    Endpoint
	VirtDatacenter string // virtual datacenter for executing all funcions

}

func (*Credentials) Region

func (cred *Credentials) Region() string

type Endpoint

type Endpoint struct {
	URL string
}

type PrivateKey

type PrivateKey struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL