Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrObjectNotFound = ¬Found{"Object not found"} ErrProjectNotFound = errors.New("Project not found") ErrUserNotFound = errors.New("Unable to find user") )
View Source
var ErrNotAuthenticated = authError{errors.New("Forbidden")}
Functions ¶
func EncryptPass ¶
func IsAuthError ¶
func IsObjectNotFound ¶
Types ¶
type BatchVars ¶
type BatchVars struct {
Objects []*RequestVars `json:"objects"`
}
type GenericMetaStore ¶
type GenericMetaStore interface { Put(v *RequestVars) (*Object, error) Get(v *RequestVars) (*Object, error) GetPending(v *RequestVars) (*Object, error) Commit(v *RequestVars) (*Object, error) Close() DeleteUser(user string) error AddUser(user, pass string) error AddProject(projectName string) error Users() ([]*User, error) Objects() ([]*Object, error) Projects() ([]*Project, error) Authenticate(string, string) (bool, error) }
Wrapper for MetaStore so we can use different types
type Object ¶
type Object struct { Oid string `json:"oid" cql:"oid"` Size int64 `json:"size" cql:"size"` ProjectNames []string `json:"project_names"` Existing bool }
MetaObject is object metadata as seen by the object and metadata stores.
type RequestVars ¶
type RequestVars struct { Oid string Size int64 User string Password string Namespace string Repo string Authorization string }
RequestVars contain variables from the HTTP request. Variables from routing, json body decoding, and some headers are stored.
func (*RequestVars) ObjectLink ¶
func (v *RequestVars) ObjectLink(scheme, host string) string
func (*RequestVars) VerifyLink ¶
func (v *RequestVars) VerifyLink(scheme, host string) string
Click to show internal directories.
Click to hide internal directories.