Documentation
¶
Overview ¶
generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go
generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go
generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go
generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go
generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go
do not modify, generated file
generated code - do not edit
generated code - do not edit
generated code - do not edit
generated code - do not edit
Index ¶
- Variables
- func CopyBackRepoToBackRepoData(backRepo *BackRepoStruct, backRepoData *BackRepoData)
- func GetID[T models.Gongstruct](stage *models.Stage, backRepo *BackRepoStruct, instance *T) (id int)
- func GetIDPointer[T models.PointerToGongstruct](stage *models.Stage, backRepo *BackRepoStruct, instance T) (id int)
- func GetInstanceDBFromInstance[T models.Gongstruct, T2 GongstructDB](stage *models.Stage, backRepo *BackRepoStruct, instance *T) (ret *T2)
- type BackRepoData
- type BackRepoDisplaySelectionStruct
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) Backup(dirPath string)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) BackupXL(file *xlsx.File)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CheckoutPhaseOne() (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CheckoutPhaseOneInstance(displayselectionDB *DisplaySelectionDB) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, displayselectionDB *DisplaySelectionDB) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitPhaseOneInstance(displayselection *models.DisplaySelection) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, displayselection *models.DisplaySelection) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) GetDB() db.DBInterface
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) GetDisplaySelectionDBFromDisplaySelectionPtr(displayselection *models.DisplaySelection) (displayselectionDB *DisplaySelectionDB)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) GetStage() (stage *models.Stage)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, displayselection *models.DisplaySelection) (Error error)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) RestorePhaseOne(dirPath string)
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) RestorePhaseTwo()
- func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoStruct
- func (backRepo *BackRepoStruct) Backup(stage *models.Stage, dirPath string)
- func (backRepo *BackRepoStruct) BackupXL(stage *models.Stage, dirPath string)
- func (backRepo *BackRepoStruct) Checkout(stage *models.Stage)
- func (backRepo *BackRepoStruct) CheckoutDisplaySelection(displayselection *models.DisplaySelection)
- func (backRepo *BackRepoStruct) CheckoutXLCell(xlcell *models.XLCell)
- func (backRepo *BackRepoStruct) CheckoutXLFile(xlfile *models.XLFile)
- func (backRepo *BackRepoStruct) CheckoutXLRow(xlrow *models.XLRow)
- func (backRepo *BackRepoStruct) CheckoutXLSheet(xlsheet *models.XLSheet)
- func (backRepo *BackRepoStruct) Commit(stage *models.Stage)
- func (backRepo *BackRepoStruct) CommitDisplaySelection(displayselection *models.DisplaySelection)
- func (backRepo *BackRepoStruct) CommitXLCell(xlcell *models.XLCell)
- func (backRepo *BackRepoStruct) CommitXLFile(xlfile *models.XLFile)
- func (backRepo *BackRepoStruct) CommitXLRow(xlrow *models.XLRow)
- func (backRepo *BackRepoStruct) CommitXLSheet(xlsheet *models.XLSheet)
- func (backRepo *BackRepoStruct) GetLastCommitFromBackNb() uint
- func (backRepo *BackRepoStruct) GetLastPushFromFrontNb() uint
- func (backRepo *BackRepoStruct) GetStage() (stage *models.Stage)
- func (backRepo *BackRepoStruct) IncrementCommitFromBackNb() uint
- func (backRepo *BackRepoStruct) IncrementPushFromFrontNb() uint
- func (backRepo *BackRepoStruct) Restore(stage *models.Stage, dirPath string)
- func (backRepo *BackRepoStruct) RestoreXL(stage *models.Stage, dirPath string)
- func (backRepoStruct *BackRepoStruct) SubscribeToCommitNb(ctx context.Context) <-chan int
- type BackRepoXLCellStruct
- func (backRepoXLCell *BackRepoXLCellStruct) Backup(dirPath string)
- func (backRepoXLCell *BackRepoXLCellStruct) BackupXL(file *xlsx.File)
- func (backRepoXLCell *BackRepoXLCellStruct) CheckoutPhaseOne() (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) CheckoutPhaseOneInstance(xlcellDB *XLCellDB) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, xlcellDB *XLCellDB) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) CommitPhaseOneInstance(xlcell *models.XLCell) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, xlcell *models.XLCell) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) GetDB() db.DBInterface
- func (backRepoXLCell *BackRepoXLCellStruct) GetStage() (stage *models.Stage)
- func (backRepoXLCell *BackRepoXLCellStruct) GetXLCellDBFromXLCellPtr(xlcell *models.XLCell) (xlcellDB *XLCellDB)
- func (backRepoXLCell *BackRepoXLCellStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, xlcell *models.XLCell) (Error error)
- func (backRepoXLCell *BackRepoXLCellStruct) RestorePhaseOne(dirPath string)
- func (backRepoXLCell *BackRepoXLCellStruct) RestorePhaseTwo()
- func (backRepoXLCell *BackRepoXLCellStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoXLFileStruct
- func (backRepoXLFile *BackRepoXLFileStruct) Backup(dirPath string)
- func (backRepoXLFile *BackRepoXLFileStruct) BackupXL(file *xlsx.File)
- func (backRepoXLFile *BackRepoXLFileStruct) CheckoutPhaseOne() (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) CheckoutPhaseOneInstance(xlfileDB *XLFileDB) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, xlfileDB *XLFileDB) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) CommitPhaseOneInstance(xlfile *models.XLFile) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, xlfile *models.XLFile) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) GetDB() db.DBInterface
- func (backRepoXLFile *BackRepoXLFileStruct) GetStage() (stage *models.Stage)
- func (backRepoXLFile *BackRepoXLFileStruct) GetXLFileDBFromXLFilePtr(xlfile *models.XLFile) (xlfileDB *XLFileDB)
- func (backRepoXLFile *BackRepoXLFileStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, xlfile *models.XLFile) (Error error)
- func (backRepoXLFile *BackRepoXLFileStruct) RestorePhaseOne(dirPath string)
- func (backRepoXLFile *BackRepoXLFileStruct) RestorePhaseTwo()
- func (backRepoXLFile *BackRepoXLFileStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoXLRowStruct
- func (backRepoXLRow *BackRepoXLRowStruct) Backup(dirPath string)
- func (backRepoXLRow *BackRepoXLRowStruct) BackupXL(file *xlsx.File)
- func (backRepoXLRow *BackRepoXLRowStruct) CheckoutPhaseOne() (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) CheckoutPhaseOneInstance(xlrowDB *XLRowDB) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, xlrowDB *XLRowDB) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) CommitPhaseOneInstance(xlrow *models.XLRow) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, xlrow *models.XLRow) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) GetDB() db.DBInterface
- func (backRepoXLRow *BackRepoXLRowStruct) GetStage() (stage *models.Stage)
- func (backRepoXLRow *BackRepoXLRowStruct) GetXLRowDBFromXLRowPtr(xlrow *models.XLRow) (xlrowDB *XLRowDB)
- func (backRepoXLRow *BackRepoXLRowStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, xlrow *models.XLRow) (Error error)
- func (backRepoXLRow *BackRepoXLRowStruct) RestorePhaseOne(dirPath string)
- func (backRepoXLRow *BackRepoXLRowStruct) RestorePhaseTwo()
- func (backRepoXLRow *BackRepoXLRowStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoXLSheetStruct
- func (backRepoXLSheet *BackRepoXLSheetStruct) Backup(dirPath string)
- func (backRepoXLSheet *BackRepoXLSheetStruct) BackupXL(file *xlsx.File)
- func (backRepoXLSheet *BackRepoXLSheetStruct) CheckoutPhaseOne() (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) CheckoutPhaseOneInstance(xlsheetDB *XLSheetDB) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, xlsheetDB *XLSheetDB) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) CommitPhaseOneInstance(xlsheet *models.XLSheet) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, xlsheet *models.XLSheet) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) GetDB() db.DBInterface
- func (backRepoXLSheet *BackRepoXLSheetStruct) GetStage() (stage *models.Stage)
- func (backRepoXLSheet *BackRepoXLSheetStruct) GetXLSheetDBFromXLSheetPtr(xlsheet *models.XLSheet) (xlsheetDB *XLSheetDB)
- func (backRepoXLSheet *BackRepoXLSheetStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, xlsheet *models.XLSheet) (Error error)
- func (backRepoXLSheet *BackRepoXLSheetStruct) RestorePhaseOne(dirPath string)
- func (backRepoXLSheet *BackRepoXLSheetStruct) RestorePhaseTwo()
- func (backRepoXLSheet *BackRepoXLSheetStruct) RestoreXLPhaseOne(file *xlsx.File)
- type DBLite
- func (db *DBLite) Create(instanceDB any) (db.DBInterface, error)
- func (db *DBLite) Delete(instanceDB any) (db.DBInterface, error)
- func (db *DBLite) Find(instanceDBs any) (db.DBInterface, error)
- func (db *DBLite) First(instanceDB any, conds ...any) (db.DBInterface, error)
- func (db *DBLite) Model(instanceDB any) (db.DBInterface, error)
- func (db *DBLite) Save(instanceDB any) (db.DBInterface, error)
- func (db *DBLite) Unscoped() (db.DBInterface, error)
- func (db *DBLite) Updates(instanceDB any) (db.DBInterface, error)
- type DisplaySelectionAPI
- type DisplaySelectionDB
- func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsFromDisplaySelection(displayselection *models.DisplaySelection)
- func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsFromDisplaySelectionWOP(displayselection *DisplaySelectionWOP)
- func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsFromDisplaySelection_WOP(displayselection *models.DisplaySelection_WOP)
- func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsToDisplaySelection(displayselection *models.DisplaySelection)
- func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsToDisplaySelectionWOP(displayselection *DisplaySelectionWOP)
- func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsToDisplaySelection_WOP(displayselection *models.DisplaySelection_WOP)
- func (displayselectionDB *DisplaySelectionDB) DecodePointers(backRepo *BackRepoStruct, displayselection *models.DisplaySelection)
- type DisplaySelectionDBResponse
- type DisplaySelectionDBs
- type DisplaySelectionPointersEncoding
- type DisplaySelectionWOP
- type GongstructDB
- type IntSlice
- type XLCellAPI
- type XLCellDB
- func (xlcellDB *XLCellDB) CopyBasicFieldsFromXLCell(xlcell *models.XLCell)
- func (xlcellDB *XLCellDB) CopyBasicFieldsFromXLCellWOP(xlcell *XLCellWOP)
- func (xlcellDB *XLCellDB) CopyBasicFieldsFromXLCell_WOP(xlcell *models.XLCell_WOP)
- func (xlcellDB *XLCellDB) CopyBasicFieldsToXLCell(xlcell *models.XLCell)
- func (xlcellDB *XLCellDB) CopyBasicFieldsToXLCellWOP(xlcell *XLCellWOP)
- func (xlcellDB *XLCellDB) CopyBasicFieldsToXLCell_WOP(xlcell *models.XLCell_WOP)
- func (xlcellDB *XLCellDB) DecodePointers(backRepo *BackRepoStruct, xlcell *models.XLCell)
- type XLCellDBResponse
- type XLCellDBs
- type XLCellPointersEncoding
- type XLCellWOP
- type XLFileAPI
- type XLFileDB
- func (xlfileDB *XLFileDB) CopyBasicFieldsFromXLFile(xlfile *models.XLFile)
- func (xlfileDB *XLFileDB) CopyBasicFieldsFromXLFileWOP(xlfile *XLFileWOP)
- func (xlfileDB *XLFileDB) CopyBasicFieldsFromXLFile_WOP(xlfile *models.XLFile_WOP)
- func (xlfileDB *XLFileDB) CopyBasicFieldsToXLFile(xlfile *models.XLFile)
- func (xlfileDB *XLFileDB) CopyBasicFieldsToXLFileWOP(xlfile *XLFileWOP)
- func (xlfileDB *XLFileDB) CopyBasicFieldsToXLFile_WOP(xlfile *models.XLFile_WOP)
- func (xlfileDB *XLFileDB) DecodePointers(backRepo *BackRepoStruct, xlfile *models.XLFile)
- type XLFileDBResponse
- type XLFileDBs
- type XLFilePointersEncoding
- type XLFileWOP
- type XLRowAPI
- type XLRowDB
- func (xlrowDB *XLRowDB) CopyBasicFieldsFromXLRow(xlrow *models.XLRow)
- func (xlrowDB *XLRowDB) CopyBasicFieldsFromXLRowWOP(xlrow *XLRowWOP)
- func (xlrowDB *XLRowDB) CopyBasicFieldsFromXLRow_WOP(xlrow *models.XLRow_WOP)
- func (xlrowDB *XLRowDB) CopyBasicFieldsToXLRow(xlrow *models.XLRow)
- func (xlrowDB *XLRowDB) CopyBasicFieldsToXLRowWOP(xlrow *XLRowWOP)
- func (xlrowDB *XLRowDB) CopyBasicFieldsToXLRow_WOP(xlrow *models.XLRow_WOP)
- func (xlrowDB *XLRowDB) DecodePointers(backRepo *BackRepoStruct, xlrow *models.XLRow)
- type XLRowDBResponse
- type XLRowDBs
- type XLRowPointersEncoding
- type XLRowWOP
- type XLSheetAPI
- type XLSheetDB
- func (xlsheetDB *XLSheetDB) CopyBasicFieldsFromXLSheet(xlsheet *models.XLSheet)
- func (xlsheetDB *XLSheetDB) CopyBasicFieldsFromXLSheetWOP(xlsheet *XLSheetWOP)
- func (xlsheetDB *XLSheetDB) CopyBasicFieldsFromXLSheet_WOP(xlsheet *models.XLSheet_WOP)
- func (xlsheetDB *XLSheetDB) CopyBasicFieldsToXLSheet(xlsheet *models.XLSheet)
- func (xlsheetDB *XLSheetDB) CopyBasicFieldsToXLSheetWOP(xlsheet *XLSheetWOP)
- func (xlsheetDB *XLSheetDB) CopyBasicFieldsToXLSheet_WOP(xlsheet *models.XLSheet_WOP)
- func (xlsheetDB *XLSheetDB) DecodePointers(backRepo *BackRepoStruct, xlsheet *models.XLSheet)
- type XLSheetDBResponse
- type XLSheetDBs
- type XLSheetPointersEncoding
- type XLSheetWOP
Constants ¶
This section is empty.
Variables ¶
var BackRepoDisplaySelectionid_atBckpTime_newID map[uint]uint
this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering
var BackRepoXLCellid_atBckpTime_newID map[uint]uint
this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering
var BackRepoXLFileid_atBckpTime_newID map[uint]uint
this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering
var BackRepoXLRowid_atBckpTime_newID map[uint]uint
this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering
var BackRepoXLSheetid_atBckpTime_newID map[uint]uint
this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering
var DisplaySelection_Fields = []string{
"ID",
"Name",
}
var XLCell_Fields = []string{
"ID",
"Name",
"X",
"Y",
}
var XLFile_Fields = []string{
"ID",
"Name",
"NbSheets",
}
var XLRow_Fields = []string{
"ID",
"Name",
"RowIndex",
}
var XLSheet_Fields = []string{
"ID",
"Name",
"MaxRow",
"MaxCol",
"NbRows",
}
Functions ¶
func CopyBackRepoToBackRepoData ¶
func CopyBackRepoToBackRepoData(backRepo *BackRepoStruct, backRepoData *BackRepoData)
func GetID ¶
func GetID[T models.Gongstruct]( stage *models.Stage, backRepo *BackRepoStruct, instance *T) (id int)
func GetIDPointer ¶
func GetIDPointer[T models.PointerToGongstruct]( stage *models.Stage, backRepo *BackRepoStruct, instance T) (id int)
func GetInstanceDBFromInstance ¶
func GetInstanceDBFromInstance[T models.Gongstruct, T2 GongstructDB]( stage *models.Stage, backRepo *BackRepoStruct, instance *T) (ret *T2)
Types ¶
type BackRepoData ¶
type BackRepoData struct { DisplaySelectionAPIs []*DisplaySelectionAPI XLCellAPIs []*XLCellAPI XLFileAPIs []*XLFileAPI XLRowAPIs []*XLRowAPI XLSheetAPIs []*XLSheetAPI // index of the web socket for this stack type (unique among all stack instances) GONG__Index int }
type BackRepoDisplaySelectionStruct ¶
type BackRepoDisplaySelectionStruct struct { // stores DisplaySelectionDB according to their gorm ID Map_DisplaySelectionDBID_DisplaySelectionDB map[uint]*DisplaySelectionDB // stores DisplaySelectionDB ID according to DisplaySelection address Map_DisplaySelectionPtr_DisplaySelectionDBID map[*models.DisplaySelection]uint // stores DisplaySelection according to their gorm ID Map_DisplaySelectionDBID_DisplaySelectionPtr map[uint]*models.DisplaySelection // contains filtered or unexported fields }
func (*BackRepoDisplaySelectionStruct) Backup ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) Backup(dirPath string)
Backup generates a json file from a slice of all DisplaySelectionDB instances in the backrepo
func (*BackRepoDisplaySelectionStruct) BackupXL ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all DisplaySelectionDB instances in the backrepo
func (*BackRepoDisplaySelectionStruct) CheckoutPhaseOne ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CheckoutPhaseOne() (Error error)
BackRepoDisplaySelection.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage
Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)
func (*BackRepoDisplaySelectionStruct) CheckoutPhaseOneInstance ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CheckoutPhaseOneInstance(displayselectionDB *DisplaySelectionDB) (Error error)
CheckoutPhaseOneInstance takes a displayselectionDB that has been found in the DB, updates the backRepo and stages the models version of the displayselectionDB
func (*BackRepoDisplaySelectionStruct) CheckoutPhaseTwo ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoDisplaySelection.CheckoutPhaseTwo Checkouts all staged instances of DisplaySelection to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDisplaySelectionStruct) CheckoutPhaseTwoInstance ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, displayselectionDB *DisplaySelectionDB) (Error error)
BackRepoDisplaySelection.CheckoutPhaseTwoInstance Checkouts staged instances of DisplaySelection to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDisplaySelectionStruct) CommitDeleteInstance ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoDisplaySelection.CommitDeleteInstance commits deletion of DisplaySelection to the BackRepo
func (*BackRepoDisplaySelectionStruct) CommitPhaseOne ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoDisplaySelection.CommitPhaseOne commits all staged instances of DisplaySelection to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoDisplaySelectionStruct) CommitPhaseOneInstance ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitPhaseOneInstance(displayselection *models.DisplaySelection) (Error error)
BackRepoDisplaySelection.CommitPhaseOneInstance commits displayselection staged instances of DisplaySelection to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoDisplaySelectionStruct) CommitPhaseTwo ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoDisplaySelection.CommitPhaseTwo commits all staged instances of DisplaySelection to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDisplaySelectionStruct) CommitPhaseTwoInstance ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, displayselection *models.DisplaySelection) (Error error)
BackRepoDisplaySelection.CommitPhaseTwoInstance commits {{structname }} of models.DisplaySelection to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDisplaySelectionStruct) GetDB ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) GetDB() db.DBInterface
func (*BackRepoDisplaySelectionStruct) GetDisplaySelectionDBFromDisplaySelectionPtr ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) GetDisplaySelectionDBFromDisplaySelectionPtr(displayselection *models.DisplaySelection) (displayselectionDB *DisplaySelectionDB)
GetDisplaySelectionDBFromDisplaySelectionPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoDisplaySelectionStruct) GetStage ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) GetStage() (stage *models.Stage)
func (*BackRepoDisplaySelectionStruct) ResetReversePointers ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoDisplaySelection.ResetReversePointers commits all staged instances of DisplaySelection to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDisplaySelectionStruct) ResetReversePointersInstance ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, displayselection *models.DisplaySelection) (Error error)
func (*BackRepoDisplaySelectionStruct) RestorePhaseOne ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "DisplaySelectionDB.json" in dirPath that stores an array of DisplaySelectionDB and stores it in the database the map BackRepoDisplaySelectionid_atBckpTime_newID is updated accordingly
func (*BackRepoDisplaySelectionStruct) RestorePhaseTwo ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<DisplaySelection>id_atBckpTime_newID to compute new index
func (*BackRepoDisplaySelectionStruct) RestoreXLPhaseOne ¶
func (backRepoDisplaySelection *BackRepoDisplaySelectionStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "DisplaySelection" sheet all DisplaySelectionDB instances
type BackRepoStruct ¶
type BackRepoStruct struct { // insertion point for per struct back repo declarations BackRepoDisplaySelection BackRepoDisplaySelectionStruct BackRepoXLCell BackRepoXLCellStruct BackRepoXLFile BackRepoXLFileStruct BackRepoXLRow BackRepoXLRowStruct BackRepoXLSheet BackRepoXLSheetStruct CommitFromBackNb uint // records commit increments when performed by the back PushFromFrontNb uint // records commit increments when performed by the front // contains filtered or unexported fields }
BackRepoStruct supports callback functions
func NewBackRepo ¶
func NewBackRepo(stage *models.Stage, filename string) (backRepo *BackRepoStruct)
func (*BackRepoStruct) Backup ¶
func (backRepo *BackRepoStruct) Backup(stage *models.Stage, dirPath string)
Backup the BackRepoStruct
func (*BackRepoStruct) BackupXL ¶
func (backRepo *BackRepoStruct) BackupXL(stage *models.Stage, dirPath string)
Backup in XL the BackRepoStruct
func (*BackRepoStruct) Checkout ¶
func (backRepo *BackRepoStruct) Checkout(stage *models.Stage)
Checkout the database into the stage
func (*BackRepoStruct) CheckoutDisplaySelection ¶
func (backRepo *BackRepoStruct) CheckoutDisplaySelection(displayselection *models.DisplaySelection)
CommitDisplaySelection allows checkout of a single displayselection (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutXLCell ¶
func (backRepo *BackRepoStruct) CheckoutXLCell(xlcell *models.XLCell)
CommitXLCell allows checkout of a single xlcell (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutXLFile ¶
func (backRepo *BackRepoStruct) CheckoutXLFile(xlfile *models.XLFile)
CommitXLFile allows checkout of a single xlfile (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutXLRow ¶
func (backRepo *BackRepoStruct) CheckoutXLRow(xlrow *models.XLRow)
CommitXLRow allows checkout of a single xlrow (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutXLSheet ¶
func (backRepo *BackRepoStruct) CheckoutXLSheet(xlsheet *models.XLSheet)
CommitXLSheet allows checkout of a single xlsheet (if already staged and with a BackRepo id)
func (*BackRepoStruct) Commit ¶
func (backRepo *BackRepoStruct) Commit(stage *models.Stage)
Commit the BackRepoStruct inner variables and link to the database
func (*BackRepoStruct) CommitDisplaySelection ¶
func (backRepo *BackRepoStruct) CommitDisplaySelection(displayselection *models.DisplaySelection)
CommitDisplaySelection allows commit of a single displayselection (if already staged)
func (*BackRepoStruct) CommitXLCell ¶
func (backRepo *BackRepoStruct) CommitXLCell(xlcell *models.XLCell)
CommitXLCell allows commit of a single xlcell (if already staged)
func (*BackRepoStruct) CommitXLFile ¶
func (backRepo *BackRepoStruct) CommitXLFile(xlfile *models.XLFile)
CommitXLFile allows commit of a single xlfile (if already staged)
func (*BackRepoStruct) CommitXLRow ¶
func (backRepo *BackRepoStruct) CommitXLRow(xlrow *models.XLRow)
CommitXLRow allows commit of a single xlrow (if already staged)
func (*BackRepoStruct) CommitXLSheet ¶
func (backRepo *BackRepoStruct) CommitXLSheet(xlsheet *models.XLSheet)
CommitXLSheet allows commit of a single xlsheet (if already staged)
func (*BackRepoStruct) GetLastCommitFromBackNb ¶
func (backRepo *BackRepoStruct) GetLastCommitFromBackNb() uint
func (*BackRepoStruct) GetLastPushFromFrontNb ¶
func (backRepo *BackRepoStruct) GetLastPushFromFrontNb() uint
func (*BackRepoStruct) GetStage ¶
func (backRepo *BackRepoStruct) GetStage() (stage *models.Stage)
func (*BackRepoStruct) IncrementCommitFromBackNb ¶
func (backRepo *BackRepoStruct) IncrementCommitFromBackNb() uint
func (*BackRepoStruct) IncrementPushFromFrontNb ¶
func (backRepo *BackRepoStruct) IncrementPushFromFrontNb() uint
func (*BackRepoStruct) Restore ¶
func (backRepo *BackRepoStruct) Restore(stage *models.Stage, dirPath string)
Restore the database into the back repo
func (*BackRepoStruct) RestoreXL ¶
func (backRepo *BackRepoStruct) RestoreXL(stage *models.Stage, dirPath string)
Restore the database into the back repo
func (*BackRepoStruct) SubscribeToCommitNb ¶
func (backRepoStruct *BackRepoStruct) SubscribeToCommitNb(ctx context.Context) <-chan int
type BackRepoXLCellStruct ¶
type BackRepoXLCellStruct struct { // stores XLCellDB according to their gorm ID Map_XLCellDBID_XLCellDB map[uint]*XLCellDB // stores XLCellDB ID according to XLCell address Map_XLCellPtr_XLCellDBID map[*models.XLCell]uint // stores XLCell according to their gorm ID Map_XLCellDBID_XLCellPtr map[uint]*models.XLCell // contains filtered or unexported fields }
func (*BackRepoXLCellStruct) Backup ¶
func (backRepoXLCell *BackRepoXLCellStruct) Backup(dirPath string)
Backup generates a json file from a slice of all XLCellDB instances in the backrepo
func (*BackRepoXLCellStruct) BackupXL ¶
func (backRepoXLCell *BackRepoXLCellStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all XLCellDB instances in the backrepo
func (*BackRepoXLCellStruct) CheckoutPhaseOne ¶
func (backRepoXLCell *BackRepoXLCellStruct) CheckoutPhaseOne() (Error error)
BackRepoXLCell.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage
Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)
func (*BackRepoXLCellStruct) CheckoutPhaseOneInstance ¶
func (backRepoXLCell *BackRepoXLCellStruct) CheckoutPhaseOneInstance(xlcellDB *XLCellDB) (Error error)
CheckoutPhaseOneInstance takes a xlcellDB that has been found in the DB, updates the backRepo and stages the models version of the xlcellDB
func (*BackRepoXLCellStruct) CheckoutPhaseTwo ¶
func (backRepoXLCell *BackRepoXLCellStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoXLCell.CheckoutPhaseTwo Checkouts all staged instances of XLCell to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLCellStruct) CheckoutPhaseTwoInstance ¶
func (backRepoXLCell *BackRepoXLCellStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, xlcellDB *XLCellDB) (Error error)
BackRepoXLCell.CheckoutPhaseTwoInstance Checkouts staged instances of XLCell to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLCellStruct) CommitDeleteInstance ¶
func (backRepoXLCell *BackRepoXLCellStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoXLCell.CommitDeleteInstance commits deletion of XLCell to the BackRepo
func (*BackRepoXLCellStruct) CommitPhaseOne ¶
func (backRepoXLCell *BackRepoXLCellStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoXLCell.CommitPhaseOne commits all staged instances of XLCell to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoXLCellStruct) CommitPhaseOneInstance ¶
func (backRepoXLCell *BackRepoXLCellStruct) CommitPhaseOneInstance(xlcell *models.XLCell) (Error error)
BackRepoXLCell.CommitPhaseOneInstance commits xlcell staged instances of XLCell to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoXLCellStruct) CommitPhaseTwo ¶
func (backRepoXLCell *BackRepoXLCellStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoXLCell.CommitPhaseTwo commits all staged instances of XLCell to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLCellStruct) CommitPhaseTwoInstance ¶
func (backRepoXLCell *BackRepoXLCellStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, xlcell *models.XLCell) (Error error)
BackRepoXLCell.CommitPhaseTwoInstance commits {{structname }} of models.XLCell to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLCellStruct) GetDB ¶
func (backRepoXLCell *BackRepoXLCellStruct) GetDB() db.DBInterface
func (*BackRepoXLCellStruct) GetStage ¶
func (backRepoXLCell *BackRepoXLCellStruct) GetStage() (stage *models.Stage)
func (*BackRepoXLCellStruct) GetXLCellDBFromXLCellPtr ¶
func (backRepoXLCell *BackRepoXLCellStruct) GetXLCellDBFromXLCellPtr(xlcell *models.XLCell) (xlcellDB *XLCellDB)
GetXLCellDBFromXLCellPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoXLCellStruct) ResetReversePointers ¶
func (backRepoXLCell *BackRepoXLCellStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoXLCell.ResetReversePointers commits all staged instances of XLCell to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLCellStruct) ResetReversePointersInstance ¶
func (backRepoXLCell *BackRepoXLCellStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, xlcell *models.XLCell) (Error error)
func (*BackRepoXLCellStruct) RestorePhaseOne ¶
func (backRepoXLCell *BackRepoXLCellStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "XLCellDB.json" in dirPath that stores an array of XLCellDB and stores it in the database the map BackRepoXLCellid_atBckpTime_newID is updated accordingly
func (*BackRepoXLCellStruct) RestorePhaseTwo ¶
func (backRepoXLCell *BackRepoXLCellStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<XLCell>id_atBckpTime_newID to compute new index
func (*BackRepoXLCellStruct) RestoreXLPhaseOne ¶
func (backRepoXLCell *BackRepoXLCellStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "XLCell" sheet all XLCellDB instances
type BackRepoXLFileStruct ¶
type BackRepoXLFileStruct struct { // stores XLFileDB according to their gorm ID Map_XLFileDBID_XLFileDB map[uint]*XLFileDB // stores XLFileDB ID according to XLFile address Map_XLFilePtr_XLFileDBID map[*models.XLFile]uint // stores XLFile according to their gorm ID Map_XLFileDBID_XLFilePtr map[uint]*models.XLFile // contains filtered or unexported fields }
func (*BackRepoXLFileStruct) Backup ¶
func (backRepoXLFile *BackRepoXLFileStruct) Backup(dirPath string)
Backup generates a json file from a slice of all XLFileDB instances in the backrepo
func (*BackRepoXLFileStruct) BackupXL ¶
func (backRepoXLFile *BackRepoXLFileStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all XLFileDB instances in the backrepo
func (*BackRepoXLFileStruct) CheckoutPhaseOne ¶
func (backRepoXLFile *BackRepoXLFileStruct) CheckoutPhaseOne() (Error error)
BackRepoXLFile.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage
Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)
func (*BackRepoXLFileStruct) CheckoutPhaseOneInstance ¶
func (backRepoXLFile *BackRepoXLFileStruct) CheckoutPhaseOneInstance(xlfileDB *XLFileDB) (Error error)
CheckoutPhaseOneInstance takes a xlfileDB that has been found in the DB, updates the backRepo and stages the models version of the xlfileDB
func (*BackRepoXLFileStruct) CheckoutPhaseTwo ¶
func (backRepoXLFile *BackRepoXLFileStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoXLFile.CheckoutPhaseTwo Checkouts all staged instances of XLFile to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLFileStruct) CheckoutPhaseTwoInstance ¶
func (backRepoXLFile *BackRepoXLFileStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, xlfileDB *XLFileDB) (Error error)
BackRepoXLFile.CheckoutPhaseTwoInstance Checkouts staged instances of XLFile to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLFileStruct) CommitDeleteInstance ¶
func (backRepoXLFile *BackRepoXLFileStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoXLFile.CommitDeleteInstance commits deletion of XLFile to the BackRepo
func (*BackRepoXLFileStruct) CommitPhaseOne ¶
func (backRepoXLFile *BackRepoXLFileStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoXLFile.CommitPhaseOne commits all staged instances of XLFile to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoXLFileStruct) CommitPhaseOneInstance ¶
func (backRepoXLFile *BackRepoXLFileStruct) CommitPhaseOneInstance(xlfile *models.XLFile) (Error error)
BackRepoXLFile.CommitPhaseOneInstance commits xlfile staged instances of XLFile to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoXLFileStruct) CommitPhaseTwo ¶
func (backRepoXLFile *BackRepoXLFileStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoXLFile.CommitPhaseTwo commits all staged instances of XLFile to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLFileStruct) CommitPhaseTwoInstance ¶
func (backRepoXLFile *BackRepoXLFileStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, xlfile *models.XLFile) (Error error)
BackRepoXLFile.CommitPhaseTwoInstance commits {{structname }} of models.XLFile to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLFileStruct) GetDB ¶
func (backRepoXLFile *BackRepoXLFileStruct) GetDB() db.DBInterface
func (*BackRepoXLFileStruct) GetStage ¶
func (backRepoXLFile *BackRepoXLFileStruct) GetStage() (stage *models.Stage)
func (*BackRepoXLFileStruct) GetXLFileDBFromXLFilePtr ¶
func (backRepoXLFile *BackRepoXLFileStruct) GetXLFileDBFromXLFilePtr(xlfile *models.XLFile) (xlfileDB *XLFileDB)
GetXLFileDBFromXLFilePtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoXLFileStruct) ResetReversePointers ¶
func (backRepoXLFile *BackRepoXLFileStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoXLFile.ResetReversePointers commits all staged instances of XLFile to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLFileStruct) ResetReversePointersInstance ¶
func (backRepoXLFile *BackRepoXLFileStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, xlfile *models.XLFile) (Error error)
func (*BackRepoXLFileStruct) RestorePhaseOne ¶
func (backRepoXLFile *BackRepoXLFileStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "XLFileDB.json" in dirPath that stores an array of XLFileDB and stores it in the database the map BackRepoXLFileid_atBckpTime_newID is updated accordingly
func (*BackRepoXLFileStruct) RestorePhaseTwo ¶
func (backRepoXLFile *BackRepoXLFileStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<XLFile>id_atBckpTime_newID to compute new index
func (*BackRepoXLFileStruct) RestoreXLPhaseOne ¶
func (backRepoXLFile *BackRepoXLFileStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "XLFile" sheet all XLFileDB instances
type BackRepoXLRowStruct ¶
type BackRepoXLRowStruct struct { // stores XLRowDB according to their gorm ID Map_XLRowDBID_XLRowDB map[uint]*XLRowDB // stores XLRowDB ID according to XLRow address Map_XLRowPtr_XLRowDBID map[*models.XLRow]uint // stores XLRow according to their gorm ID Map_XLRowDBID_XLRowPtr map[uint]*models.XLRow // contains filtered or unexported fields }
func (*BackRepoXLRowStruct) Backup ¶
func (backRepoXLRow *BackRepoXLRowStruct) Backup(dirPath string)
Backup generates a json file from a slice of all XLRowDB instances in the backrepo
func (*BackRepoXLRowStruct) BackupXL ¶
func (backRepoXLRow *BackRepoXLRowStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all XLRowDB instances in the backrepo
func (*BackRepoXLRowStruct) CheckoutPhaseOne ¶
func (backRepoXLRow *BackRepoXLRowStruct) CheckoutPhaseOne() (Error error)
BackRepoXLRow.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage
Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)
func (*BackRepoXLRowStruct) CheckoutPhaseOneInstance ¶
func (backRepoXLRow *BackRepoXLRowStruct) CheckoutPhaseOneInstance(xlrowDB *XLRowDB) (Error error)
CheckoutPhaseOneInstance takes a xlrowDB that has been found in the DB, updates the backRepo and stages the models version of the xlrowDB
func (*BackRepoXLRowStruct) CheckoutPhaseTwo ¶
func (backRepoXLRow *BackRepoXLRowStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoXLRow.CheckoutPhaseTwo Checkouts all staged instances of XLRow to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLRowStruct) CheckoutPhaseTwoInstance ¶
func (backRepoXLRow *BackRepoXLRowStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, xlrowDB *XLRowDB) (Error error)
BackRepoXLRow.CheckoutPhaseTwoInstance Checkouts staged instances of XLRow to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLRowStruct) CommitDeleteInstance ¶
func (backRepoXLRow *BackRepoXLRowStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoXLRow.CommitDeleteInstance commits deletion of XLRow to the BackRepo
func (*BackRepoXLRowStruct) CommitPhaseOne ¶
func (backRepoXLRow *BackRepoXLRowStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoXLRow.CommitPhaseOne commits all staged instances of XLRow to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoXLRowStruct) CommitPhaseOneInstance ¶
func (backRepoXLRow *BackRepoXLRowStruct) CommitPhaseOneInstance(xlrow *models.XLRow) (Error error)
BackRepoXLRow.CommitPhaseOneInstance commits xlrow staged instances of XLRow to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoXLRowStruct) CommitPhaseTwo ¶
func (backRepoXLRow *BackRepoXLRowStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoXLRow.CommitPhaseTwo commits all staged instances of XLRow to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLRowStruct) CommitPhaseTwoInstance ¶
func (backRepoXLRow *BackRepoXLRowStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, xlrow *models.XLRow) (Error error)
BackRepoXLRow.CommitPhaseTwoInstance commits {{structname }} of models.XLRow to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLRowStruct) GetDB ¶
func (backRepoXLRow *BackRepoXLRowStruct) GetDB() db.DBInterface
func (*BackRepoXLRowStruct) GetStage ¶
func (backRepoXLRow *BackRepoXLRowStruct) GetStage() (stage *models.Stage)
func (*BackRepoXLRowStruct) GetXLRowDBFromXLRowPtr ¶
func (backRepoXLRow *BackRepoXLRowStruct) GetXLRowDBFromXLRowPtr(xlrow *models.XLRow) (xlrowDB *XLRowDB)
GetXLRowDBFromXLRowPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoXLRowStruct) ResetReversePointers ¶
func (backRepoXLRow *BackRepoXLRowStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoXLRow.ResetReversePointers commits all staged instances of XLRow to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLRowStruct) ResetReversePointersInstance ¶
func (backRepoXLRow *BackRepoXLRowStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, xlrow *models.XLRow) (Error error)
func (*BackRepoXLRowStruct) RestorePhaseOne ¶
func (backRepoXLRow *BackRepoXLRowStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "XLRowDB.json" in dirPath that stores an array of XLRowDB and stores it in the database the map BackRepoXLRowid_atBckpTime_newID is updated accordingly
func (*BackRepoXLRowStruct) RestorePhaseTwo ¶
func (backRepoXLRow *BackRepoXLRowStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<XLRow>id_atBckpTime_newID to compute new index
func (*BackRepoXLRowStruct) RestoreXLPhaseOne ¶
func (backRepoXLRow *BackRepoXLRowStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "XLRow" sheet all XLRowDB instances
type BackRepoXLSheetStruct ¶
type BackRepoXLSheetStruct struct { // stores XLSheetDB according to their gorm ID Map_XLSheetDBID_XLSheetDB map[uint]*XLSheetDB // stores XLSheetDB ID according to XLSheet address Map_XLSheetPtr_XLSheetDBID map[*models.XLSheet]uint // stores XLSheet according to their gorm ID Map_XLSheetDBID_XLSheetPtr map[uint]*models.XLSheet // contains filtered or unexported fields }
func (*BackRepoXLSheetStruct) Backup ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) Backup(dirPath string)
Backup generates a json file from a slice of all XLSheetDB instances in the backrepo
func (*BackRepoXLSheetStruct) BackupXL ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all XLSheetDB instances in the backrepo
func (*BackRepoXLSheetStruct) CheckoutPhaseOne ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) CheckoutPhaseOne() (Error error)
BackRepoXLSheet.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage
Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)
func (*BackRepoXLSheetStruct) CheckoutPhaseOneInstance ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) CheckoutPhaseOneInstance(xlsheetDB *XLSheetDB) (Error error)
CheckoutPhaseOneInstance takes a xlsheetDB that has been found in the DB, updates the backRepo and stages the models version of the xlsheetDB
func (*BackRepoXLSheetStruct) CheckoutPhaseTwo ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoXLSheet.CheckoutPhaseTwo Checkouts all staged instances of XLSheet to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLSheetStruct) CheckoutPhaseTwoInstance ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, xlsheetDB *XLSheetDB) (Error error)
BackRepoXLSheet.CheckoutPhaseTwoInstance Checkouts staged instances of XLSheet to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLSheetStruct) CommitDeleteInstance ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoXLSheet.CommitDeleteInstance commits deletion of XLSheet to the BackRepo
func (*BackRepoXLSheetStruct) CommitPhaseOne ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoXLSheet.CommitPhaseOne commits all staged instances of XLSheet to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoXLSheetStruct) CommitPhaseOneInstance ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) CommitPhaseOneInstance(xlsheet *models.XLSheet) (Error error)
BackRepoXLSheet.CommitPhaseOneInstance commits xlsheet staged instances of XLSheet to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance
func (*BackRepoXLSheetStruct) CommitPhaseTwo ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoXLSheet.CommitPhaseTwo commits all staged instances of XLSheet to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLSheetStruct) CommitPhaseTwoInstance ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, xlsheet *models.XLSheet) (Error error)
BackRepoXLSheet.CommitPhaseTwoInstance commits {{structname }} of models.XLSheet to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLSheetStruct) GetDB ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) GetDB() db.DBInterface
func (*BackRepoXLSheetStruct) GetStage ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) GetStage() (stage *models.Stage)
func (*BackRepoXLSheetStruct) GetXLSheetDBFromXLSheetPtr ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) GetXLSheetDBFromXLSheetPtr(xlsheet *models.XLSheet) (xlsheetDB *XLSheetDB)
GetXLSheetDBFromXLSheetPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoXLSheetStruct) ResetReversePointers ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoXLSheet.ResetReversePointers commits all staged instances of XLSheet to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoXLSheetStruct) ResetReversePointersInstance ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, xlsheet *models.XLSheet) (Error error)
func (*BackRepoXLSheetStruct) RestorePhaseOne ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "XLSheetDB.json" in dirPath that stores an array of XLSheetDB and stores it in the database the map BackRepoXLSheetid_atBckpTime_newID is updated accordingly
func (*BackRepoXLSheetStruct) RestorePhaseTwo ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<XLSheet>id_atBckpTime_newID to compute new index
func (*BackRepoXLSheetStruct) RestoreXLPhaseOne ¶
func (backRepoXLSheet *BackRepoXLSheetStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "XLSheet" sheet all XLSheetDB instances
type DBLite ¶
type DBLite struct {
// contains filtered or unexported fields
}
DBLite is an in-memory database implementation of DBInterface
func (*DBLite) Create ¶
func (db *DBLite) Create(instanceDB any) (db.DBInterface, error)
Create inserts a new record into the database
func (*DBLite) Delete ¶
func (db *DBLite) Delete(instanceDB any) (db.DBInterface, error)
Delete removes a record from the database
func (*DBLite) Find ¶
func (db *DBLite) Find(instanceDBs any) (db.DBInterface, error)
Find retrieves all records of a type from the database
func (*DBLite) Model ¶
func (db *DBLite) Model(instanceDB any) (db.DBInterface, error)
Model is a placeholder in this implementation
func (*DBLite) Save ¶
func (db *DBLite) Save(instanceDB any) (db.DBInterface, error)
Save updates or inserts a record into the database
type DisplaySelectionAPI ¶
type DisplaySelectionAPI struct { gorm.Model models.DisplaySelection_WOP // encoding of pointers // for API, it cannot be embedded DisplaySelectionPointersEncoding DisplaySelectionPointersEncoding }
DisplaySelectionAPI is the input in POST API
for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations
swagger:model displayselectionAPI
type DisplaySelectionDB ¶
type DisplaySelectionDB struct { gorm.Model // Declation for basic field displayselectionDB.Name Name_Data sql.NullString // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration DisplaySelectionPointersEncoding }
DisplaySelectionDB describes a displayselection in the database
It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers
swagger:model displayselectionDB
func (*DisplaySelectionDB) CopyBasicFieldsFromDisplaySelection ¶
func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsFromDisplaySelection(displayselection *models.DisplaySelection)
CopyBasicFieldsFromDisplaySelection
func (*DisplaySelectionDB) CopyBasicFieldsFromDisplaySelectionWOP ¶
func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsFromDisplaySelectionWOP(displayselection *DisplaySelectionWOP)
CopyBasicFieldsFromDisplaySelectionWOP
func (*DisplaySelectionDB) CopyBasicFieldsFromDisplaySelection_WOP ¶
func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsFromDisplaySelection_WOP(displayselection *models.DisplaySelection_WOP)
CopyBasicFieldsFromDisplaySelection_WOP
func (*DisplaySelectionDB) CopyBasicFieldsToDisplaySelection ¶
func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsToDisplaySelection(displayselection *models.DisplaySelection)
CopyBasicFieldsToDisplaySelection
func (*DisplaySelectionDB) CopyBasicFieldsToDisplaySelectionWOP ¶
func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsToDisplaySelectionWOP(displayselection *DisplaySelectionWOP)
CopyBasicFieldsToDisplaySelectionWOP
func (*DisplaySelectionDB) CopyBasicFieldsToDisplaySelection_WOP ¶
func (displayselectionDB *DisplaySelectionDB) CopyBasicFieldsToDisplaySelection_WOP(displayselection *models.DisplaySelection_WOP)
CopyBasicFieldsToDisplaySelection_WOP
func (*DisplaySelectionDB) DecodePointers ¶
func (displayselectionDB *DisplaySelectionDB) DecodePointers(backRepo *BackRepoStruct, displayselection *models.DisplaySelection)
type DisplaySelectionDBResponse ¶
type DisplaySelectionDBResponse struct {
DisplaySelectionDB
}
DisplaySelectionDBResponse provides response swagger:response displayselectionDBResponse
type DisplaySelectionDBs ¶
type DisplaySelectionDBs []DisplaySelectionDB
DisplaySelectionDBs arrays displayselectionDBs swagger:response displayselectionDBsResponse
type DisplaySelectionPointersEncoding ¶
type DisplaySelectionPointersEncoding struct { // field XLFile is a pointer to another Struct (optional or 0..1) // This field is generated into another field to enable AS ONE association XLFileID sql.NullInt64 // field XLSheet is a pointer to another Struct (optional or 0..1) // This field is generated into another field to enable AS ONE association XLSheetID sql.NullInt64 }
DisplaySelectionPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type DisplaySelectionWOP ¶
DisplaySelectionWOP is a DisplaySelection without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type GongstructDB ¶
type GongstructDB interface { }
type IntSlice ¶
type IntSlice []int
type XLCellAPI ¶
type XLCellAPI struct { gorm.Model models.XLCell_WOP // encoding of pointers // for API, it cannot be embedded XLCellPointersEncoding XLCellPointersEncoding }
XLCellAPI is the input in POST API
for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations
swagger:model xlcellAPI
type XLCellDB ¶
type XLCellDB struct { gorm.Model // Declation for basic field xlcellDB.Name Name_Data sql.NullString // Declation for basic field xlcellDB.X X_Data sql.NullInt64 // Declation for basic field xlcellDB.Y Y_Data sql.NullInt64 // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration XLCellPointersEncoding }
XLCellDB describes a xlcell in the database
It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers
swagger:model xlcellDB
func (*XLCellDB) CopyBasicFieldsFromXLCell ¶
CopyBasicFieldsFromXLCell
func (*XLCellDB) CopyBasicFieldsFromXLCellWOP ¶
CopyBasicFieldsFromXLCellWOP
func (*XLCellDB) CopyBasicFieldsFromXLCell_WOP ¶
func (xlcellDB *XLCellDB) CopyBasicFieldsFromXLCell_WOP(xlcell *models.XLCell_WOP)
CopyBasicFieldsFromXLCell_WOP
func (*XLCellDB) CopyBasicFieldsToXLCell ¶
CopyBasicFieldsToXLCell
func (*XLCellDB) CopyBasicFieldsToXLCellWOP ¶
CopyBasicFieldsToXLCellWOP
func (*XLCellDB) CopyBasicFieldsToXLCell_WOP ¶
func (xlcellDB *XLCellDB) CopyBasicFieldsToXLCell_WOP(xlcell *models.XLCell_WOP)
CopyBasicFieldsToXLCell_WOP
func (*XLCellDB) DecodePointers ¶
func (xlcellDB *XLCellDB) DecodePointers(backRepo *BackRepoStruct, xlcell *models.XLCell)
type XLCellDBResponse ¶
type XLCellDBResponse struct {
XLCellDB
}
XLCellDBResponse provides response swagger:response xlcellDBResponse
type XLCellDBs ¶
type XLCellDBs []XLCellDB
XLCellDBs arrays xlcellDBs swagger:response xlcellDBsResponse
type XLCellPointersEncoding ¶
type XLCellPointersEncoding struct { }
XLCellPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type XLCellWOP ¶
type XLCellWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` X int `xlsx:"2"` Y int `xlsx:"3"` }
XLCellWOP is a XLCell without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type XLFileAPI ¶
type XLFileAPI struct { gorm.Model models.XLFile_WOP // encoding of pointers // for API, it cannot be embedded XLFilePointersEncoding XLFilePointersEncoding }
XLFileAPI is the input in POST API
for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations
swagger:model xlfileAPI
type XLFileDB ¶
type XLFileDB struct { gorm.Model // Declation for basic field xlfileDB.Name Name_Data sql.NullString // Declation for basic field xlfileDB.NbSheets NbSheets_Data sql.NullInt64 // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration XLFilePointersEncoding }
XLFileDB describes a xlfile in the database
It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers
swagger:model xlfileDB
func (*XLFileDB) CopyBasicFieldsFromXLFile ¶
CopyBasicFieldsFromXLFile
func (*XLFileDB) CopyBasicFieldsFromXLFileWOP ¶
CopyBasicFieldsFromXLFileWOP
func (*XLFileDB) CopyBasicFieldsFromXLFile_WOP ¶
func (xlfileDB *XLFileDB) CopyBasicFieldsFromXLFile_WOP(xlfile *models.XLFile_WOP)
CopyBasicFieldsFromXLFile_WOP
func (*XLFileDB) CopyBasicFieldsToXLFile ¶
CopyBasicFieldsToXLFile
func (*XLFileDB) CopyBasicFieldsToXLFileWOP ¶
CopyBasicFieldsToXLFileWOP
func (*XLFileDB) CopyBasicFieldsToXLFile_WOP ¶
func (xlfileDB *XLFileDB) CopyBasicFieldsToXLFile_WOP(xlfile *models.XLFile_WOP)
CopyBasicFieldsToXLFile_WOP
func (*XLFileDB) DecodePointers ¶
func (xlfileDB *XLFileDB) DecodePointers(backRepo *BackRepoStruct, xlfile *models.XLFile)
type XLFileDBResponse ¶
type XLFileDBResponse struct {
XLFileDB
}
XLFileDBResponse provides response swagger:response xlfileDBResponse
type XLFileDBs ¶
type XLFileDBs []XLFileDB
XLFileDBs arrays xlfileDBs swagger:response xlfileDBsResponse
type XLFilePointersEncoding ¶
type XLFilePointersEncoding struct { // field Sheets is a slice of pointers to another Struct (optional or 0..1) Sheets IntSlice `gorm:"type:TEXT"` }
XLFilePointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type XLFileWOP ¶
XLFileWOP is a XLFile without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type XLRowAPI ¶
type XLRowAPI struct { gorm.Model models.XLRow_WOP // encoding of pointers // for API, it cannot be embedded XLRowPointersEncoding XLRowPointersEncoding }
XLRowAPI is the input in POST API
for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations
swagger:model xlrowAPI
type XLRowDB ¶
type XLRowDB struct { gorm.Model // Declation for basic field xlrowDB.Name Name_Data sql.NullString // Declation for basic field xlrowDB.RowIndex RowIndex_Data sql.NullInt64 // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration XLRowPointersEncoding }
XLRowDB describes a xlrow in the database
It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers
swagger:model xlrowDB
func (*XLRowDB) CopyBasicFieldsFromXLRow ¶
CopyBasicFieldsFromXLRow
func (*XLRowDB) CopyBasicFieldsFromXLRowWOP ¶
CopyBasicFieldsFromXLRowWOP
func (*XLRowDB) CopyBasicFieldsFromXLRow_WOP ¶
CopyBasicFieldsFromXLRow_WOP
func (*XLRowDB) CopyBasicFieldsToXLRow ¶
CopyBasicFieldsToXLRow
func (*XLRowDB) CopyBasicFieldsToXLRowWOP ¶
CopyBasicFieldsToXLRowWOP
func (*XLRowDB) CopyBasicFieldsToXLRow_WOP ¶
CopyBasicFieldsToXLRow_WOP
func (*XLRowDB) DecodePointers ¶
func (xlrowDB *XLRowDB) DecodePointers(backRepo *BackRepoStruct, xlrow *models.XLRow)
type XLRowDBResponse ¶
type XLRowDBResponse struct {
XLRowDB
}
XLRowDBResponse provides response swagger:response xlrowDBResponse
type XLRowPointersEncoding ¶
type XLRowPointersEncoding struct { // field Cells is a slice of pointers to another Struct (optional or 0..1) Cells IntSlice `gorm:"type:TEXT"` }
XLRowPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type XLRowWOP ¶
XLRowWOP is a XLRow without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type XLSheetAPI ¶
type XLSheetAPI struct { gorm.Model models.XLSheet_WOP // encoding of pointers // for API, it cannot be embedded XLSheetPointersEncoding XLSheetPointersEncoding }
XLSheetAPI is the input in POST API
for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations
swagger:model xlsheetAPI
type XLSheetDB ¶
type XLSheetDB struct { gorm.Model // Declation for basic field xlsheetDB.Name Name_Data sql.NullString // Declation for basic field xlsheetDB.MaxRow MaxRow_Data sql.NullInt64 // Declation for basic field xlsheetDB.MaxCol MaxCol_Data sql.NullInt64 // Declation for basic field xlsheetDB.NbRows NbRows_Data sql.NullInt64 // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration XLSheetPointersEncoding }
XLSheetDB describes a xlsheet in the database
It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers
swagger:model xlsheetDB
func (*XLSheetDB) CopyBasicFieldsFromXLSheet ¶
CopyBasicFieldsFromXLSheet
func (*XLSheetDB) CopyBasicFieldsFromXLSheetWOP ¶
func (xlsheetDB *XLSheetDB) CopyBasicFieldsFromXLSheetWOP(xlsheet *XLSheetWOP)
CopyBasicFieldsFromXLSheetWOP
func (*XLSheetDB) CopyBasicFieldsFromXLSheet_WOP ¶
func (xlsheetDB *XLSheetDB) CopyBasicFieldsFromXLSheet_WOP(xlsheet *models.XLSheet_WOP)
CopyBasicFieldsFromXLSheet_WOP
func (*XLSheetDB) CopyBasicFieldsToXLSheet ¶
CopyBasicFieldsToXLSheet
func (*XLSheetDB) CopyBasicFieldsToXLSheetWOP ¶
func (xlsheetDB *XLSheetDB) CopyBasicFieldsToXLSheetWOP(xlsheet *XLSheetWOP)
CopyBasicFieldsToXLSheetWOP
func (*XLSheetDB) CopyBasicFieldsToXLSheet_WOP ¶
func (xlsheetDB *XLSheetDB) CopyBasicFieldsToXLSheet_WOP(xlsheet *models.XLSheet_WOP)
CopyBasicFieldsToXLSheet_WOP
func (*XLSheetDB) DecodePointers ¶
func (xlsheetDB *XLSheetDB) DecodePointers(backRepo *BackRepoStruct, xlsheet *models.XLSheet)
type XLSheetDBResponse ¶
type XLSheetDBResponse struct {
XLSheetDB
}
XLSheetDBResponse provides response swagger:response xlsheetDBResponse
type XLSheetDBs ¶
type XLSheetDBs []XLSheetDB
XLSheetDBs arrays xlsheetDBs swagger:response xlsheetDBsResponse
type XLSheetPointersEncoding ¶
type XLSheetPointersEncoding struct { // field Rows is a slice of pointers to another Struct (optional or 0..1) Rows IntSlice `gorm:"type:TEXT"` // field SheetCells is a slice of pointers to another Struct (optional or 0..1) SheetCells IntSlice `gorm:"type:TEXT"` }
XLSheetPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type XLSheetWOP ¶
type XLSheetWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` MaxRow int `xlsx:"2"` MaxCol int `xlsx:"3"` NbRows int `xlsx:"4"` }
XLSheetWOP is a XLSheet without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint