repo

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RepoGroupApp = new(RepoGroup)

Functions

This section is empty.

Types

type AppDetailRepo

type AppDetailRepo struct {
}

func (AppDetailRepo) BatchCreate

func (a AppDetailRepo) BatchCreate(ctx context.Context, details []model.AppDetail) error

func (AppDetailRepo) BatchUpdateBy

func (a AppDetailRepo) BatchUpdateBy(maps map[string]interface{}, opts ...DBOption) error

func (AppDetailRepo) DeleteByAppIds

func (a AppDetailRepo) DeleteByAppIds(ctx context.Context, appIds []uint) error

func (AppDetailRepo) GetBy

func (a AppDetailRepo) GetBy(opts ...DBOption) ([]model.AppDetail, error)

func (AppDetailRepo) GetFirst

func (a AppDetailRepo) GetFirst(opts ...DBOption) (model.AppDetail, error)

func (AppDetailRepo) Update

func (a AppDetailRepo) Update(ctx context.Context, detail model.AppDetail) error

func (AppDetailRepo) WithAppId

func (a AppDetailRepo) WithAppId(id uint) DBOption

func (AppDetailRepo) WithVersion

func (a AppDetailRepo) WithVersion(version string) DBOption

type AppInstallRepo

type AppInstallRepo struct{}

func (*AppInstallRepo) BatchUpdateBy

func (a *AppInstallRepo) BatchUpdateBy(maps map[string]interface{}, opts ...DBOption) error

func (*AppInstallRepo) Create

func (a *AppInstallRepo) Create(ctx context.Context, install *model.AppInstall) error

func (*AppInstallRepo) Delete

func (a *AppInstallRepo) Delete(ctx context.Context, install model.AppInstall) error

func (*AppInstallRepo) DeleteBy

func (a *AppInstallRepo) DeleteBy(opts ...DBOption) error

func (*AppInstallRepo) GetFirst

func (a *AppInstallRepo) GetFirst(opts ...DBOption) (model.AppInstall, error)

func (*AppInstallRepo) ListBy

func (a *AppInstallRepo) ListBy(opts ...DBOption) ([]model.AppInstall, error)

func (*AppInstallRepo) LoadBaseInfo

func (a *AppInstallRepo) LoadBaseInfo(key string, name string) (*RootInfo, error)

func (*AppInstallRepo) Page

func (a *AppInstallRepo) Page(page, size int, opts ...DBOption) (int64, []model.AppInstall, error)

func (*AppInstallRepo) Save

func (a *AppInstallRepo) Save(install *model.AppInstall) error

func (*AppInstallRepo) WithAppId

func (a *AppInstallRepo) WithAppId(appId uint) DBOption

func (*AppInstallRepo) WithAppIdsIn

func (a *AppInstallRepo) WithAppIdsIn(appIds []uint) DBOption

func (*AppInstallRepo) WithDetailIdNotIn

func (a *AppInstallRepo) WithDetailIdNotIn(detailIds []uint) DBOption

func (*AppInstallRepo) WithDetailIdsIn

func (a *AppInstallRepo) WithDetailIdsIn(detailIds []uint) DBOption

func (*AppInstallRepo) WithIdNotInWebsite

func (a *AppInstallRepo) WithIdNotInWebsite() DBOption

func (*AppInstallRepo) WithPort

func (a *AppInstallRepo) WithPort(port int) DBOption

func (*AppInstallRepo) WithServiceName

func (a *AppInstallRepo) WithServiceName(serviceName string) DBOption

func (*AppInstallRepo) WithStatus

func (a *AppInstallRepo) WithStatus(status string) DBOption

type AppInstallResourceRpo

type AppInstallResourceRpo struct {
}

func (AppInstallResourceRpo) Create

func (AppInstallResourceRpo) DeleteBy

func (a AppInstallResourceRpo) DeleteBy(ctx context.Context, opts ...DBOption) error

func (AppInstallResourceRpo) GetBy

func (AppInstallResourceRpo) GetFirst

func (AppInstallResourceRpo) WithAppInstallId

func (a AppInstallResourceRpo) WithAppInstallId(appInstallId uint) DBOption

func (AppInstallResourceRpo) WithLinkId

func (a AppInstallResourceRpo) WithLinkId(linkId uint) DBOption

func (AppInstallResourceRpo) WithResourceId

func (a AppInstallResourceRpo) WithResourceId(resourceId uint) DBOption

type AppRepo

type AppRepo struct {
}

func (AppRepo) BatchCreate

func (a AppRepo) BatchCreate(ctx context.Context, apps []model.App) error

func (AppRepo) Create

func (a AppRepo) Create(ctx context.Context, app *model.App) error

func (AppRepo) GetBy

