gorm

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrJobNameConflict = errors.New("job name conflicts")

Functions

func InitDB

func InitDB() error

InitDB initialize the connection to the PostgresSql db

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

func (r *JobParticipantRepo) GetStatusByUUID(instance interface{}) interface{}

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 (r *JobRepo) CheckNameConflict(name string) error

func (*JobRepo) Create

func (r *JobRepo) Create(instance interface{}) error

func (*JobRepo) DeleteByProjectUUID

func (r *JobRepo) DeleteByProjectUUID(projectUUID string) error

func (*JobRepo) GetAll

func (r *JobRepo) GetAll() (interface{}, error)

func (*JobRepo) GetByUUID

func (r *JobRepo) GetByUUID(uuid string) (interface{}, error)

func (*JobRepo) GetListByProjectUUID

func (r *JobRepo) GetListByProjectUUID(projectUUID string) (interface{}, error)

func (*JobRepo) InitTable

func (r *JobRepo) InitTable()

InitTable make sure the table is created in the db

func (*JobRepo) UpdateFATEJobInfoByUUID

func (r *JobRepo) UpdateFATEJobInfoByUUID(instance interface{}) error

func (*JobRepo) UpdateFATEJobStatusByUUID

func (r *JobRepo) UpdateFATEJobStatusByUUID(instance interface{}) error

func (*JobRepo) UpdateFinishTimeByUUID

func (r *JobRepo) UpdateFinishTimeByUUID(instance interface{}) error

func (*JobRepo) UpdateStatusByUUID

func (r *JobRepo) UpdateStatusByUUID(instance interface{}) error

func (*JobRepo) UpdateStatusMessageByUUID

func (r *JobRepo) UpdateStatusMessageByUUID(instance interface{}) error

type ProjectDataRepo

type ProjectDataRepo struct{}

ProjectDataRepo implements 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) GetByProjectAndDataUUID

func (r *ProjectDataRepo) GetByProjectAndDataUUID(projectUUID string, 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 implements repo.ProjectInvitationRepository

func (*ProjectInvitationRepo) Create

func (r *ProjectInvitationRepo) Create(instance 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 implements repo.ProjectParticipantRepository

func (*ProjectParticipantRepo) Create

func (r *ProjectParticipantRepo) Create(instance interface{}) 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 implements repo.ProjectRepository

func (*ProjectRepo) Create

func (r *ProjectRepo) Create(instance interface{}) 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) UpdateManagingSiteInfoBySiteUUID

func (r *ProjectRepo) UpdateManagingSiteInfoBySiteUUID(instance interface{}) error

func (*ProjectRepo) UpdateStatusByUUID

func (r *ProjectRepo) UpdateStatusByUUID(instance interface{}) error

type SiteRepo

type SiteRepo struct{}

SiteRepo is the implementation of the domain's repo interface

func (*SiteRepo) DeleteByUUID

func (r *SiteRepo) DeleteByUUID(uuid string) error

DeleteByUUID deletes records using the specified uuid

func (*SiteRepo) ExistByUUID

func (r *SiteRepo) ExistByUUID(uuid string) (bool, error)

ExistByUUID returns whether the site with the uuid exists

func (*SiteRepo) GetByUUID

func (r *SiteRepo) GetByUUID(uuid string) (interface{}, error)

GetByUUID returns an *entity.Site indexed by the uuid

func (*SiteRepo) GetSiteList

func (r *SiteRepo) GetSiteList() (interface{}, error)

GetSiteList returns all the saved sites

func (*SiteRepo) InitTable

func (r *SiteRepo) InitTable()

InitTable make sure the table is created in the db

func (*SiteRepo) Save

func (r *SiteRepo) Save(instance interface{}) (interface{}, error)

Save create a record of site in the DB

func (*SiteRepo) UpdateByUUID

func (r *SiteRepo) UpdateByUUID(instance interface{}) error

UpdateByUUID updates the site info indexed by the uuid

Jump to

Keyboard shortcuts

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