repo

package
v0.0.0-...-a97389e Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterpreterRepo

type InterpreterRepo struct {
	DB *gorm.DB `inject:""`
}

func NewInterpreterRepo

func NewInterpreterRepo() *InterpreterRepo

func (*InterpreterRepo) Create

func (r *InterpreterRepo) Create(interpreter model.Interpreter) (id uint, err error)

func (*InterpreterRepo) Delete

func (r *InterpreterRepo) Delete(id uint) (err error)

func (*InterpreterRepo) FindDuplicate

func (r *InterpreterRepo) FindDuplicate(lang string, id uint) (po model.Interpreter, err error)

func (*InterpreterRepo) Get

func (r *InterpreterRepo) Get(id uint) (po model.Interpreter, err error)

func (*InterpreterRepo) List

func (r *InterpreterRepo) List() (pos []model.Interpreter, err error)

func (*InterpreterRepo) Update

func (r *InterpreterRepo) Update(interpreter model.Interpreter) error

type JobRepo

type JobRepo struct {
	DB *gorm.DB `inject:""`
}

func NewJobRepo

func NewJobRepo() *JobRepo

func (*JobRepo) AddRetry

func (r *JobRepo) AddRetry(po *model.Job) (err error)

func (*JobRepo) Delete

func (r *JobRepo) Delete(id uint) (err error)

func (*JobRepo) Get

func (r *JobRepo) Get(id uint) (po model.Job, err error)

func (*JobRepo) ListByStatus

func (r *JobRepo) ListByStatus(status string) (jobs []model.Job, err error)

func (*JobRepo) Query

func (r *JobRepo) Query() (pos []model.Job, err error)

func (*JobRepo) Save

func (r *JobRepo) Save(po *model.Job) (err error)

func (*JobRepo) SetCanceled

func (r *JobRepo) SetCanceled(po model.Job) (err error)

func (*JobRepo) Update

func (r *JobRepo) Update(po *model.Job) (err error)

func (*JobRepo) UpdateStatus

func (r *JobRepo) UpdateStatus(job *model.Job, status commConsts.JobStatus, isStart, isEnd bool) (err error)

type ProxyRepo

type ProxyRepo struct {
	DB *gorm.DB `inject:""`
}

func NewProxyRepo

func NewProxyRepo() *ProxyRepo

func (*ProxyRepo) Create

func (r *ProxyRepo) Create(proxy model.Proxy) (id uint, err error)

func (*ProxyRepo) Delete

func (r *ProxyRepo) Delete(id uint) (err error)

func (*ProxyRepo) FindDuplicate

func (r *ProxyRepo) FindDuplicate(path string, id uint) (po model.Proxy, err error)

func (*ProxyRepo) Get

func (r *ProxyRepo) Get(id uint) (po model.Proxy, err error)

func (*ProxyRepo) List

func (r *ProxyRepo) List() (pos []model.Proxy, err error)

func (*ProxyRepo) Update

func (r *ProxyRepo) Update(proxy model.Proxy) error

type ServerRepo

type ServerRepo struct {
	DB *gorm.DB `inject:""`
}

func NewServerRepo

func NewServerRepo() *ServerRepo

func (*ServerRepo) Create

func (r *ServerRepo) Create(server model.Server) (id uint, err error)

func (*ServerRepo) Delete

func (r *ServerRepo) Delete(id uint) (err error)

func (*ServerRepo) FindDuplicate

func (r *ServerRepo) FindDuplicate(path string, id uint) (po model.Server, err error)

func (*ServerRepo) Get

func (r *ServerRepo) Get(id uint) (po model.Server, err error)

func (*ServerRepo) List

func (r *ServerRepo) List() (pos []model.Server, err error)

func (*ServerRepo) Update

func (r *ServerRepo) Update(server model.Server) error

type SiteRepo

type SiteRepo struct {
	DB *gorm.DB `inject:""`
}

func NewSiteRepo

func NewSiteRepo() *SiteRepo

func (*SiteRepo) Create

func (r *SiteRepo) Create(site *model.Site) (id uint, isDuplicate bool, err error)

func (*SiteRepo) Delete

func (r *SiteRepo) Delete(id uint) (err error)

func (*SiteRepo) FindDuplicate

func (r *SiteRepo) FindDuplicate(name, url string, id uint) (po model.Site, err error)

func (*SiteRepo) Get

func (r *SiteRepo) Get(id uint) (po model.Site, err error)

func (*SiteRepo) GetCurrSiteByUser

