Versions in this module Expand all Collapse all v0 v0.0.4 Nov 2, 2015 v0.0.3 Nov 1, 2015 Changes in this version + const API_KEY + const AUTH_SEP + const CONTENT_MD5 + const CONTENT_TYPE + const DURATION + const HOST + const XNONCE + const XTIME + func ErrMsg(msg string) map[string]string + func HMACAuth(o *HmacOpts) echo.HandlerFunc + type Account struct + Id string + Name string + type AtmClient struct + ApiKey string + ApiSecret string + AtmHost string + func (c *AtmClient) RequestTempUrl(method, account, container, object string) (string, error) + type Authorizor struct + ApiKey string + Md5 string + Method string + Nonce string + Opts *HmacOpts + Signature string + Timestamp time.Time + Type string + Uri string + Xtime string + func AuthorizorForRequest(o *HmacOpts, method string, uri string) *Authorizor + func (a *Authorizor) Authentic(r *http.Request) error + func (a *Authorizor) SignatureWith(key string) string + func (a *Authorizor) SigningString() string + type Cache map[string]*shard + func NewCache() *Cache + func (c *Cache) Delete(key string) + func (c *Cache) Get(key string) (interface{}, bool) + func (c *Cache) Set(key string, data interface{}) + type Datastore struct + func NewDatastore(driver, dsn string) (*Datastore, error) + func (d *Datastore) Account(name string) (*Account, error) + func (d *Datastore) AddSigningKeyForAccount(key, account string) + func (d *Datastore) ApiKeySecret(apiKey string) (string, error) + func (d *Datastore) Close() error + func (d *Datastore) KeyForRequest(u *UrlRequest, appId string) (string, int64, error) + func (d *Datastore) Ping() error + func (d *Datastore) RemoveSigningKeyForAccount(account string) + type ExpiringCache struct + func NewExpiringCache(scrubInterval time.Duration) *ExpiringCache + func (c *ExpiringCache) Get(k string) (interface{}, bool) + func (c *ExpiringCache) Set(k string, v interface{}, d time.Duration) + func (c ExpiringCache) DeleteExpired() + type HmacOpts struct + AuthPrefix string + Expiration time.Duration + NonceChecker NonceChecker + SecretKeyFor KeyFinder + func NewHmacOpts(f KeyFinder, nc NonceChecker) *HmacOpts + type KeyFinder func(string) (string, error) + type NonceChecker interface + Add func(string) + Valid func(string) bool + type NonceStore struct + func NewNonceStore() NonceStore + func (d NonceStore) Add(n string) + func (d NonceStore) Valid(n string) bool + type Server struct + Default_duration int64 + Ds *Datastore + Nonces NonceChecker + Object_host string + func (a *Server) Run() + type Tmpurl struct + Path string + Url string + type UrlRequest struct + Account string + Container string + Duration int64 + Host string + Key string + Method string + Object string + func (u *UrlRequest) Path() string + func (u *UrlRequest) SignedUrl() string + func (u *UrlRequest) Valid() bool