func (a AppRepo) GetBy(opts ...DBOption) ([]model.App, error)

func (AppRepo) GetByKey

func (a AppRepo) GetByKey(ctx context.Context, key string) (model.App, error)

func (AppRepo) GetFirst

func (a AppRepo) GetFirst(opts ...DBOption) (model.App, error)

func (AppRepo) GetRecommend

func (a AppRepo) GetRecommend() DBOption

func (AppRepo) OrderByRecommend

func (a AppRepo) OrderByRecommend() DBOption

func (AppRepo) Page

func (a AppRepo) Page(page, size int, opts ...DBOption) (int64, []model.App, error)

func (AppRepo) Save

func (a AppRepo) Save(ctx context.Context, app *model.App) error

func (AppRepo) WithKey

func (a AppRepo) WithKey(key string) DBOption

func (AppRepo) WithType

func (a AppRepo) WithType(typeStr string) DBOption

type AppTagRepo

type AppTagRepo struct {
}

func (AppTagRepo) BatchCreate

func (a AppTagRepo) BatchCreate(ctx context.Context, tags []*model.AppTag) error

func (AppTagRepo) DeleteAll

func (a AppTagRepo) DeleteAll(ctx context.Context) error

func (AppTagRepo) DeleteByAppIds

func (a AppTagRepo) DeleteByAppIds(ctx context.Context, appIds []uint) error

func (AppTagRepo) GetByAppId

func (a AppTagRepo) GetByAppId(appId uint) ([]model.AppTag, error)

func (AppTagRepo) GetByTagIds

func (a AppTagRepo) GetByTagIds(tagIds []uint) ([]model.AppTag, error)

type BackupRepo

type BackupRepo struct{}

func (*BackupRepo) Create

func (u *BackupRepo) Create(backup *model.BackupAccount) error

func (*BackupRepo) CreateRecord

func (u *BackupRepo) CreateRecord(record *model.BackupRecord) error

func (*BackupRepo) Delete

func (u *BackupRepo) Delete(opts ...DBOption) error

func (*BackupRepo) DeleteRecord

func (u *BackupRepo) DeleteRecord(ctx context.Context, opts ...DBOption) error

func (*BackupRepo) Get

func (u *BackupRepo) Get(opts ...DBOption) (model.BackupAccount, error)

func (*BackupRepo) List

func (u *BackupRepo) List(opts ...DBOption) ([]model.BackupAccount, error)

func (*BackupRepo) ListRecord

func (u *BackupRepo) ListRecord(opts ...DBOption) ([]model.BackupRecord, error)

func (*BackupRepo) PageRecord

func (u *BackupRepo) PageRecord(page, size int, opts ...DBOption) (int64, []model.BackupRecord, error)

func (*BackupRepo) Update

func (u *BackupRepo) Update(id uint, vars map[string]interface{}) error

func (*BackupRepo) WithByDetailName

func (u *BackupRepo) WithByDetailName(detailName string) DBOption

func (*BackupRepo) WithByFileName

func (u *BackupRepo) WithByFileName(fileName string) DBOption

func (*BackupRepo) WithByType

func (u *BackupRepo) WithByType(backupType string) DBOption

type CommandRepo

type CommandRepo struct{}

func (*CommandRepo) Create

func (u *CommandRepo) Create(command *model.Command) error

func (*CommandRepo) Delete

func (u *CommandRepo) Delete(opts ...DBOption) error

func (*CommandRepo) Get

func (u *CommandRepo) Get(opts ...DBOption) (model.Command, error)

func (*CommandRepo) GetList

func (u *CommandRepo) GetList(opts ...DBOption) ([]model.Command, error)

func (*CommandRepo) Page

func (u *CommandRepo) Page(page, size int, opts ...DBOption) (int64, []model.Command, error)

func (*CommandRepo) Update

func (u *CommandRepo) Update(id uint, vars map[string]interface{}) error

func (*CommandRepo) WithByInfo

func (c *CommandRepo) WithByInfo(info string) DBOption

type CommonRepo

type CommonRepo struct{}

func (*CommonRepo) WithByDate

func (c *CommonRepo) WithByDate(startTime, endTime time.Time) DBOption

func (*CommonRepo) WithByGroupID

func (c *CommonRepo) WithByGroupID(groupID uint) DBOption

func (*CommonRepo) WithByID

func (c *CommonRepo) WithByID(id uint) DBOption

func (*CommonRepo) WithByName

func (c *CommonRepo) WithByName(name string) DBOption

func (*CommonRepo) WithByStartDate

func (c *CommonRepo) WithByStartDate(startTime time.Time) DBOption

func (*CommonRepo) WithByStatus

func (c *CommonRepo) WithByStatus(status string) DBOption

func (*CommonRepo) WithByType

