store

package
v0.0.0-...-9fc6fd2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InMemory = NewDBMemory() // Global for testing purposes, allows a single db to be shared across test instances

Functions

This section is empty.

Types

type BackgroundProcessStore

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

func (*BackgroundProcessStore) AddBackgroundProcess

func (*BackgroundProcessStore) DeleteBackgroundProcess

func (s *BackgroundProcessStore) DeleteBackgroundProcess(id string) error

func (*BackgroundProcessStore) GetBackgroundProcess

func (s *BackgroundProcessStore) GetBackgroundProcess(id string) (model.BackgroundProcessSchema, error)

func (*BackgroundProcessStore) GetListBackgroundProcess

func (s *BackgroundProcessStore) GetListBackgroundProcess(bpGetListModel model.GetListBackgroundProcessModel) ([]model.BackgroundProcessSchema, error)

func (*BackgroundProcessStore) SetFinishedBackgroundProcess

func (s *BackgroundProcessStore) SetFinishedBackgroundProcess(id string, done bool) error

func (*BackgroundProcessStore) SetOkBackgroundProcess

func (s *BackgroundProcessStore) SetOkBackgroundProcess(id string, done bool) error

func (*BackgroundProcessStore) UpdateStatusBackgroundProcess

func (s *BackgroundProcessStore) UpdateStatusBackgroundProcess(id string, status string, message string) error

type DB

type DB interface {
	ProjectsStore() *ProjectsStore
	UsersStore() *UsersStore
	DatafilesStore() *DatafilesStore
	DatadirsStore() *DatadirsStore
	FileLoadsStore() *FileLoadsStore
	GlobusUploadsStore() *GlobusUploadsStore
	BackgroundProcessStore() *BackgroundProcessStore
	ExperimentsStore() *ExperimentsStore
	DatasetsStore() *DatasetsStore
}

type DBMemory

type DBMemory struct {
	DBProj              map[string]model.ProjectSchema
	DBUsers             map[string]model.UserSchema
	DBDatadirs          map[string]model.DatadirSchema
	DBDatafiles         map[string]storengine.DatafileSchemaInMemory
	DBFileLoads         map[string]model.FileLoadSchema
	DBGlobusUploads     map[string]model.GlobusUploadSchema
	DBBackgroundProcess map[string]model.BackgroundProcessSchema
	DBExperiments       map[string]model.ExperimentSchema
	DBDatasets          map[string]model.DatasetSchema
}

func NewDBMemory

func NewDBMemory() *DBMemory

func (*DBMemory) BackgroundProcessStore

func (db *DBMemory) BackgroundProcessStore() *BackgroundProcessStore

func (*DBMemory) DatadirsStore

func (db *DBMemory) DatadirsStore() *DatadirsStore

func (*DBMemory) DatafilesStore

func (db *DBMemory) DatafilesStore() *DatafilesStore

func (*DBMemory) DatasetsStore

func (db *DBMemory) DatasetsStore() *DatasetsStore

func (*DBMemory) ExperimentsStore

func (db *DBMemory) ExperimentsStore() *ExperimentsStore

func (*DBMemory) FileLoadsStore

func (db *DBMemory) FileLoadsStore() *FileLoadsStore

func (*DBMemory) GlobusUploadsStore

func (db *DBMemory) GlobusUploadsStore() *GlobusUploadsStore

func (*DBMemory) ProjectsStore

func (db *DBMemory) ProjectsStore() *ProjectsStore

func (*DBMemory) UsersStore

func (db *DBMemory) UsersStore() *UsersStore

type DBRethinkdb

type DBRethinkdb struct {
	Session *r.Session
}

func NewDBRethinkdb

func NewDBRethinkdb(session *r.Session) *DBRethinkdb

func (*DBRethinkdb) BackgroundProcessStore

func (db *DBRethinkdb) BackgroundProcessStore() *BackgroundProcessStore

func (*DBRethinkdb) DatadirsStore

func (db *DBRethinkdb) DatadirsStore() *DatadirsStore

func (*DBRethinkdb) DatafilesStore

func (db *DBRethinkdb) DatafilesStore() *DatafilesStore

func (*DBRethinkdb) DatasetsStore

func (db *DBRethinkdb) DatasetsStore() *DatasetsStore

func (*DBRethinkdb) ExperimentsStore

func (db *DBRethinkdb) ExperimentsStore() *ExperimentsStore

func (*DBRethinkdb) FileLoadsStore

func (db *DBRethinkdb) FileLoadsStore() *FileLoadsStore

func (*DBRethinkdb) GlobusUploadsStore

func (db *DBRethinkdb) GlobusUploadsStore() *GlobusUploadsStore

func (*DBRethinkdb) ProjectsStore

func (db *DBRethinkdb) ProjectsStore() *ProjectsStore

func (*DBRethinkdb) UsersStore

func (db *DBRethinkdb) UsersStore() *UsersStore

type DatadirsStore

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

func (*DatadirsStore) AddDatadir

func (s *DatadirsStore) AddDatadir(ddModel model.AddDatadirModel) (model.DatadirSchema, error)

func (*DatadirsStore) GetDatadirByID

func (s *DatadirsStore) GetDatadirByID(id string) (model.DatadirSchema, error)

func (*DatadirsStore) GetDatadirByPathInProject

func (s *DatadirsStore) GetDatadirByPathInProject(path, projectID string) (model.DatadirSchema, error)

func (*DatadirsStore) GetDatadirForProject

