dai

package
v0.0.0-...-2be0f72 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AllProjects = false
View Source
const OwnedProjects = true

Variables

This section is empty.

Functions

func NewRDirs

func NewRDirs(session *r.Session) rDirs

NewRDirs creates a new instance of rDirs.

func NewRFiles

func NewRFiles(session *r.Session) rFiles

NewRFiles creates a new instance of rFiles

func NewRProjects

func NewRProjects(session *r.Session) rProjects

NewRProjects creates a new instance of rProjects.

func NewRUploads

func NewRUploads(session *r.Session) rUploads

NewRUploads create a new instance of rUploads.

func NewRUsers

func NewRUsers(session *r.Session) rUsers

newRUsers creates a new instance of the rUsers for RethinkDB

Types

type Dirs

type Dirs interface {
	ByID(id string) (*schema.Directory, error)
	ByPath(path, projectID string) (*schema.Directory, error)
	Files(dirID string) ([]schema.File, error)
	Insert(dir *schema.Directory) (*schema.Directory, error)
	Delete(dirID string) error
}

Dirs is an interface describing access to directories in the system.

type Files

type Files interface {
	ByID(id string) (*schema.File, error)
	ByChecksum(checksum string) (*schema.File, error)
	AllByChecksum(checksum string) ([]schema.File, error)
	ByPath(name, dirID string) (*schema.File, error)
	Insert(file *schema.File, dirID string, projectID string) (*schema.File, error)
	Update(file *schema.File) error
	UpdateFields(fileID string, fields map[string]interface{}) error
	Delete(fileID, directoryID, projectID string) (*schema.File, error)
	GetProject(fileID string) (*schema.Project, error)
	FileDatasets(fileID string) ([]schema.Dataset, error)
}

Files allows manipulation and access to file.

type Projects

type Projects interface {
	ByID(id string) (*schema.Project, error)
	ByName(name string, owner string) (*schema.Project, error)
	ForUser(user string, ownedOnly bool) ([]schema.Project, error)
	Insert(project *schema.Project) (*schema.Project, error)
	HasDirectory(projectID, directoryID string) bool
	AccessList(projectID string) ([]schema.Access, error)
}

Projects is an interface describing access to projects in the system.

type UploadSearch

type UploadSearch struct {
	ProjectID   string
	DirectoryID string
	FileName    string
	Checksum    string
}

Uploads allows manipulation and access to upload requests.

type Uploads

type Uploads interface {
	ByID(id string) (*schema.Upload, error)
	Search(params UploadSearch) (*schema.Upload, error)
	Insert(upload *schema.Upload) (*schema.Upload, error)
	Update(upload *schema.Upload) error
	ForUser(user string) ([]schema.Upload, error)
	ForProject(projectID string) ([]schema.Upload, error)
	Delete(uploadID string) error
	DeleteAll() error
}

type Users

type Users interface {
	ByID(id string) (*schema.User, error)
	ByAPIKey(apikey string) (*schema.User, error)
}

Users gives access to users.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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