func (c *CommonRepo) WithByType(tp string) DBOption

func (*CommonRepo) WithIdsIn

func (c *CommonRepo) WithIdsIn(ids []uint) DBOption

func (*CommonRepo) WithIdsNotIn

func (c *CommonRepo) WithIdsNotIn(ids []uint) DBOption

func (*CommonRepo) WithLikeName

func (c *CommonRepo) WithLikeName(name string) DBOption

func (*CommonRepo) WithOrderBy

func (c *CommonRepo) WithOrderBy(orderStr string) DBOption

type ComposeTemplateRepo

type ComposeTemplateRepo struct{}

func (*ComposeTemplateRepo) Create

func (u *ComposeTemplateRepo) Create(compose *model.ComposeTemplate) error

func (*ComposeTemplateRepo) CreateRecord

func (u *ComposeTemplateRepo) CreateRecord(compose *model.Compose) error

func (*ComposeTemplateRepo) Delete

func (u *ComposeTemplateRepo) Delete(opts ...DBOption) error

func (*ComposeTemplateRepo) DeleteRecord

func (u *ComposeTemplateRepo) DeleteRecord(opts ...DBOption) error

func (*ComposeTemplateRepo) Get

func (*ComposeTemplateRepo) List

func (u *ComposeTemplateRepo) List(opts ...DBOption) ([]model.ComposeTemplate, error)

func (*ComposeTemplateRepo) ListRecord

func (u *ComposeTemplateRepo) ListRecord() ([]model.Compose, error)

func (*ComposeTemplateRepo) Page

func (u *ComposeTemplateRepo) Page(page, size int, opts ...DBOption) (int64, []model.ComposeTemplate, error)

func (*ComposeTemplateRepo) Update

func (u *ComposeTemplateRepo) Update(id uint, vars map[string]interface{}) error

type CronjobRepo

type CronjobRepo struct{}

func (*CronjobRepo) Create

func (u *CronjobRepo) Create(cronjob *model.Cronjob) error

func (*CronjobRepo) Delete

func (u *CronjobRepo) Delete(opts ...DBOption) error

func (*CronjobRepo) DeleteRecord

func (u *CronjobRepo) DeleteRecord(opts ...DBOption) error

func (*CronjobRepo) EndRecords

func (u *CronjobRepo) EndRecords(record model.JobRecords, status, message, records string)

func (*CronjobRepo) Get

func (u *CronjobRepo) Get(opts ...DBOption) (model.Cronjob, error)

func (*CronjobRepo) GetRecord

func (u *CronjobRepo) GetRecord(opts ...DBOption) (model.JobRecords, error)

func (*CronjobRepo) List

func (u *CronjobRepo) List(opts ...DBOption) ([]model.Cronjob, error)

func (*CronjobRepo) ListRecord

func (u *CronjobRepo) ListRecord(opts ...DBOption) ([]model.JobRecords, error)

func (*CronjobRepo) Page

func (u *CronjobRepo) Page(page, size int, opts ...DBOption) (int64, []model.Cronjob, error)

func (*CronjobRepo) PageRecords

func (u *CronjobRepo) PageRecords(page, size int, opts ...DBOption) (int64, []model.JobRecords, error)

func (*CronjobRepo) RecordFirst

func (u *CronjobRepo) RecordFirst(id uint) (model.JobRecords, error)

func (*CronjobRepo) Save

func (u *CronjobRepo) Save(id uint, cronjob model.Cronjob) error

func (*CronjobRepo) StartRecords

func (u *CronjobRepo) StartRecords(cronjobID uint, fromLocal bool, targetPath string) model.JobRecords

func (*CronjobRepo) Update

func (u *CronjobRepo) Update(id uint, vars map[string]interface{}) error

func (*CronjobRepo) WithByJobID

func (c *CronjobRepo) WithByJobID(id int) DBOption

type DBOption

type DBOption func(*gorm.DB) *gorm.DB

type GroupRepo

type GroupRepo struct{}

func (GroupRepo) CancelDefault

func (w GroupRepo) CancelDefault() error

func (*GroupRepo) Create

func (u *GroupRepo) Create(group *model.Group) error

func (*GroupRepo) Delete

func (u *GroupRepo) Delete(opts ...DBOption) error

func (*GroupRepo) Get

func (u *GroupRepo) Get(opts ...DBOption) (model.Group, error)

func (*GroupRepo) GetList

func (u *GroupRepo) GetList(opts ...DBOption) ([]model.Group, error)

func (*GroupRepo) Update

func (u *GroupRepo) Update(id uint, vars map[string]interface{}) error

func (*GroupRepo) WithByIsDefault

func (u *GroupRepo) WithByIsDefault(isDefault bool) DBOption

type HostRepo

