repo

package
v0.0.0-...-a23f117 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrJobNotFound = errors.New("job not found")

ErrJobNotFound is the error returned when no job is found

View Source
var ErrJobParticipantNotFound = errors.New("this site is not in the current job")

ErrJobParticipantNotFound is an error returned when no participant record is found

View Source
var ErrModelNotFound = errors.New("model not found")

ErrModelNotFound is the error returned when no model is found

View Source
var ErrProjectDataNotFound = errors.New("this data is not in the specified project")

ErrProjectDataNotFound is an error when no data association record found

View Source
var ErrProjectNotFound = errors.New("project not found")

ErrProjectNotFound is the error returned when no project is found

View Source
var ErrProjectParticipantNotFound = errors.New("this site is not in the current project")

ErrProjectParticipantNotFound is an error returned when no participant record is found

Functions

This section is empty.

Types

type JobParticipantRepository

type JobParticipantRepository interface {
	// Create takes an *entity.JobParticipant and save it in the repo
	Create(interface{}) error
	// UpdateStatusByUUID takes an *entity.JobParticipant and updates the status in the repo
	UpdateStatusByUUID(interface{}) error
	// GetByJobAndSiteUUID returns an *entity.JobParticipant indexed by the job and site uuid
	GetByJobAndSiteUUID(string, string) (interface{}, error)
	// GetListByJobUUID returns an []entity.JobParticipant list in the specified job
	GetListByJobUUID(string) (interface{}, error)
}

JobParticipantRepository is the interface for managing job participant in the repo

type JobRepository

type JobRepository interface {
	// Create takes an *entity.Job and creates it in the repo
	Create(interface{}) error
	// UpdateFATEJobInfoByUUID takes an *entity.Job and updates the FATE job related info
	UpdateFATEJobInfoByUUID(interface{}) error
	// UpdateFATEJobStatusByUUID takes an *entity.Job and updates the FATE job status field
	UpdateFATEJobStatusByUUID(interface{}) error
	// UpdateStatusByUUID takes an *entity.Job and updates the job status field
	UpdateStatusByUUID(interface{}) error
	// UpdateStatusMessageByUUID takes an *entity.Job and updates the job status message field
	UpdateStatusMessageByUUID(interface{}) error
	// UpdateFinishTimeByUUID takes an *entity.Job and updates the finish time
	UpdateFinishTimeByUUID(interface{}) error
	// UpdateResultInfoByUUID takes an *entity.Job and updates the result info
	UpdateResultInfoByUUID(interface{}) error
	// CheckNameConflict returns error if the same name job exists
	CheckNameConflict(string) error
	// GetAll returns []entity.Job of all not-deleted jobs
	GetAll() (interface{}, error)
	// DeleteByProjectUUID delete the job of the specified project
	DeleteByProjectUUID(string) error
	// GetListByProjectUUID returns a list of []entity.Job in the specified project
	GetListByProjectUUID(string) (interface{}, error)
	// GetByUUID returns an *entity.Job of the specified uuid
	GetByUUID(string) (interface{}, error)
}

JobRepository is the interface to manage job info in the repo

type LocalDataRepository

type LocalDataRepository interface {
	// Create save the data records, the interface should of type "*entity.LocalData"
	Create(interface{}) error
	// UpdateJobInfoByUUID changes the data upload job status
	UpdateJobInfoByUUID(interface{}) error
	// GetAll returns all the uploaded local data
	// the returned interface{} should be of type []entity.LocalData
	GetAll() (interface{}, error)
	// LoadByUUID returns a *entity.LocalData object by providing the uuid
	GetByUUID(string) (interface{}, error)
	// DeleteByUUID deletes the data record
	DeleteByUUID(string) error
	// UpdateIDMetaInfoByUUID updates the IDMetaInfo, the passed interface{} is of type entity.IDMetaInfo
	UpdateIDMetaInfoByUUID(string, interface{}) error
	// CheckNameConflict returns an error if there are name conflicts
	CheckNameConflict(string) error
}

LocalDataRepository holds methods to access local data repos The interface{} parameters in most of the functions should of type "*entity.LocalData"

type ModelDeploymentRepository

type ModelDeploymentRepository interface {
	// Create takes an *entity.ModelDeployment and save it into the repo
	Create(interface{}) error
	// UpdateStatusByUUID takes an *entity.ModelDeployment and update the status in the repo using uuid as index
	UpdateStatusByUUID(interface{}) error
	// UpdateResultJsonByUUID takes an *entity.ModelDeployment and update the resultJson in the repo using uuid as index
	UpdateResultJsonByUUID(interface{}) error
}

type ModelRepository

type ModelRepository interface {
	// Create takes an *entity.Model and save it into the repo
	Create(interface{}) error
	// GetAll returns []entity.Model of all not-deleted models
	GetAll() (interface{}, error)
	// DeleteByUUID deletes the specified model
	DeleteByUUID(string) error
	// GetListByProjectUUID returns []entity.Model belonging to the specified project
	GetListByProjectUUID(string) (interface{}, error)
	// GetByUUID returns an *entity.Model indexed by the uuid
	GetByUUID(string) (interface{}, error)
}

ModelRepository is the interface for managing models

type ProjectDataRepository