func (r *SiteRepo) GetCurrSiteByUser() (currSite model.Site, err error)

func (*SiteRepo) Paginate

func (r *SiteRepo) Paginate(req serverDomain.ReqPaginate) (data domain.PageData, err error)

func (*SiteRepo) RemoveDefaultTag

func (r *SiteRepo) RemoveDefaultTag() (err error)

func (*SiteRepo) SetCurrSite

func (r *SiteRepo) SetCurrSite(id uint) (err error)

func (*SiteRepo) Update

func (r *SiteRepo) Update(site model.Site) (isDuplicate bool, err error)

type StatisticRepo

type StatisticRepo struct {
	DB *gorm.DB `inject:""`
}

func NewStatisticRepo

func NewStatisticRepo() *StatisticRepo

func (*StatisticRepo) Create

func (r *StatisticRepo) Create(statistics *model.Statistic) (id uint, isDuplicate bool, err error)

func (*StatisticRepo) Delete

func (r *StatisticRepo) Delete(id uint) (err error)

func (*StatisticRepo) FindDuplicate

func (r *StatisticRepo) FindDuplicate(path string, id uint) (po model.Statistic, err error)

func (*StatisticRepo) Get

func (r *StatisticRepo) Get(id uint) (po model.Statistic, err error)

func (*StatisticRepo) GetByPath

func (r *StatisticRepo) GetByPath(path string) (po model.Statistic, err error)

func (*StatisticRepo) Update

func (r *StatisticRepo) Update(statistics model.Statistic) (isDuplicate bool, err error)

func (*StatisticRepo) UpdateStatistic

func (r *StatisticRepo) UpdateStatistic(path string, total, success, fail int, logPath string) (err error)

type WorkspaceRepo

type WorkspaceRepo struct {
	DB *gorm.DB `inject:""`
}

func NewWorkspaceRepo

func NewWorkspaceRepo() *WorkspaceRepo

func (*WorkspaceRepo) Create

func (r *WorkspaceRepo) Create(workspace model.Workspace) (id uint, err error)

func (*WorkspaceRepo) Delete

func (r *WorkspaceRepo) Delete(id uint) (err error)

func (*WorkspaceRepo) DeleteByPath

func (r *WorkspaceRepo) DeleteByPath(path string, productId uint) (err error)

func (*WorkspaceRepo) DeleteBySite

func (r *WorkspaceRepo) DeleteBySite(siteId uint) (err error)

func (*WorkspaceRepo) FindByName

func (r *WorkspaceRepo) FindByName(name string, ids ...uint) (po model.Workspace, err error)

func (*WorkspaceRepo) FindByPath

func (r *WorkspaceRepo) FindByPath(workspacePath string) (po model.Workspace, err error)

func (*WorkspaceRepo) FindDuplicate

func (r *WorkspaceRepo) FindDuplicate(name, url string, id, productId uint, siteId uint) (po model.Workspace, err error)

func (*WorkspaceRepo) Get

func (r *WorkspaceRepo) Get(id uint) (po model.Workspace, err error)

func (*WorkspaceRepo) GetCurrWorkspaceByUser

func (r *WorkspaceRepo) GetCurrWorkspaceByUser() (currWorkspace model.Workspace, err error)

func (*WorkspaceRepo) ListByProduct

func (r *WorkspaceRepo) ListByProduct(siteId, productId uint) (pos []model.Workspace, err error)

func (*WorkspaceRepo) ListBySite

func (r *WorkspaceRepo) ListBySite(siteId uint) (pos []model.Workspace, err error)

func (*WorkspaceRepo) ListWorkspace

func (r *WorkspaceRepo) ListWorkspace() (workspaces []model.Workspace, err error)

func (*WorkspaceRepo) Paginate

func (r *WorkspaceRepo) Paginate(req serverDomain.WorkspaceReqPaginate) (data domain.PageData, err error)

func (*WorkspaceRepo) RemoveDefaultTag

func (r *WorkspaceRepo) RemoveDefaultTag() (err error)

func (*WorkspaceRepo) SetCurrWorkspace

func (r *WorkspaceRepo) SetCurrWorkspace(pth string) (err error)

func (*WorkspaceRepo) SetProxyId

func (r *WorkspaceRepo) SetProxyId(id, proxyId uint) (err error)

func (*WorkspaceRepo) Update

func (r *WorkspaceRepo) Update(workspace model.Workspace) error

Jump to

Keyboard shortcuts

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