func (s *DatadirsStore) GetDatadirForProject(projectID, userID, dirID string) (model.DatadirEntryModel, error)

func (*DatadirsStore) GetDatadirsForProject

func (s *DatadirsStore) GetDatadirsForProject(projectID, userID string) ([]model.DatadirEntryModel, error)

func (*DatadirsStore) GetFilesForDatadir

func (s *DatadirsStore) GetFilesForDatadir(projectID, userID, dirID string) ([]model.DatafileSimpleModel, error)

type DatafilesStore

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

func (*DatafilesStore) AddDatafile

func (s *DatafilesStore) AddDatafile(dfModel model.AddDatafileModel) (model.DatafileSchema, error)

func (*DatafilesStore) GetDatafileByID

func (s *DatafilesStore) GetDatafileByID(id string) (model.DatafileSchema, error)

func (*DatafilesStore) GetDatafileInDir

func (s *DatafilesStore) GetDatafileInDir(name, datadirID string) (model.DatafileSchema, error)

func (*DatafilesStore) GetDatafileWithChecksum

func (s *DatafilesStore) GetDatafileWithChecksum(checksum string) (model.DatafileSchema, error)

func (*DatafilesStore) UpdateDatafileCurrentFlag

func (s *DatafilesStore) UpdateDatafileCurrentFlag(id string, current bool) error

type DatasetsStore

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

func (*DatasetsStore) GetDatadirsForDataset

func (s *DatasetsStore) GetDatadirsForDataset(datasetID string) ([]model.DatadirEntryModel, error)

func (*DatasetsStore) GetDataset

func (s *DatasetsStore) GetDataset(datasetID string) (model.DatasetSchema, error)

func (*DatasetsStore) SetDatasetZipfile

func (s *DatasetsStore) SetDatasetZipfile(datasetID string, size int64, name string) error

type ExperimentsStore

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

func (*ExperimentsStore) GetExperimentOverviewsForProject

func (s *ExperimentsStore) GetExperimentOverviewsForProject(projectID string) ([]model.ExperimentOverviewModel, error)

type FileLoadsStore

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

func (*FileLoadsStore) AddFileLoad

func (s *FileLoadsStore) AddFileLoad(flModel model.AddFileLoadModel) (model.FileLoadSchema, error)

func (*FileLoadsStore) DeleteFileLoad

func (s *FileLoadsStore) DeleteFileLoad(id string) error

func (*FileLoadsStore) GetAllFileLoads

func (s *FileLoadsStore) GetAllFileLoads() ([]model.FileLoadSchema, error)

func (*FileLoadsStore) GetFileLoad

func (s *FileLoadsStore) GetFileLoad(id string) (model.FileLoadSchema, error)

func (*FileLoadsStore) MarkAllNotLoading

func (s *FileLoadsStore) MarkAllNotLoading() error

func (*FileLoadsStore) UpdateLoading

func (s *FileLoadsStore) UpdateLoading(id string, loading bool) error

type GlobusUploadsStore

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

func (*GlobusUploadsStore) AddGlobusUpload

func (*GlobusUploadsStore) DeleteGlobusUpload

func (s *GlobusUploadsStore) DeleteGlobusUpload(id string) error

func (*GlobusUploadsStore) GetAllGlobusUploads

func (s *GlobusUploadsStore) GetAllGlobusUploads() ([]model.GlobusUploadSchema, error)

func (*GlobusUploadsStore) GetAllGlobusUploadsForUser

func (s *GlobusUploadsStore) GetAllGlobusUploadsForUser(user string) ([]model.GlobusUploadSchema, error)

func (*GlobusUploadsStore) GetGlobusUpload

func (s *GlobusUploadsStore) GetGlobusUpload(id string) (model.GlobusUploadSchema, error)

type ProjectsStore

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

func (*ProjectsStore) AddProject

func (s *ProjectsStore) AddProject(pModel model.AddProjectModel) (model.ProjectSchema, error)

func (*ProjectsStore) GetProjectSimple

func (s *ProjectsStore) GetProjectSimple(id string) (model.ProjectSimpleModel, error)

func (*ProjectsStore) GetProjectUsers

func (s *ProjectsStore) GetProjectUsers(id string) ([]model.UserSchema, error)

type UsersStore

type UsersStore struct {
	UsersStoreEngine storengine.UsersStoreEngine
}

func NewUsersStore

func NewUsersStore(e storengine.UsersStoreEngine) *UsersStore

func (*UsersStore) AddUser

func (s *UsersStore) AddUser(userModel model.AddUserModel) (user model.UserSchema, err error)

func (*UsersStore) GetAndVerifyUser

func (s *UsersStore) GetAndVerifyUser(id, password string) (model.UserSchema, error)

func (*UsersStore) GetUserByAPIKey

func (s *UsersStore) GetUserByAPIKey(apikey string) (model.UserSchema, error)

func (*UsersStore) GetUserByID

func (s *UsersStore) GetUserByID(id string) (model.UserSchema, error)

func (*UsersStore) ModifyUserAPIKey

func (s *UsersStore) ModifyUserAPIKey(id string) (model.UserSchema, error)

func (*UsersStore) ModifyUserFullname

func (s *UsersStore) ModifyUserFullname(id, fullname string) (model.UserSchema, error)

func (*UsersStore) ModifyUserPassword

func (s *UsersStore) ModifyUserPassword(id, password string) (model.UserSchema, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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