type HostRepo struct{}

func (*HostRepo) Create

func (u *HostRepo) Create(host *model.Host) error

func (*HostRepo) Delete

func (u *HostRepo) Delete(opts ...DBOption) error

func (*HostRepo) Get

func (u *HostRepo) Get(opts ...DBOption) (model.Host, error)

func (*HostRepo) GetList

func (u *HostRepo) GetList(opts ...DBOption) ([]model.Host, error)

func (*HostRepo) Page

func (u *HostRepo) Page(page, size int, opts ...DBOption) (int64, []model.Host, error)

func (*HostRepo) Update

func (u *HostRepo) Update(id uint, vars map[string]interface{}) error

func (*HostRepo) WithByAddr

func (u *HostRepo) WithByAddr(addr string) DBOption

func (*HostRepo) WithByGroup

func (u *HostRepo) WithByGroup(group string) DBOption

func (*HostRepo) WithByInfo

func (c *HostRepo) WithByInfo(info string) DBOption

func (*HostRepo) WithByPort

func (u *HostRepo) WithByPort(port uint) DBOption

func (*HostRepo) WithByUser

func (u *HostRepo) WithByUser(user string) DBOption

type IAcmeAccountRepo

type IAcmeAccountRepo interface {
	Page(page, size int, opts ...DBOption) (int64, []model.WebsiteAcmeAccount, error)
	GetFirst(opts ...DBOption) (*model.WebsiteAcmeAccount, error)
	Create(account model.WebsiteAcmeAccount) error
	Save(account model.WebsiteAcmeAccount) error
	DeleteBy(opts ...DBOption) error
	WithEmail(email string) DBOption
}

func NewIAcmeAccountRepo

func NewIAcmeAccountRepo() IAcmeAccountRepo

type IBackupRepo

type IBackupRepo interface {
	Get(opts ...DBOption) (model.BackupAccount, error)
	ListRecord(opts ...DBOption) ([]model.BackupRecord, error)
	PageRecord(page, size int, opts ...DBOption) (int64, []model.BackupRecord, error)
	List(opts ...DBOption) ([]model.BackupAccount, error)
	Create(backup *model.BackupAccount) error
	CreateRecord(record *model.BackupRecord) error
	Update(id uint, vars map[string]interface{}) error
	Delete(opts ...DBOption) error
	DeleteRecord(ctx context.Context, opts ...DBOption) error
	WithByDetailName(detailName string) DBOption
}

func NewIBackupRepo

func NewIBackupRepo() IBackupRepo

type ICommandRepo

type ICommandRepo interface {
	GetList(opts ...DBOption) ([]model.Command, error)
	Page(limit, offset int, opts ...DBOption) (int64, []model.Command, error)
	WithByInfo(info string) DBOption
	Create(command *model.Command) error
	Update(id uint, vars map[string]interface{}) error
	Delete(opts ...DBOption) error
}

func NewICommandRepo

func NewICommandRepo() ICommandRepo

type ICommonRepo

type ICommonRepo interface {
	WithByID(id uint) DBOption
	WithByName(name string) DBOption
	WithByType(tp string) DBOption
	WithOrderBy(orderStr string) DBOption
	WithByGroupID(groupID uint) DBOption
	WithLikeName(name string) DBOption
	WithIdsIn(ids []uint) DBOption
	WithByDate(startTime, endTime time.Time) DBOption
	WithByStartDate(startTime time.Time) DBOption
}

type IComposeTemplateRepo

type IComposeTemplateRepo interface {
	Get(opts ...DBOption) (model.ComposeTemplate, error)
	List(opts ...DBOption) ([]model.ComposeTemplate, error)
	Page(limit, offset int, opts ...DBOption) (int64, []model.ComposeTemplate, error)
	Create(compose *model.ComposeTemplate) error
	Update(id uint, vars map[string]interface{}) error
	Delete(opts ...DBOption) error

	CreateRecord(compose *model.Compose) error
	DeleteRecord(opts ...DBOption) error
}

func NewIComposeTemplateRepo

func NewIComposeTemplateRepo() IComposeTemplateRepo

type ICronjobRepo

type ICronjobRepo interface {
	Get(opts ...DBOption) (model.Cronjob, error)
	GetRecord(opts ...DBOption) (model.JobRecords, error)
	RecordFirst(id uint) (model.JobRecords, error)
	ListRecord(opts ...DBOption) ([]model.JobRecords, error)
	List(opts ...DBOption) ([]model.Cronjob, error)
	Page(limit, offset int, opts ...DBOption) (int64, []model.Cronjob, error)
	Create(cronjob *model.Cronjob) error
	WithByJobID(id int) DBOption
	Save(id uint, cronjob model.Cronjob) error
	Update(id uint, vars map[string]interface{}) error
	Delete(opts ...DBOption) error
	DeleteRecord(opts ...DBOption) error
	StartRecords(cronjobID uint, fromLocal bool, targetPath string) model.JobRecords
	EndRecords(record model.JobRecords, status, message, records string)
}

func NewICronjobRepo

func NewICronjobRepo() ICronjobRepo

type IGroupRepo

type IGroupRepo interface {
	Get(opts ...DBOption) (model.Group, error)
	GetList(opts ...DBOption) ([]model.Group, error)
	Create(group *model.Group) error
	Update(id uint, vars map[string]interface{}) error
	Delete(opts ...DBOption) error
	CancelDefault() error
	WithByIsDefault(isDefault bool) DBOption
}

func NewIGroupRepo

func NewIGroupRepo() IGroupRepo

type IHostRepo

type IHostRepo interface {
	Get(opts ...DBOption) (model.Host, error)
	GetList(opts ...DBOption) ([]model.Host, error)
	Page(limit, offset int, opts ...DBOption) (int64, []model.Host, error)
	WithByInfo(info string) DBOption
	WithByPort(port uint) DBOption
	WithByUser(user string) DBOption
	WithByAddr(addr string) DBOption
	Create(host *model.Host) error
	Update(id uint, vars map[string]interface{}) error
	Delete(opts ...DBOption) error
}

func NewIHostRepo

func NewIHostRepo() IHostRepo

type IImageRepoRepo

type IImageRepoRepo interface {
	Get(opts ...DBOption) (model.ImageRepo, error)
	Page(limit, offset int, opts ...DBOption) (int64, []model.ImageRepo, error)
	List(opts ...DBOption) ([]model.ImageRepo, error)
	Create(imageRepo *model.ImageRepo) error
	Update(id uint, vars map[string]interface{}) error
	Delete(opts ...DBOption) error
}

func NewIImageRepoRepo

func NewIImageRepoRepo() IImageRepoRepo

type ILogRepo

type ILogRepo interface {
	CleanLogin() error
	CreateLoginLog(user *model.LoginLog) error
	PageLoginLog(limit, offset int, opts ...DBOption) (int64, []model.LoginLog, error)

	WithByIP(ip string) DBOption
	WithByStatus(status string) DBOption
	WithByGroup(group string) DBOption
	WithByLikeOperation(operation string) DBOption
	CleanOperation() error
	CreateOperationLog(user *model.OperationLog) error
	PageOperationLog(limit, offset int, opts ...DBOption) (int64, []model.OperationLog, error)
}

func NewILogRepo

func NewILogRepo() ILogRepo

type IMysqlRepo

type IMysqlRepo interface {
	Get(opts ...DBOption) (model.DatabaseMysql, error)
	WithByMysqlName(mysqlName string) DBOption
	List(opts ...DBOption) ([]model.DatabaseMysql, error)
	Page(limit, offset int, opts ...DBOption) (int64, []model.DatabaseMysql, error)
	Create(ctx context.Context, mysql *model.DatabaseMysql) error
	Delete(ctx context.Context, opts ...DBOption) error
	Update(id uint, vars map[string]interface{}) error
	UpdateDatabaseInfo(id uint, vars map[string]interface{}) error
	DeleteAll(ctx context.Context) error
}

func NewIMysqlRepo

func NewIMysqlRepo() IMysqlRepo

type ISSLRepo

type ISSLRepo interface {
	WithByAlias(alias string) DBOption
	WithByAcmeAccountId(acmeAccountId uint) DBOption
	WithByDnsAccountId(dnsAccountId uint) DBOption
	Page(page, size int, opts ...DBOption) (int64, []model.WebsiteSSL, error)
	GetFirst(opts ...DBOption) (model.WebsiteSSL, error)
	List(opts ...DBOption) ([]model.WebsiteSSL, error)
	Create(ctx context.Context, ssl *model.WebsiteSSL) error
	Save(ssl model.WebsiteSSL) error
	DeleteBy(opts ...DBOption) error
}

func NewISSLRepo

func NewISSLRepo() ISSLRepo

type ISettingRepo

type ISettingRepo interface {
	GetList(opts ...DBOption) ([]model.Setting, error)
	Get(opts ...DBOption) (model.Setting, error)
	Create(key, value string) error
	Update(key, value string) error
	WithByKey(key string) DBOption
}

func NewISettingRepo

func NewISettingRepo() ISettingRepo

type ISnapshotRepo

type ISnapshotRepo interface {
	Get(opts ...DBOption) (model.Snapshot, error)
	GetList(opts ...DBOption) ([]model.Snapshot, error)
	Create(snap *model.Snapshot) error
	Update(id uint, vars map[string]interface{}) error
	Page(limit, offset int, opts ...DBOption) (int64, []model.Snapshot, error)
	Delete(opts ...DBOption) error
}

