serverRepo

package
v0.0.0-...-b92f783 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigRepo

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

func NewConfigRepo

func NewConfigRepo(db *gorm.DB) *ConfigRepo

func (*ConfigRepo) Create

func (r *ConfigRepo) Create(model *model.ZdConfig) (err error)

func (*ConfigRepo) GenConfigRes

func (r *ConfigRepo) GenConfigRes(config model.ZdConfig, res *domain.ResConfig)

func (*ConfigRepo) Get

func (r *ConfigRepo) Get(id uint) (model model.ZdConfig, err error)

func (*ConfigRepo) List

func (r *ConfigRepo) List(keywords string, page int) (models []*model.ZdConfig, total int, err error)

func (*ConfigRepo) ListAll

func (r *ConfigRepo) ListAll() (models []*model.ZdConfig)

func (*ConfigRepo) Remove

func (r *ConfigRepo) Remove(id uint) (err error)

func (*ConfigRepo) Update

func (r *ConfigRepo) Update(model *model.ZdConfig) (err error)

func (*ConfigRepo) UpdateConfigRange

func (r *ConfigRepo) UpdateConfigRange(rang string, id uint) (err error)

func (*ConfigRepo) UpdateYaml

func (r *ConfigRepo) UpdateYaml(po model.ZdConfig) (err error)

type DefRepo

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

func NewDefRepo

func NewDefRepo(db *gorm.DB) *DefRepo

func (*DefRepo) Create

func (r *DefRepo) Create(def *model.ZdDef) (err error)

func (*DefRepo) GenDef

func (r *DefRepo) GenDef(def model.ZdDef, data *domain.DefData)

func (*DefRepo) Get

func (r *DefRepo) Get(id uint) (def model.ZdDef, err error)

func (*DefRepo) List

func (r *DefRepo) List(keywords string, page int) (models []*model.ZdDef, total int, err error)

func (*DefRepo) ListAll

func (r *DefRepo) ListAll() (models []*model.ZdDef)

func (*DefRepo) Remove

func (r *DefRepo) Remove(id uint) (err error)

func (*DefRepo) Update

func (r *DefRepo) Update(def *model.ZdDef) (err error)

func (*DefRepo) UpdateYaml

func (r *DefRepo) UpdateYaml(po model.ZdDef) (err error)

type ExcelRepo

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

func NewExcelRepo

func NewExcelRepo(db *gorm.DB) *ExcelRepo

func (*ExcelRepo) Create

func (r *ExcelRepo) Create(model *model.ZdExcel) (err error)

func (*ExcelRepo) Get

func (r *ExcelRepo) Get(id uint) (model model.ZdExcel, err error)

func (*ExcelRepo) GetBySheet

func (r *ExcelRepo) GetBySheet(referName, sheet string) (model model.ZdExcel, err error)

func (*ExcelRepo) List

func (r *ExcelRepo) List(keywords string, page int) (models []*model.ZdExcel, total int, err error)

func (*ExcelRepo) ListAll

func (r *ExcelRepo) ListAll() (models []*model.ZdExcel)

func (*ExcelRepo) ListFiles

func (r *ExcelRepo) ListFiles() (models []*model.ZdExcel)

func (*ExcelRepo) ListSheets

func (r *ExcelRepo) ListSheets(referName string) (models []*model.ZdExcel)

func (*ExcelRepo) Remove

func (r *ExcelRepo) Remove(id uint) (err error)

func (*ExcelRepo) Update

func (r *ExcelRepo) Update(model *model.ZdExcel) (err error)

type FieldRepo

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

func NewFieldRepo

func NewFieldRepo(db *gorm.DB) *FieldRepo

func (*FieldRepo) AddOrderForNextCases

func (r *FieldRepo) AddOrderForNextCases(srcID uint, targetOrder int, targetParentID uint) (err error)

func (*FieldRepo) AddOrderForTargetAndNextCases

func (r *FieldRepo) AddOrderForTargetAndNextCases(srcID uint, targetOrder int, targetParentID uint) (err error)

func (*FieldRepo) CreateTreeNode

func (r *FieldRepo) CreateTreeNode(defId, targetId uint, name string, mode string) (field *model.ZdField, err error)

func (*FieldRepo) Get

func (r *FieldRepo) Get(fieldId uint) (field model.ZdField, err error)

func (*FieldRepo) GetChildren

func (r *FieldRepo) GetChildren(defId, fieldId uint) (children []*model.ZdField, err error)

func (*FieldRepo) GetDefFieldTree

func (r *FieldRepo) GetDefFieldTree(defId uint) (root *model.ZdField, err error)

func (*FieldRepo) GetMaxOrder

func (r *FieldRepo) GetMaxOrder(parentId uint) (ord int)

func (*FieldRepo) ListByDef

func (r *FieldRepo) ListByDef(defId uint) (fields []*model.ZdField, err error)

func (*FieldRepo) Remove

func (r *FieldRepo) Remove(id uint) (err error)

func (*FieldRepo) Save

func (r *FieldRepo) Save(field *model.ZdField) (err error)

func (*FieldRepo) SetIsRange

func (r *FieldRepo) SetIsRange(fieldId uint, b bool) (err error)

func (*FieldRepo) UpdateOrdAndParent

func (r *FieldRepo) UpdateOrdAndParent(field model.ZdField) (err error)

func (*FieldRepo) UpdateRange

func (r *FieldRepo) UpdateRange(rang string, id uint) (err error)

type InstancesRepo

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

func NewInstancesRepo

func NewInstancesRepo(db *gorm.DB) *InstancesRepo

func (*InstancesRepo) Create

func (r *InstancesRepo) Create(model *model.ZdInstances) (err error)

func (*InstancesRepo) GenInst

func (r *InstancesRepo) GenInst(po model.ZdInstances, res *domain.ResInstances)

func (*InstancesRepo) Get

func (r *InstancesRepo) Get(id uint) (model model.ZdInstances, err error)

func (*InstancesRepo) GetItem

func (r *InstancesRepo) GetItem(itemId uint) (item model.ZdInstancesItem, err error)

func (*InstancesRepo) GetItemTree

func (r *InstancesRepo) GetItemTree(instancesId uint) (root model.ZdInstancesItem)

func (*InstancesRepo) GetItems

func (r *InstancesRepo) GetItems(instancesId uint) (items []*model.ZdInstancesItem, err error)

func (*InstancesRepo) GetMaxOrder

func (r *InstancesRepo) GetMaxOrder(instancesId int) (ord int)

func (*InstancesRepo) List

func (r *InstancesRepo) List(keywords string, page int) (models []*model.ZdInstances, total int, err error)

func (*InstancesRepo) ListAll

func (r *InstancesRepo) ListAll() (models []*model.ZdInstances)

func (*InstancesRepo) Remove

func (r *InstancesRepo) Remove(id uint) (err error)

func (*InstancesRepo) RemoveItem

func (r *InstancesRepo) RemoveItem(id uint) (err error)

func (*InstancesRepo) SaveItem

func (r *InstancesRepo) SaveItem(item *model.ZdInstancesItem) (err error)

func (*InstancesRepo) SetIsRange

func (r *InstancesRepo) SetIsRange(id uint, b bool) (err error)

func (*InstancesRepo) Update

func (r *InstancesRepo) Update(model *model.ZdInstances) (err error)

func (*InstancesRepo) UpdateItemRange

func (r *InstancesRepo) UpdateItemRange(rang string, id uint) (err error)

func (*InstancesRepo) UpdateYaml

func (r *InstancesRepo) UpdateYaml(po model.ZdInstances) (err error)

type MockRepo

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

func (*MockRepo) ChangeSampleSrc

func (r *MockRepo) ChangeSampleSrc(mockId int, req model.ZdMockSampleSrc) (err error)

func (*MockRepo) Get

func (r *MockRepo) Get(id uint) (po model.ZdMock, err error)

func (*MockRepo) GetByDefID

func (r *MockRepo) GetByDefID(defId uint) (po model.ZdMock)

func (*MockRepo) GetByPath

func (r *MockRepo) GetByPath(path string) (po model.ZdMock, err error)

func (*MockRepo) GetSampleSrc

func (r *MockRepo) GetSampleSrc(mockId uint, key string) (po model.ZdMockSampleSrc, err error)

func (*MockRepo) List

func (r *MockRepo) List(keywords string, page int) (pos []*model.ZdMock, total int, err error)

func (*MockRepo) ListSampleSrc

func (r *MockRepo) ListSampleSrc(mockId int) (pos []model.ZdMockSampleSrc, err error)

func (*MockRepo) Remove

func (r *MockRepo) Remove(id uint) (err error)

func (*MockRepo) Save

func (r *MockRepo) Save(po *model.ZdMock) (err error)

type RangesRepo

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

func NewRangesRepo

func NewRangesRepo(db *gorm.DB) *RangesRepo

func (*RangesRepo) Create

func (r *RangesRepo) Create(ranges *model.ZdRanges) (err error)

func (*RangesRepo) GenRangesRes

func (r *RangesRepo) GenRangesRes(ranges model.ZdRanges, res *domain.ResRanges)

func (*RangesRepo) Get

func (r *RangesRepo) Get(id uint) (ranges model.ZdRanges, err error)

func (*RangesRepo) GetItem

func (r *RangesRepo) GetItem(itemId uint) (item model.ZdRangesItem, err error)

func (*RangesRepo) GetItems

func (r *RangesRepo) GetItems(rangesId int) (items []*model.ZdRangesItem, err error)

func (*RangesRepo) GetMaxOrder

func (r *RangesRepo) GetMaxOrder(rangesId int) (ord int)

func (*RangesRepo) List

func (r *RangesRepo) List(keywords string, page int) (models []*model.ZdRanges, total int, err error)

func (*RangesRepo) ListAll

func (r *RangesRepo) ListAll() (models []*model.ZdRanges)

func (*RangesRepo) Remove

func (r *RangesRepo) Remove(id uint) (err error)

func (*RangesRepo) RemoveItem

func (r *RangesRepo) RemoveItem(id uint) (err error)

func (*RangesRepo) SaveItem

func (r *RangesRepo) SaveItem(item *model.ZdRangesItem) (err error)

func (*RangesRepo) Update

func (r *RangesRepo) Update(ranges *model.ZdRanges) (err error)

func (*RangesRepo) UpdateItemRange

func (r *RangesRepo) UpdateItemRange(rang string, id uint) (err error)

func (*RangesRepo) UpdateYaml

func (r *RangesRepo) UpdateYaml(po model.ZdRanges) (err error)

type ReferRepo

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

func NewReferRepo

func NewReferRepo(db *gorm.DB) *ReferRepo

func (*ReferRepo) Create

func (r *ReferRepo) Create(refer *model.ZdRefer) (err error)

func (*ReferRepo) CreateDefault

func (r *ReferRepo) CreateDefault(ownerId uint, ownerType string) (err error)

func (*ReferRepo) GetByOwnerId

func (r *ReferRepo) GetByOwnerId(fieldId uint) (refer model.ZdRefer, err error)

func (*ReferRepo) GetByOwnerIdAndType

func (r *ReferRepo) GetByOwnerIdAndType(fieldId uint, ownerType string) (refer model.ZdRefer, err error)

func (*ReferRepo) Save

func (r *ReferRepo) Save(ref *model.ZdRefer) (err error)

type SectionRepo

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

func NewSectionRepo

func NewSectionRepo(db *gorm.DB) *SectionRepo

func (*SectionRepo) Create

func (r *SectionRepo) Create(section *model.ZdSection) (err error)

func (*SectionRepo) Get

func (r *SectionRepo) Get(id uint, ownerType string) (section model.ZdSection, err error)

func (*SectionRepo) List

func (r *SectionRepo) List(ownerId uint, ownerType string) (sections []*model.ZdSection, err error)

func (*SectionRepo) Remove

func (r *SectionRepo) Remove(id uint, ownerType string) (err error)

func (*SectionRepo) SaveFieldSectionToDB

func (r *SectionRepo) SaveFieldSectionToDB(typ, desc, stepStr string, count int, countTag string,
	ord int, fieldID uint, ownerType string)

func (*SectionRepo) Update

func (r *SectionRepo) Update(section *model.ZdSection) (err error)

type TextRepo

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

func NewTextRepo

func NewTextRepo(db *gorm.DB) *TextRepo

func (*TextRepo) Create

func (r *TextRepo) Create(model *model.ZdText) (err error)

func (*TextRepo) Get

func (r *TextRepo) Get(id uint) (model model.ZdText, err error)

func (*TextRepo) List

func (r *TextRepo) List(keywords string, page int) (models []*model.ZdText, total int, err error)

func (*TextRepo) ListAll

func (r *TextRepo) ListAll() (models []*model.ZdText)

func (*TextRepo) Remove

func (r *TextRepo) Remove(id uint) (err error)

func (*TextRepo) Update

func (r *TextRepo) Update(model *model.ZdText) (err error)

Jump to

Keyboard shortcuts

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