type ProjectDataRepository interface {
	// Create takes an *entity.ProjectData and create the records
	Create(interface{}) error
	// GetByProjectAndDataUUID returns an *entity.ProjectData indexed by the specified project and data uuid
	GetByProjectAndDataUUID(string, string) (interface{}, error)
	// UpdateStatusByUUID takes an *entity.ProjectData and update its status
	UpdateStatusByUUID(interface{}) error
	// GetListByProjectUUID returns []entity.ProjectData that associated in the specified project
	GetListByProjectUUID(string) (interface{}, error)
	// GetListByProjectAndSiteUUID returns []entity.ProjectData that associated in the specified project by the specified site
	GetListByProjectAndSiteUUID(string, string) (interface{}, error)
	// DeleteByUUID delete the project data records by the specified uuid
	DeleteByUUID(string) error
	// DeleteByProjectUUID delete the project data records permanently by the specified project uuid
	DeleteByProjectUUID(string) error
	// UpdateSiteInfoBySiteUUID takes an *entity.ProjectData as template to update site info of the specified site uuid
	UpdateSiteInfoBySiteUUID(interface{}) error
	// GetListByDataUUID returns []entity.ProjectData that contains the associated local data
	GetListByDataUUID(string) (interface{}, error)
	// GetByDataUUID returns an *entity.ProjectData that has the specified data uuid, it is just used for retrieving data info
	GetByDataUUID(string) (interface{}, error)
}

ProjectDataRepository is the repo interface for persisting the project data info

type ProjectInvitationRepository

type ProjectInvitationRepository interface {
	// Create takes an *entity.ProjectInvitation to create the record
	Create(interface{}) error
	// UpdateStatusByUUID takes an *entity.ProjectInvitation and updates the status
	UpdateStatusByUUID(interface{}) error
	// GetByProjectUUID returns an *entity.ProjectInvitation for the specified project. it is the latest one for the project
	GetByProjectUUID(string) (interface{}, error)
	// GetByUUID returns an *entity.ProjectInvitation indexed by the specified uuid
	GetByUUID(string) (interface{}, error)
	// GetByProjectAndSiteUUID returns the latest *entity.ProjectInvitation for the specified site and project,
	// used by the managing site
	GetByProjectAndSiteUUID(string, string) (interface{}, error)
}

ProjectInvitationRepository is an interface for working with the invitation repo

type ProjectParticipantRepository

type ProjectParticipantRepository interface {
	// CountJoinedParticipantByProjectUUID returns number of participants in joined status
	CountJoinedParticipantByProjectUUID(string) (int64, error)
	// GetByProjectUUID returns a []entity.ProjectParticipant in the specified project
	GetByProjectUUID(string) (interface{}, error)
	// Create takes an *entity.ProjectParticipant cam create the records
	Create(interface{}) error
	// GetByProjectAndSiteUUID returns an *entity.ProjectParticipant from the specified project and site uuid
	GetByProjectAndSiteUUID(string, string) (interface{}, error)
	// UpdateStatusByUUID takes an *entity.ProjectParticipant and update its status
	UpdateStatusByUUID(interface{}) error
	// DeleteByProjectUUID delete the records specified by the uui
	DeleteByProjectUUID(string) error
	// UpdateParticipantInfoBySiteUUID takes an *entity.ProjectParticipant as template and
	// updates sites info of the records containing the specified site uuid
	UpdateParticipantInfoBySiteUUID(interface{}) error
	// GetBySiteUUID returns a []entity.ProjectParticipant of the specified site
	GetBySiteUUID(string) (interface{}, error)
}

ProjectParticipantRepository is the interface to work with participant related repo

type ProjectRepository

type ProjectRepository interface {
	// Create takes an *entity.Project and create the record
	Create(interface{}) error
	// GetAll returns an []entity.Project
	GetAll() (interface{}, error)
	// GetByUUID returns an *entity.Project with the specified uuid
	GetByUUID(string) (interface{}, error)
	// DeleteByUUID deletes the project
	DeleteByUUID(string) error
	// CheckNameConflict returns an error if there are name conflicts
	CheckNameConflict(string) error
	// UpdateStatusByUUID takes an *entity.Project and update its status
	UpdateStatusByUUID(interface{}) error
	// UpdateTypeByUUID takes an *entity.Project and update its type
	UpdateTypeByUUID(interface{}) error
	// UpdateAutoApprovalStatusByUUID takes an *entity.Project and update its auto-approval status
	UpdateAutoApprovalStatusByUUID(interface{}) error
	// UpdateManagingSiteInfoBySiteUUID takes an *entity.Project as template and
	// updates site related info of all records containing the site uuid
	UpdateManagingSiteInfoBySiteUUID(interface{}) error
}

ProjectRepository is the repo interface for project

type SiteRepository

type SiteRepository interface {
	// Load site information from the underlying layer
	Load(instance interface{}) error
	// Update site information
	Update(instance interface{}) error
	// UpdateFMLManagerConnectionStatus updates fml manager related information
	UpdateFMLManagerConnectionStatus(instance interface{}) error
}

SiteRepository is the interface to handle site related information in the repo

type UserRepository

type UserRepository interface {
	// GetAllUsers returns all the saved users
	GetAllUsers() (interface{}, error)
	// CreateUser create a new user
	CreateUser(user interface{}) error
	// UpdatePermissionInfoById updates a users permission
	UpdatePermissionInfoById(id uint, info valueobject.UserPermissionInfo) error
	// LoadById loads info of a user from the repo
	LoadById(user interface{}) error
	// LoadByName loads info of a user from the repo
	LoadByName(user interface{}) error
	//UpdatePasswordById updates a users password
	UpdatePasswordById(id uint, newPassword string) error
}

UserRepository holds methods to access user repos

Jump to

Keyboard shortcuts

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