func NewISnapshotRepo

func NewISnapshotRepo() ISnapshotRepo

type IWebsiteRepo

type IWebsiteRepo interface {
	WithAppInstallId(appInstallId uint) DBOption
	WithDomain(domain string) DBOption
	WithAlias(alias string) DBOption
	WithWebsiteSSLID(sslId uint) DBOption
	WithGroupID(groupId uint) DBOption
	WithDefaultServer() DBOption
	WithDomainLike(domain string) DBOption
	Page(page, size int, opts ...DBOption) (int64, []model.Website, error)
	List(opts ...DBOption) ([]model.Website, error)
	GetFirst(opts ...DBOption) (model.Website, error)
	GetBy(opts ...DBOption) ([]model.Website, error)
	Save(ctx context.Context, app *model.Website) error
	SaveWithoutCtx(app *model.Website) error
	DeleteBy(ctx context.Context, opts ...DBOption) error
	Create(ctx context.Context, app *model.Website) error
}

func NewIWebsiteRepo

func NewIWebsiteRepo() IWebsiteRepo

type ImageRepoRepo

type ImageRepoRepo struct{}

func (*ImageRepoRepo) Create

func (u *ImageRepoRepo) Create(imageRepo *model.ImageRepo) error

func (*ImageRepoRepo) Delete

func (u *ImageRepoRepo) Delete(opts ...DBOption) error

func (*ImageRepoRepo) Get

func (u *ImageRepoRepo) Get(opts ...DBOption) (model.ImageRepo, error)

func (*ImageRepoRepo) List

func (u *ImageRepoRepo) List(opts ...DBOption) ([]model.ImageRepo, error)

func (*ImageRepoRepo) Page

func (u *ImageRepoRepo) Page(page, size int, opts ...DBOption) (int64, []model.ImageRepo, error)

func (*ImageRepoRepo) Update

func (u *ImageRepoRepo) Update(id uint, vars map[string]interface{}) error

type LogRepo

type LogRepo struct{}

func (*LogRepo) CleanLogin

func (u *LogRepo) CleanLogin() error

func (*LogRepo) CleanOperation

func (u *LogRepo) CleanOperation() error

func (*LogRepo) CreateLoginLog

func (u *LogRepo) CreateLoginLog(log *model.LoginLog) error

func (*LogRepo) CreateOperationLog

func (u *LogRepo) CreateOperationLog(log *model.OperationLog) error

func (*LogRepo) PageLoginLog

func (u *LogRepo) PageLoginLog(page, size int, opts ...DBOption) (int64, []model.LoginLog, error)

func (*LogRepo) PageOperationLog

func (u *LogRepo) PageOperationLog(page, size int, opts ...DBOption) (int64, []model.OperationLog, error)

func (*LogRepo) WithByGroup

func (c *LogRepo) WithByGroup(group string) DBOption

func (*LogRepo) WithByIP

func (c *LogRepo) WithByIP(ip string) DBOption

func (*LogRepo) WithByLikeOperation

func (c *LogRepo) WithByLikeOperation(operation string) DBOption

func (*LogRepo) WithByStatus

func (c *LogRepo) WithByStatus(status string) DBOption

type MysqlRepo

type MysqlRepo struct{}

func (*MysqlRepo) Create

func (u *MysqlRepo) Create(ctx context.Context, mysql *model.DatabaseMysql) error

func (*MysqlRepo) Delete

func (u *MysqlRepo) Delete(ctx context.Context, opts ...DBOption) error

func (*MysqlRepo) DeleteAll added in v1.0.1

func (u *MysqlRepo) DeleteAll(ctx context.Context) error

func (*MysqlRepo) Get

func (u *MysqlRepo) Get(opts ...DBOption) (model.DatabaseMysql, error)

func (*MysqlRepo) List

func (u *MysqlRepo) List(opts ...DBOption) ([]model.DatabaseMysql, error)

func (*MysqlRepo) Page

func (u *MysqlRepo) Page(page, size int, opts ...DBOption) (int64, []model.DatabaseMysql, error)

func (*MysqlRepo) Update

func (u *MysqlRepo) Update(id uint, vars map[string]interface{}) error

func (*MysqlRepo) UpdateDatabaseInfo

func (u *MysqlRepo) UpdateDatabaseInfo(id uint, vars map[string]interface{}) error

func (*MysqlRepo) WithByMysqlName

func (u *MysqlRepo) WithByMysqlName(mysqlName string) DBOption

type RootInfo

type RootInfo struct {
	ID            uint   `json:"id"`
	Name          string `json:"name"`
	Port          int64  `json:"port"`
	Password      string `json:"password"`
	ContainerName string `json:"containerName"`
	Param         string `json:"param"`
	Env           string `json:"env"`
	Key           string `json:"key"`
	Version       string `json:"version"`
}

type SettingRepo

type SettingRepo struct{}

func (*SettingRepo) Create

func (u *SettingRepo) Create(key, value string) error

func (*SettingRepo) Get

func (u *SettingRepo) Get(opts ...DBOption) (model.Setting, error)

func (*SettingRepo) GetList

func (u *SettingRepo) GetList(opts ...DBOption) ([]model.Setting, error)

func (*SettingRepo) Update

func (u *SettingRepo) Update(key, value string) error

func (*SettingRepo) WithByKey

func (c *SettingRepo) WithByKey(key string) DBOption

type SnapshotRepo

type SnapshotRepo struct{}

func (*SnapshotRepo) Create

func (u *SnapshotRepo) Create(Snapshot *model.Snapshot) error

func (*SnapshotRepo) Delete

func (u *SnapshotRepo) Delete(opts ...DBOption) error

func (*SnapshotRepo) Get

func (u *SnapshotRepo) Get(opts ...DBOption) (model.Snapshot, error)

func (*SnapshotRepo) GetList

func (u *SnapshotRepo) GetList(opts ...DBOption) ([]model.Snapshot, error)

func (*SnapshotRepo) Page

func (u *SnapshotRepo) Page(page, size int, opts ...DBOption) (int64, []model.Snapshot, error)

func (*SnapshotRepo) Update

func (u *SnapshotRepo) Update(id uint, vars map[string]interface{}) error

type TagRepo

type TagRepo struct {
}

func (TagRepo) All

func (t TagRepo) All() ([]model.Tag, error)

func (TagRepo) BatchCreate

func (t TagRepo) BatchCreate(ctx context.Context, tags []*model.Tag) error

func (TagRepo) DeleteAll

func (t TagRepo) DeleteAll(ctx context.Context) error

func (TagRepo) GetByAppId

func (t TagRepo) GetByAppId(appId uint) ([]model.Tag, error)

func (TagRepo) GetByIds

func (t TagRepo) GetByIds(ids []uint) ([]model.Tag, error)

func (TagRepo) GetByKeys

func (t TagRepo) GetByKeys(keys []string) ([]model.Tag, error)

type WebsiteAcmeAccountRepo

type WebsiteAcmeAccountRepo struct {
}

func (*WebsiteAcmeAccountRepo) Create

func (*WebsiteAcmeAccountRepo) DeleteBy

func (w *WebsiteAcmeAccountRepo) DeleteBy(opts ...DBOption) error

func (*WebsiteAcmeAccountRepo) GetFirst

func (*WebsiteAcmeAccountRepo) Page

func (w *WebsiteAcmeAccountRepo) Page(page, size int, opts ...DBOption) (int64, []model.WebsiteAcmeAccount, error)

func (*WebsiteAcmeAccountRepo) Save

func (*WebsiteAcmeAccountRepo) WithEmail

func (w *WebsiteAcmeAccountRepo) WithEmail(email string) DBOption

type WebsiteDnsAccountRepo

type WebsiteDnsAccountRepo struct {
}

func (WebsiteDnsAccountRepo) Create

func (WebsiteDnsAccountRepo) DeleteBy

func (w WebsiteDnsAccountRepo) DeleteBy(opts ...DBOption) error

func (WebsiteDnsAccountRepo) GetFirst

func (WebsiteDnsAccountRepo) List

func (WebsiteDnsAccountRepo) Page

func (w WebsiteDnsAccountRepo) Page(page, size int, opts ...DBOption) (int64, []model.WebsiteDnsAccount, error)

func (WebsiteDnsAccountRepo) Save

type WebsiteDomainRepo

type WebsiteDomainRepo struct {
}

func (WebsiteDomainRepo) BatchCreate

func (w WebsiteDomainRepo) BatchCreate(ctx context.Context, domains []model.WebsiteDomain) error

func (WebsiteDomainRepo) Create

func (WebsiteDomainRepo) DeleteBy

func (w WebsiteDomainRepo) DeleteBy(ctx context.Context, opts ...DBOption) error

func (WebsiteDomainRepo) GetBy

func (w WebsiteDomainRepo) GetBy(opts ...DBOption) ([]model.WebsiteDomain, error)

func (WebsiteDomainRepo) GetFirst

func (w WebsiteDomainRepo) GetFirst(opts ...DBOption) (model.WebsiteDomain, error)

func (WebsiteDomainRepo) Page

func (w WebsiteDomainRepo) Page(page, size int, opts ...DBOption) (int64, []model.WebsiteDomain, error)

func (WebsiteDomainRepo) Save

