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: 1 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 project 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 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

View Source
var ErrSiteNameConflict = errors.New("a site with the same name but different UUID is already registered")

ErrSiteNameConflict means new site cannot be created due to the existence of the same-name site

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
	// GetStatusByUUID takes an *entity.JobParticipant and returns the status of the participant
	GetStatusByUUID(instance interface{}) interface{}
	// 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
	// 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)
	// 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
}

JobRepository is the interface to manage job info in the repo

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
}

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)
}

ProjectInvitationRepository is an interface for working with the invitation repo

type ProjectParticipantRepository

type ProjectParticipantRepository interface {
	// GetByProjectUUID returns []entity.ProjectParticipant of 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
	// 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)
	// UpdateManagingSiteInfoBySiteUUID takes an *entity.Project as template and
	// updates site related info of all records containing the site uuid
	UpdateManagingSiteInfoBySiteUUID(interface{}) error
	// UpdateStatusByUUID takes an *entity.Project and update its status
	UpdateStatusByUUID(interface{}) error
}

ProjectRepository is the repo interface for project

type SiteRepository

type SiteRepository interface {
	// GetSiteList returns all sites in []entity.Site
	GetSiteList() (interface{}, error)
	// Save creates a site info record in the repository
	Save(instance interface{}) (interface{}, error)
	// ExistByUUID returns whether the site with the uuid exists
	ExistByUUID(uuid string) (bool, error)
	// UpdateByUUID updates sites info by uuid
	UpdateByUUID(instance interface{}) error
	// DeleteByUUID delete sites info with the specified uuid
	DeleteByUUID(uuid string) error
	// GetByUUID returns an *entity.Site of the specified site
	GetByUUID(string) (interface{}, error)
}

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

Jump to

Keyboard shortcuts

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