Documentation ¶
Index ¶
- Variables
- func InitDB() error
- type JobParticipantRepo
- func (r *JobParticipantRepo) Create(instance interface{}) error
- func (r *JobParticipantRepo) GetByJobAndSiteUUID(jobUUID, siteUUID string) (interface{}, error)
- func (r *JobParticipantRepo) GetListByJobUUID(jobUUID string) (interface{}, error)
- func (r *JobParticipantRepo) InitTable()
- func (r *JobParticipantRepo) UpdateStatusByUUID(instance interface{}) error
- type JobRepo
- func (r *JobRepo) CheckNameConflict(name string) error
- func (r *JobRepo) Create(instance interface{}) error
- func (r *JobRepo) DeleteByProjectUUID(projectUUID string) error
- func (r *JobRepo) GetAll() (interface{}, error)
- func (r *JobRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *JobRepo) GetListByProjectUUID(projectUUID string) (interface{}, error)
- func (r *JobRepo) InitTable()
- func (r *JobRepo) UpdateFATEJobInfoByUUID(instance interface{}) error
- func (r *JobRepo) UpdateFATEJobStatusByUUID(instance interface{}) error
- func (r *JobRepo) UpdateFinishTimeByUUID(instance interface{}) error
- func (r *JobRepo) UpdateResultInfoByUUID(instance interface{}) error
- func (r *JobRepo) UpdateStatusByUUID(instance interface{}) error
- func (r *JobRepo) UpdateStatusMessageByUUID(instance interface{}) error
- type LocalDataRepo
- func (r *LocalDataRepo) CheckNameConflict(name string) error
- func (r *LocalDataRepo) Create(instance interface{}) error
- func (r *LocalDataRepo) DeleteByUUID(uuid string) error
- func (r *LocalDataRepo) GetAll() (interface{}, error)
- func (r *LocalDataRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *LocalDataRepo) InitTable()
- func (r *LocalDataRepo) UpdateIDMetaInfoByUUID(uuid string, instance interface{}) error
- func (r *LocalDataRepo) UpdateJobInfoByUUID(instance interface{}) error
- type ModelDeploymentRepo
- type ModelRepo
- func (r *ModelRepo) Create(instance interface{}) error
- func (r *ModelRepo) DeleteByUUID(uuid string) error
- func (r *ModelRepo) GetAll() (interface{}, error)
- func (r *ModelRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *ModelRepo) GetListByProjectUUID(projectUUID string) (interface{}, error)
- func (r *ModelRepo) InitTable()
- type ProjectDataRepo
- func (r *ProjectDataRepo) Create(instance interface{}) error
- func (r *ProjectDataRepo) DeleteByProjectUUID(projectUUID string) error
- func (r *ProjectDataRepo) DeleteByUUID(uuid string) error
- func (r *ProjectDataRepo) GetByDataUUID(dataUUID string) (interface{}, error)
- func (r *ProjectDataRepo) GetByProjectAndDataUUID(projectUUID string, dataUUID string) (interface{}, error)
- func (r *ProjectDataRepo) GetListByDataUUID(dataUUID string) (interface{}, error)
- func (r *ProjectDataRepo) GetListByProjectAndSiteUUID(projectUUID string, siteUUID string) (interface{}, error)
- func (r *ProjectDataRepo) GetListByProjectUUID(projectUUID string) (interface{}, error)
- func (r *ProjectDataRepo) InitTable()
- func (r *ProjectDataRepo) UpdateSiteInfoBySiteUUID(instance interface{}) error
- func (r *ProjectDataRepo) UpdateStatusByUUID(instance interface{}) error
- type ProjectInvitationRepo
- func (r *ProjectInvitationRepo) Create(instance interface{}) error
- func (r *ProjectInvitationRepo) GetByProjectAndSiteUUID(projectUUID, siteUUID string) (interface{}, error)
- func (r *ProjectInvitationRepo) GetByProjectUUID(uuid string) (interface{}, error)
- func (r *ProjectInvitationRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *ProjectInvitationRepo) InitTable()
- func (r *ProjectInvitationRepo) UpdateStatusByUUID(instance interface{}) error
- type ProjectParticipantRepo
- func (r *ProjectParticipantRepo) CountJoinedParticipantByProjectUUID(uuid string) (int64, error)
- func (r *ProjectParticipantRepo) Create(instance interface{}) error
- func (r *ProjectParticipantRepo) DeleteByProjectUUID(projectUUID string) error
- func (r *ProjectParticipantRepo) GetByProjectAndSiteUUID(projectUUID, siteUUID string) (interface{}, error)
- func (r *ProjectParticipantRepo) GetByProjectUUID(uuid string) (interface{}, error)
- func (r *ProjectParticipantRepo) GetBySiteUUID(siteUUID string) (interface{}, error)
- func (r *ProjectParticipantRepo) InitTable()
- func (r *ProjectParticipantRepo) UpdateParticipantInfoBySiteUUID(instance interface{}) error
- func (r *ProjectParticipantRepo) UpdateStatusByUUID(instance interface{}) error
- type ProjectRepo
- func (r *ProjectRepo) CheckNameConflict(name string) error
- func (r *ProjectRepo) Create(instance interface{}) error
- func (r *ProjectRepo) DeleteByUUID(uuid string) error
- func (r *ProjectRepo) GetAll() (interface{}, error)
- func (r *ProjectRepo) GetByUUID(uuid string) (interface{}, error)
- func (r *ProjectRepo) InitTable()
- func (r *ProjectRepo) UpdateAutoApprovalStatusByUUID(instance interface{}) error
- func (r *ProjectRepo) UpdateManagingSiteInfoBySiteUUID(instance interface{}) error
- func (r *ProjectRepo) UpdateStatusByUUID(instance interface{}) error
- func (r *ProjectRepo) UpdateTypeByUUID(instance interface{}) error
- type SiteRepo
- func (r *SiteRepo) CreateSite(site *entity.Site) error
- func (r *SiteRepo) GetSite() (interface{}, error)
- func (r *SiteRepo) InitData()
- func (r *SiteRepo) InitTable()
- func (r *SiteRepo) Load(instance interface{}) error
- func (r *SiteRepo) Update(instance interface{}) error
- func (r *SiteRepo) UpdateFMLManagerConnectionStatus(instance interface{}) error
- type UserRepo
- func (r *UserRepo) CreateUser(instance interface{}) error
- func (r *UserRepo) GetAllUsers() (interface{}, error)
- func (r *UserRepo) GetByName(name string) (*entity.User, error)
- func (r *UserRepo) InitData()
- func (r *UserRepo) InitTable()
- func (r *UserRepo) LoadById(instance interface{}) error
- func (r *UserRepo) LoadByName(instance interface{}) error
- func (r *UserRepo) UpdateByName(updatedUser *entity.User) error
- func (r *UserRepo) UpdatePasswordById(id uint, hashedPassword string) error
- func (r *UserRepo) UpdatePermissionInfoById(id uint, info valueobject.UserPermissionInfo) error
Constants ¶
This section is empty.
Variables ¶
var ErrJobNameConflict = errors.New("job name conflicts")
var ErrLocalDataNameConflict = errors.New("data name cannot be the same with existing one")
ErrLocalDataNameConflict means data with same name exists
var ErrLocalProjectNameConflict = errors.New("project name conflicts")
var ErrSiteExist = errors.New("site already configured")
ErrSiteExist means the site info is already there
var ErrUserExist = errors.New("user already exists")
ErrUserExist means new user cannot be created due to the existence of the same-name user
Functions ¶
Types ¶
type JobParticipantRepo ¶
type JobParticipantRepo struct{}
JobParticipantRepo implements repo.JobParticipantRepository using gorm and PostgreSQL
func (*JobParticipantRepo) Create ¶
func (r *JobParticipantRepo) Create(instance interface{}) error
func (*JobParticipantRepo) GetByJobAndSiteUUID ¶
func (r *JobParticipantRepo) GetByJobAndSiteUUID(jobUUID, siteUUID string) (interface{}, error)
func (*JobParticipantRepo) GetListByJobUUID ¶
func (r *JobParticipantRepo) GetListByJobUUID(jobUUID string) (interface{}, error)
func (*JobParticipantRepo) InitTable ¶
func (r *JobParticipantRepo) InitTable()
InitTable make sure the table is created in the db
func (*JobParticipantRepo) UpdateStatusByUUID ¶
func (r *JobParticipantRepo) UpdateStatusByUUID(instance interface{}) error
type JobRepo ¶
type JobRepo struct{}
JobRepo implements repo.JobRepository using gorm and PostgreSQL
func (*JobRepo) CheckNameConflict ¶
func (*JobRepo) DeleteByProjectUUID ¶
func (*JobRepo) GetListByProjectUUID ¶
func (*JobRepo) InitTable ¶
func (r *JobRepo) InitTable()
InitTable make sure the table is created in the db
func (*JobRepo) UpdateFATEJobInfoByUUID ¶
func (*JobRepo) UpdateFATEJobStatusByUUID ¶
func (*JobRepo) UpdateFinishTimeByUUID ¶
func (*JobRepo) UpdateResultInfoByUUID ¶
func (*JobRepo) UpdateStatusByUUID ¶
func (*JobRepo) UpdateStatusMessageByUUID ¶
type LocalDataRepo ¶
type LocalDataRepo struct{}
LocalDataRepo implements repo.LocalDataRepository using gorm and PostgreSQL
func (*LocalDataRepo) CheckNameConflict ¶
func (r *LocalDataRepo) CheckNameConflict(name string) error
func (*LocalDataRepo) Create ¶
func (r *LocalDataRepo) Create(instance interface{}) error
func (*LocalDataRepo) DeleteByUUID ¶
func (r *LocalDataRepo) DeleteByUUID(uuid string) error
func (*LocalDataRepo) GetAll ¶
func (r *LocalDataRepo) GetAll() (interface{}, error)
func (*LocalDataRepo) GetByUUID ¶
func (r *LocalDataRepo) GetByUUID(uuid string) (interface{}, error)
func (*LocalDataRepo) InitTable ¶
func (r *LocalDataRepo) InitTable()
InitTable make sure the table is created in the db
func (*LocalDataRepo) UpdateIDMetaInfoByUUID ¶
func (r *LocalDataRepo) UpdateIDMetaInfoByUUID(uuid string, instance interface{}) error
func (*LocalDataRepo) UpdateJobInfoByUUID ¶
func (r *LocalDataRepo) UpdateJobInfoByUUID(instance interface{}) error
type ModelDeploymentRepo ¶
type ModelDeploymentRepo struct{}
ModelDeploymentRepo implements repo.ModelDeploymentRepository using gorm and PostgreSQL
func (*ModelDeploymentRepo) Create ¶
func (r *ModelDeploymentRepo) Create(instance interface{}) error
func (*ModelDeploymentRepo) InitTable ¶
func (r *ModelDeploymentRepo) InitTable()
InitTable make sure the table is created in the db
func (*ModelDeploymentRepo) UpdateResultJsonByUUID ¶
func (r *ModelDeploymentRepo) UpdateResultJsonByUUID(instance interface{}) error
func (*ModelDeploymentRepo) UpdateStatusByUUID ¶
func (r *ModelDeploymentRepo) UpdateStatusByUUID(instance interface{}) error
type ModelRepo ¶
type ModelRepo struct{}
ModelRepo implements repo.ModelRepository using gorm and PostgreSQL
func (*ModelRepo) DeleteByUUID ¶
func (*ModelRepo) GetListByProjectUUID ¶
type ProjectDataRepo ¶
type ProjectDataRepo struct{}
ProjectDataRepo is the implementation of repo.ProjectDataRepository
func (*ProjectDataRepo) Create ¶
func (r *ProjectDataRepo) Create(instance interface{}) error
func (*ProjectDataRepo) DeleteByProjectUUID ¶
func (r *ProjectDataRepo) DeleteByProjectUUID(projectUUID string) error
func (*ProjectDataRepo) DeleteByUUID ¶
func (r *ProjectDataRepo) DeleteByUUID(uuid string) error
func (*ProjectDataRepo) GetByDataUUID ¶
func (r *ProjectDataRepo) GetByDataUUID(dataUUID string) (interface{}, error)
func (*ProjectDataRepo) GetByProjectAndDataUUID ¶
func (r *ProjectDataRepo) GetByProjectAndDataUUID(projectUUID string, dataUUID string) (interface{}, error)
func (*ProjectDataRepo) GetListByDataUUID ¶
func (r *ProjectDataRepo) GetListByDataUUID(dataUUID string) (interface{}, error)
func (*ProjectDataRepo) GetListByProjectAndSiteUUID ¶
func (r *ProjectDataRepo) GetListByProjectAndSiteUUID(projectUUID string, siteUUID string) (interface{}, error)
func (*ProjectDataRepo) GetListByProjectUUID ¶
func (r *ProjectDataRepo) GetListByProjectUUID(projectUUID string) (interface{}, error)
func (*ProjectDataRepo) InitTable ¶
func (r *ProjectDataRepo) InitTable()
InitTable make sure the table is created in the db
func (*ProjectDataRepo) UpdateSiteInfoBySiteUUID ¶
func (r *ProjectDataRepo) UpdateSiteInfoBySiteUUID(instance interface{}) error
func (*ProjectDataRepo) UpdateStatusByUUID ¶
func (r *ProjectDataRepo) UpdateStatusByUUID(instance interface{}) error
type ProjectInvitationRepo ¶
type ProjectInvitationRepo struct{}
ProjectInvitationRepo is the implementation of repo.ProjectInvitationRepository
func (*ProjectInvitationRepo) Create ¶
func (r *ProjectInvitationRepo) Create(instance interface{}) error
func (*ProjectInvitationRepo) GetByProjectAndSiteUUID ¶
func (r *ProjectInvitationRepo) GetByProjectAndSiteUUID(projectUUID, siteUUID string) (interface{}, error)
func (*ProjectInvitationRepo) GetByProjectUUID ¶
func (r *ProjectInvitationRepo) GetByProjectUUID(uuid string) (interface{}, error)
func (*ProjectInvitationRepo) GetByUUID ¶
func (r *ProjectInvitationRepo) GetByUUID(uuid string) (interface{}, error)
func (*ProjectInvitationRepo) InitTable ¶
func (r *ProjectInvitationRepo) InitTable()
InitTable make sure the table is created in the db
func (*ProjectInvitationRepo) UpdateStatusByUUID ¶
func (r *ProjectInvitationRepo) UpdateStatusByUUID(instance interface{}) error
type ProjectParticipantRepo ¶
type ProjectParticipantRepo struct{}
ProjectParticipantRepo is the implementation of repo.ProjectParticipantRepository
func (*ProjectParticipantRepo) CountJoinedParticipantByProjectUUID ¶
func (r *ProjectParticipantRepo) CountJoinedParticipantByProjectUUID(uuid string) (int64, error)
func (*ProjectParticipantRepo) Create ¶
func (r *ProjectParticipantRepo) Create(instance interface{}) error
func (*ProjectParticipantRepo) DeleteByProjectUUID ¶
func (r *ProjectParticipantRepo) DeleteByProjectUUID(projectUUID string) error
func (*ProjectParticipantRepo) GetByProjectAndSiteUUID ¶
func (r *ProjectParticipantRepo) GetByProjectAndSiteUUID(projectUUID, siteUUID string) (interface{}, error)
func (*ProjectParticipantRepo) GetByProjectUUID ¶
func (r *ProjectParticipantRepo) GetByProjectUUID(uuid string) (interface{}, error)
func (*ProjectParticipantRepo) GetBySiteUUID ¶
func (r *ProjectParticipantRepo) GetBySiteUUID(siteUUID string) (interface{}, error)
func (*ProjectParticipantRepo) InitTable ¶
func (r *ProjectParticipantRepo) InitTable()
InitTable make sure the table is created in the db
func (*ProjectParticipantRepo) UpdateParticipantInfoBySiteUUID ¶
func (r *ProjectParticipantRepo) UpdateParticipantInfoBySiteUUID(instance interface{}) error
func (*ProjectParticipantRepo) UpdateStatusByUUID ¶
func (r *ProjectParticipantRepo) UpdateStatusByUUID(instance interface{}) error
type ProjectRepo ¶
type ProjectRepo struct{}
ProjectRepo is the implementation of repo.ProjectRepository
func (*ProjectRepo) CheckNameConflict ¶
func (r *ProjectRepo) CheckNameConflict(name string) error
func (*ProjectRepo) Create ¶
func (r *ProjectRepo) Create(instance interface{}) error
func (*ProjectRepo) DeleteByUUID ¶
func (r *ProjectRepo) DeleteByUUID(uuid string) error
func (*ProjectRepo) GetAll ¶
func (r *ProjectRepo) GetAll() (interface{}, error)
func (*ProjectRepo) GetByUUID ¶
func (r *ProjectRepo) GetByUUID(uuid string) (interface{}, error)
func (*ProjectRepo) InitTable ¶
func (r *ProjectRepo) InitTable()
InitTable make sure the table is created in the db
func (*ProjectRepo) UpdateAutoApprovalStatusByUUID ¶
func (r *ProjectRepo) UpdateAutoApprovalStatusByUUID(instance interface{}) error
func (*ProjectRepo) UpdateManagingSiteInfoBySiteUUID ¶
func (r *ProjectRepo) UpdateManagingSiteInfoBySiteUUID(instance interface{}) error
func (*ProjectRepo) UpdateStatusByUUID ¶
func (r *ProjectRepo) UpdateStatusByUUID(instance interface{}) error
func (*ProjectRepo) UpdateTypeByUUID ¶
func (r *ProjectRepo) UpdateTypeByUUID(instance interface{}) error
type SiteRepo ¶
type SiteRepo struct{}
SiteRepo is the implementation of the domain's repo interface
func (*SiteRepo) CreateSite ¶
CreateSite inserts a site info entry
func (*SiteRepo) InitTable ¶
func (r *SiteRepo) InitTable()
InitTable make sure the table is created in the db
func (*SiteRepo) UpdateFMLManagerConnectionStatus ¶
UpdateFMLManagerConnectionStatus updates fml manager related information
type UserRepo ¶
type UserRepo struct{}
UserRepo implements repo.UserRepository using gorm and PostgreSQL
func (*UserRepo) CreateUser ¶
CreateUser creates a new user
func (*UserRepo) GetAllUsers ¶
GetAllUsers returns all available users' info
func (*UserRepo) InitData ¶
func (r *UserRepo) InitData()
InitData inserts or updates the defaults users information
func (*UserRepo) InitTable ¶
func (r *UserRepo) InitTable()
InitTable make sure the table is created in the db
func (*UserRepo) LoadByName ¶
LoadByName loads the user info by name
func (*UserRepo) UpdateByName ¶
UpdateByName changes the specified user's info
func (*UserRepo) UpdatePasswordById ¶
UpdatePasswordById changes the user's hashed password
func (*UserRepo) UpdatePermissionInfoById ¶
func (r *UserRepo) UpdatePermissionInfoById(id uint, info valueobject.UserPermissionInfo) error
UpdatePermissionInfoById changes the specified user's permission info