func (WebsiteDomainRepo) WithDomain

func (w WebsiteDomainRepo) WithDomain(domain string) DBOption

func (WebsiteDomainRepo) WithPort

func (w WebsiteDomainRepo) WithPort(port int) DBOption

func (WebsiteDomainRepo) WithWebsiteId

func (w WebsiteDomainRepo) WithWebsiteId(websiteId uint) DBOption

type WebsiteGroupRepo

type WebsiteGroupRepo struct {
}

func (WebsiteGroupRepo) CancelDefault

func (w WebsiteGroupRepo) CancelDefault() error

func (WebsiteGroupRepo) Create

func (w WebsiteGroupRepo) Create(app *model.WebsiteGroup) error

func (WebsiteGroupRepo) DeleteBy

func (w WebsiteGroupRepo) DeleteBy(opts ...DBOption) error

func (WebsiteGroupRepo) GetBy

func (w WebsiteGroupRepo) GetBy(opts ...DBOption) ([]model.WebsiteGroup, error)

func (WebsiteGroupRepo) Page

func (w WebsiteGroupRepo) Page(page, size int, opts ...DBOption) (int64, []model.WebsiteGroup, error)

func (WebsiteGroupRepo) Save

type WebsiteRepo

type WebsiteRepo struct {
}

func (*WebsiteRepo) Create

func (w *WebsiteRepo) Create(ctx context.Context, app *model.Website) error

func (*WebsiteRepo) DeleteBy

func (w *WebsiteRepo) DeleteBy(ctx context.Context, opts ...DBOption) error

func (*WebsiteRepo) GetBy

func (w *WebsiteRepo) GetBy(opts ...DBOption) ([]model.Website, error)

func (*WebsiteRepo) GetFirst

func (w *WebsiteRepo) GetFirst(opts ...DBOption) (model.Website, error)

func (*WebsiteRepo) List

func (w *WebsiteRepo) List(opts ...DBOption) ([]model.Website, error)

func (*WebsiteRepo) Page

func (w *WebsiteRepo) Page(page, size int, opts ...DBOption) (int64, []model.Website, error)

func (*WebsiteRepo) Save

func (w *WebsiteRepo) Save(ctx context.Context, app *model.Website) error

func (*WebsiteRepo) SaveWithoutCtx

func (w *WebsiteRepo) SaveWithoutCtx(website *model.Website) error

func (*WebsiteRepo) WithAlias

func (w *WebsiteRepo) WithAlias(alias string) DBOption

func (*WebsiteRepo) WithAppInstallId

func (w *WebsiteRepo) WithAppInstallId(appInstallId uint) DBOption

func (*WebsiteRepo) WithDefaultServer

func (w *WebsiteRepo) WithDefaultServer() DBOption

func (*WebsiteRepo) WithDomain

func (w *WebsiteRepo) WithDomain(domain string) DBOption

func (*WebsiteRepo) WithDomainLike

func (w *WebsiteRepo) WithDomainLike(domain string) DBOption

func (*WebsiteRepo) WithGroupID

func (w *WebsiteRepo) WithGroupID(groupId uint) DBOption

func (*WebsiteRepo) WithWebsiteSSLID

func (w *WebsiteRepo) WithWebsiteSSLID(sslId uint) DBOption

type WebsiteSSLRepo

type WebsiteSSLRepo struct {
}

func (WebsiteSSLRepo) Create

func (w WebsiteSSLRepo) Create(ctx context.Context, ssl *model.WebsiteSSL) error

func (WebsiteSSLRepo) DeleteBy

func (w WebsiteSSLRepo) DeleteBy(opts ...DBOption) error

func (WebsiteSSLRepo) GetFirst

func (w WebsiteSSLRepo) GetFirst(opts ...DBOption) (model.WebsiteSSL, error)

func (WebsiteSSLRepo) List

func (w WebsiteSSLRepo) List(opts ...DBOption) ([]model.WebsiteSSL, error)

func (WebsiteSSLRepo) Page

func (w WebsiteSSLRepo) Page(page, size int, opts ...DBOption) (int64, []model.WebsiteSSL, error)

func (WebsiteSSLRepo) Save

func (w WebsiteSSLRepo) Save(ssl model.WebsiteSSL) error

func (WebsiteSSLRepo) WithByAcmeAccountId

func (w WebsiteSSLRepo) WithByAcmeAccountId(acmeAccountId uint) DBOption

func (WebsiteSSLRepo) WithByAlias

func (w WebsiteSSLRepo) WithByAlias(alias string) DBOption

func (WebsiteSSLRepo) WithByDnsAccountId

func (w WebsiteSSLRepo) WithByDnsAccountId(dnsAccountId uint) DBOption

Jump to

Keyboard shortcuts

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