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)
- type BackRepoButtonStruct
- func (backRepoButton *BackRepoButtonStruct) Backup(dirPath string)
- func (backRepoButton *BackRepoButtonStruct) BackupXL(file *xlsx.File)
- func (backRepoButton *BackRepoButtonStruct) CheckoutPhaseOne() (Error error)
- func (backRepoButton *BackRepoButtonStruct) CheckoutPhaseOneInstance(buttonDB *ButtonDB) (Error error)
- func (backRepoButton *BackRepoButtonStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoButton *BackRepoButtonStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, buttonDB *ButtonDB) (Error error)
- func (backRepoButton *BackRepoButtonStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoButton *BackRepoButtonStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoButton *BackRepoButtonStruct) CommitPhaseOneInstance(button *models.Button) (Error error)
- func (backRepoButton *BackRepoButtonStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoButton *BackRepoButtonStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, button *models.Button) (Error error)
- func (backRepoButton *BackRepoButtonStruct) GetButtonDBFromButtonPtr(button *models.Button) (buttonDB *ButtonDB)
- func (backRepoButton *BackRepoButtonStruct) GetDB() db.DBInterface
- func (backRepoButton *BackRepoButtonStruct) GetStage() (stage *models.Stage)
- func (backRepoButton *BackRepoButtonStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoButton *BackRepoButtonStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, button *models.Button) (Error error)
- func (backRepoButton *BackRepoButtonStruct) RestorePhaseOne(dirPath string)
- func (backRepoButton *BackRepoButtonStruct) RestorePhaseTwo()
- func (backRepoButton *BackRepoButtonStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoButtonToggleStruct
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) Backup(dirPath string)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) BackupXL(file *xlsx.File)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) CheckoutPhaseOne() (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) CheckoutPhaseOneInstance(buttontoggleDB *ButtonToggleDB) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, buttontoggleDB *ButtonToggleDB) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitPhaseOneInstance(buttontoggle *models.ButtonToggle) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, buttontoggle *models.ButtonToggle) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) GetButtonToggleDBFromButtonTogglePtr(buttontoggle *models.ButtonToggle) (buttontoggleDB *ButtonToggleDB)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) GetDB() db.DBInterface
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) GetStage() (stage *models.Stage)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, buttontoggle *models.ButtonToggle) (Error error)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) RestorePhaseOne(dirPath string)
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) RestorePhaseTwo()
- func (backRepoButtonToggle *BackRepoButtonToggleStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoData
- type BackRepoGroupStruct
- func (backRepoGroup *BackRepoGroupStruct) Backup(dirPath string)
- func (backRepoGroup *BackRepoGroupStruct) BackupXL(file *xlsx.File)
- func (backRepoGroup *BackRepoGroupStruct) CheckoutPhaseOne() (Error error)
- func (backRepoGroup *BackRepoGroupStruct) CheckoutPhaseOneInstance(groupDB *GroupDB) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, groupDB *GroupDB) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) CommitPhaseOneInstance(group *models.Group) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, group *models.Group) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) GetDB() db.DBInterface
- func (backRepoGroup *BackRepoGroupStruct) GetGroupDBFromGroupPtr(group *models.Group) (groupDB *GroupDB)
- func (backRepoGroup *BackRepoGroupStruct) GetStage() (stage *models.Stage)
- func (backRepoGroup *BackRepoGroupStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, group *models.Group) (Error error)
- func (backRepoGroup *BackRepoGroupStruct) RestorePhaseOne(dirPath string)
- func (backRepoGroup *BackRepoGroupStruct) RestorePhaseTwo()
- func (backRepoGroup *BackRepoGroupStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoGroupToogleStruct
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) Backup(dirPath string)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) BackupXL(file *xlsx.File)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) CheckoutPhaseOne() (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) CheckoutPhaseOneInstance(grouptoogleDB *GroupToogleDB) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, grouptoogleDB *GroupToogleDB) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitPhaseOneInstance(grouptoogle *models.GroupToogle) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, grouptoogle *models.GroupToogle) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) GetDB() db.DBInterface
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) GetGroupToogleDBFromGroupTooglePtr(grouptoogle *models.GroupToogle) (grouptoogleDB *GroupToogleDB)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) GetStage() (stage *models.Stage)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, grouptoogle *models.GroupToogle) (Error error)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) RestorePhaseOne(dirPath string)
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) RestorePhaseTwo()
- func (backRepoGroupToogle *BackRepoGroupToogleStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoLayoutStruct
- func (backRepoLayout *BackRepoLayoutStruct) Backup(dirPath string)
- func (backRepoLayout *BackRepoLayoutStruct) BackupXL(file *xlsx.File)
- func (backRepoLayout *BackRepoLayoutStruct) CheckoutPhaseOne() (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) CheckoutPhaseOneInstance(layoutDB *LayoutDB) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, layoutDB *LayoutDB) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) CommitPhaseOneInstance(layout *models.Layout) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, layout *models.Layout) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) GetDB() db.DBInterface
- func (backRepoLayout *BackRepoLayoutStruct) GetLayoutDBFromLayoutPtr(layout *models.Layout) (layoutDB *LayoutDB)
- func (backRepoLayout *BackRepoLayoutStruct) GetStage() (stage *models.Stage)
- func (backRepoLayout *BackRepoLayoutStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, layout *models.Layout) (Error error)
- func (backRepoLayout *BackRepoLayoutStruct) RestorePhaseOne(dirPath string)
- func (backRepoLayout *BackRepoLayoutStruct) RestorePhaseTwo()
- func (backRepoLayout *BackRepoLayoutStruct) 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) CheckoutButton(button *models.Button)
- func (backRepo *BackRepoStruct) CheckoutButtonToggle(buttontoggle *models.ButtonToggle)
- func (backRepo *BackRepoStruct) CheckoutGroup(group *models.Group)
- func (backRepo *BackRepoStruct) CheckoutGroupToogle(grouptoogle *models.GroupToogle)
- func (backRepo *BackRepoStruct) CheckoutLayout(layout *models.Layout)
- func (backRepo *BackRepoStruct) Commit(stage *models.Stage)
- func (backRepo *BackRepoStruct) CommitButton(button *models.Button)
- func (backRepo *BackRepoStruct) CommitButtonToggle(buttontoggle *models.ButtonToggle)
- func (backRepo *BackRepoStruct) CommitGroup(group *models.Group)
- func (backRepo *BackRepoStruct) CommitGroupToogle(grouptoogle *models.GroupToogle)
- func (backRepo *BackRepoStruct) CommitLayout(layout *models.Layout)
- 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 ButtonAPI
- type ButtonDB
- func (buttonDB *ButtonDB) CopyBasicFieldsFromButton(button *models.Button)
- func (buttonDB *ButtonDB) CopyBasicFieldsFromButtonWOP(button *ButtonWOP)
- func (buttonDB *ButtonDB) CopyBasicFieldsFromButton_WOP(button *models.Button_WOP)
- func (buttonDB *ButtonDB) CopyBasicFieldsToButton(button *models.Button)
- func (buttonDB *ButtonDB) CopyBasicFieldsToButtonWOP(button *ButtonWOP)
- func (buttonDB *ButtonDB) CopyBasicFieldsToButton_WOP(button *models.Button_WOP)
- func (buttonDB *ButtonDB) DecodePointers(backRepo *BackRepoStruct, button *models.Button)
- type ButtonDBResponse
- type ButtonDBs
- type ButtonPointersEncoding
- type ButtonToggleAPI
- type ButtonToggleDB
- func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsFromButtonToggle(buttontoggle *models.ButtonToggle)
- func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsFromButtonToggleWOP(buttontoggle *ButtonToggleWOP)
- func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsFromButtonToggle_WOP(buttontoggle *models.ButtonToggle_WOP)
- func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsToButtonToggle(buttontoggle *models.ButtonToggle)
- func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsToButtonToggleWOP(buttontoggle *ButtonToggleWOP)
- func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsToButtonToggle_WOP(buttontoggle *models.ButtonToggle_WOP)
- func (buttontoggleDB *ButtonToggleDB) DecodePointers(backRepo *BackRepoStruct, buttontoggle *models.ButtonToggle)
- type ButtonToggleDBResponse
- type ButtonToggleDBs
- type ButtonTogglePointersEncoding
- type ButtonToggleWOP
- type ButtonWOP
- 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 GongstructDB
- type GroupAPI
- type GroupDB
- func (groupDB *GroupDB) CopyBasicFieldsFromGroup(group *models.Group)
- func (groupDB *GroupDB) CopyBasicFieldsFromGroupWOP(group *GroupWOP)
- func (groupDB *GroupDB) CopyBasicFieldsFromGroup_WOP(group *models.Group_WOP)
- func (groupDB *GroupDB) CopyBasicFieldsToGroup(group *models.Group)
- func (groupDB *GroupDB) CopyBasicFieldsToGroupWOP(group *GroupWOP)
- func (groupDB *GroupDB) CopyBasicFieldsToGroup_WOP(group *models.Group_WOP)
- func (groupDB *GroupDB) DecodePointers(backRepo *BackRepoStruct, group *models.Group)
- type GroupDBResponse
- type GroupDBs
- type GroupPointersEncoding
- type GroupToogleAPI
- type GroupToogleDB
- func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsFromGroupToogle(grouptoogle *models.GroupToogle)
- func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsFromGroupToogleWOP(grouptoogle *GroupToogleWOP)
- func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsFromGroupToogle_WOP(grouptoogle *models.GroupToogle_WOP)
- func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsToGroupToogle(grouptoogle *models.GroupToogle)
- func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsToGroupToogleWOP(grouptoogle *GroupToogleWOP)
- func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsToGroupToogle_WOP(grouptoogle *models.GroupToogle_WOP)
- func (grouptoogleDB *GroupToogleDB) DecodePointers(backRepo *BackRepoStruct, grouptoogle *models.GroupToogle)
- type GroupToogleDBResponse
- type GroupToogleDBs
- type GroupTooglePointersEncoding
- type GroupToogleWOP
- type GroupWOP
- type IntSlice
- type LayoutAPI
- type LayoutDB
- func (layoutDB *LayoutDB) CopyBasicFieldsFromLayout(layout *models.Layout)
- func (layoutDB *LayoutDB) CopyBasicFieldsFromLayoutWOP(layout *LayoutWOP)
- func (layoutDB *LayoutDB) CopyBasicFieldsFromLayout_WOP(layout *models.Layout_WOP)
- func (layoutDB *LayoutDB) CopyBasicFieldsToLayout(layout *models.Layout)
- func (layoutDB *LayoutDB) CopyBasicFieldsToLayoutWOP(layout *LayoutWOP)
- func (layoutDB *LayoutDB) CopyBasicFieldsToLayout_WOP(layout *models.Layout_WOP)
- func (layoutDB *LayoutDB) DecodePointers(backRepo *BackRepoStruct, layout *models.Layout)
- type LayoutDBResponse
- type LayoutDBs
- type LayoutPointersEncoding
- type LayoutWOP
Constants ¶
This section is empty.
Variables ¶
var BackRepoButtonToggleid_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 BackRepoButtonid_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 BackRepoGroupToogleid_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 BackRepoGroupid_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 BackRepoLayoutid_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 ButtonToggle_Fields = []string{
"ID",
"Name",
"Label",
"Icon",
"IsDisabled",
"IsChecked",
}
var Button_Fields = []string{
"ID",
"Name",
"Label",
"Icon",
"IsDisabled",
"Color",
"MatButtonType",
"MatButtonAppearance",
}
var GroupToogle_Fields = []string{
"ID",
"Name",
"Percentage",
"IsSingleSelector",
}
var Group_Fields = []string{
"ID",
"Name",
"Percentage",
"NbColumns",
}
var Layout_Fields = []string{
"ID",
"Name",
}
Functions ¶
func CopyBackRepoToBackRepoData ¶
func CopyBackRepoToBackRepoData(backRepo *BackRepoStruct, backRepoData *BackRepoData)
Types ¶
type BackRepoButtonStruct ¶
type BackRepoButtonStruct struct {
// stores ButtonDB according to their gorm ID
Map_ButtonDBID_ButtonDB map[uint]*ButtonDB
// stores ButtonDB ID according to Button address
Map_ButtonPtr_ButtonDBID map[*models.Button]uint
// stores Button according to their gorm ID
Map_ButtonDBID_ButtonPtr map[uint]*models.Button
// contains filtered or unexported fields
}
func (*BackRepoButtonStruct) Backup ¶
func (backRepoButton *BackRepoButtonStruct) Backup(dirPath string)
Backup generates a json file from a slice of all ButtonDB instances in the backrepo
func (*BackRepoButtonStruct) BackupXL ¶
func (backRepoButton *BackRepoButtonStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all ButtonDB instances in the backrepo
func (*BackRepoButtonStruct) CheckoutPhaseOne ¶
func (backRepoButton *BackRepoButtonStruct) CheckoutPhaseOne() (Error error)
BackRepoButton.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 (*BackRepoButtonStruct) CheckoutPhaseOneInstance ¶
func (backRepoButton *BackRepoButtonStruct) CheckoutPhaseOneInstance(buttonDB *ButtonDB) (Error error)
CheckoutPhaseOneInstance takes a buttonDB that has been found in the DB, updates the backRepo and stages the models version of the buttonDB
func (*BackRepoButtonStruct) CheckoutPhaseTwo ¶
func (backRepoButton *BackRepoButtonStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoButton.CheckoutPhaseTwo Checkouts all staged instances of Button to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonStruct) CheckoutPhaseTwoInstance ¶
func (backRepoButton *BackRepoButtonStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, buttonDB *ButtonDB) (Error error)
BackRepoButton.CheckoutPhaseTwoInstance Checkouts staged instances of Button to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonStruct) CommitDeleteInstance ¶
func (backRepoButton *BackRepoButtonStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoButton.CommitDeleteInstance commits deletion of Button to the BackRepo
func (*BackRepoButtonStruct) CommitPhaseOne ¶
func (backRepoButton *BackRepoButtonStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoButton.CommitPhaseOne commits all staged instances of Button 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 (*BackRepoButtonStruct) CommitPhaseOneInstance ¶
func (backRepoButton *BackRepoButtonStruct) CommitPhaseOneInstance(button *models.Button) (Error error)
BackRepoButton.CommitPhaseOneInstance commits button staged instances of Button 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 (*BackRepoButtonStruct) CommitPhaseTwo ¶
func (backRepoButton *BackRepoButtonStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoButton.CommitPhaseTwo commits all staged instances of Button to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonStruct) CommitPhaseTwoInstance ¶
func (backRepoButton *BackRepoButtonStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, button *models.Button) (Error error)
BackRepoButton.CommitPhaseTwoInstance commits {{structname }} of models.Button to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonStruct) GetButtonDBFromButtonPtr ¶
func (backRepoButton *BackRepoButtonStruct) GetButtonDBFromButtonPtr(button *models.Button) (buttonDB *ButtonDB)
GetButtonDBFromButtonPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoButtonStruct) GetDB ¶
func (backRepoButton *BackRepoButtonStruct) GetDB() db.DBInterface
func (*BackRepoButtonStruct) GetStage ¶
func (backRepoButton *BackRepoButtonStruct) GetStage() (stage *models.Stage)
func (*BackRepoButtonStruct) ResetReversePointers ¶
func (backRepoButton *BackRepoButtonStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoButton.ResetReversePointers commits all staged instances of Button to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonStruct) ResetReversePointersInstance ¶
func (backRepoButton *BackRepoButtonStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, button *models.Button) (Error error)
func (*BackRepoButtonStruct) RestorePhaseOne ¶
func (backRepoButton *BackRepoButtonStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "ButtonDB.json" in dirPath that stores an array of ButtonDB and stores it in the database the map BackRepoButtonid_atBckpTime_newID is updated accordingly
func (*BackRepoButtonStruct) RestorePhaseTwo ¶
func (backRepoButton *BackRepoButtonStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<Button>id_atBckpTime_newID to compute new index
func (*BackRepoButtonStruct) RestoreXLPhaseOne ¶
func (backRepoButton *BackRepoButtonStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "Button" sheet all ButtonDB instances
type BackRepoButtonToggleStruct ¶
type BackRepoButtonToggleStruct struct {
// stores ButtonToggleDB according to their gorm ID
Map_ButtonToggleDBID_ButtonToggleDB map[uint]*ButtonToggleDB
// stores ButtonToggleDB ID according to ButtonToggle address
Map_ButtonTogglePtr_ButtonToggleDBID map[*models.ButtonToggle]uint
// stores ButtonToggle according to their gorm ID
Map_ButtonToggleDBID_ButtonTogglePtr map[uint]*models.ButtonToggle
// contains filtered or unexported fields
}
func (*BackRepoButtonToggleStruct) Backup ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) Backup(dirPath string)
Backup generates a json file from a slice of all ButtonToggleDB instances in the backrepo
func (*BackRepoButtonToggleStruct) BackupXL ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all ButtonToggleDB instances in the backrepo
func (*BackRepoButtonToggleStruct) CheckoutPhaseOne ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) CheckoutPhaseOne() (Error error)
BackRepoButtonToggle.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 (*BackRepoButtonToggleStruct) CheckoutPhaseOneInstance ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) CheckoutPhaseOneInstance(buttontoggleDB *ButtonToggleDB) (Error error)
CheckoutPhaseOneInstance takes a buttontoggleDB that has been found in the DB, updates the backRepo and stages the models version of the buttontoggleDB
func (*BackRepoButtonToggleStruct) CheckoutPhaseTwo ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoButtonToggle.CheckoutPhaseTwo Checkouts all staged instances of ButtonToggle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonToggleStruct) CheckoutPhaseTwoInstance ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, buttontoggleDB *ButtonToggleDB) (Error error)
BackRepoButtonToggle.CheckoutPhaseTwoInstance Checkouts staged instances of ButtonToggle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonToggleStruct) CommitDeleteInstance ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoButtonToggle.CommitDeleteInstance commits deletion of ButtonToggle to the BackRepo
func (*BackRepoButtonToggleStruct) CommitPhaseOne ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoButtonToggle.CommitPhaseOne commits all staged instances of ButtonToggle 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 (*BackRepoButtonToggleStruct) CommitPhaseOneInstance ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitPhaseOneInstance(buttontoggle *models.ButtonToggle) (Error error)
BackRepoButtonToggle.CommitPhaseOneInstance commits buttontoggle staged instances of ButtonToggle 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 (*BackRepoButtonToggleStruct) CommitPhaseTwo ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoButtonToggle.CommitPhaseTwo commits all staged instances of ButtonToggle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonToggleStruct) CommitPhaseTwoInstance ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, buttontoggle *models.ButtonToggle) (Error error)
BackRepoButtonToggle.CommitPhaseTwoInstance commits {{structname }} of models.ButtonToggle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonToggleStruct) GetButtonToggleDBFromButtonTogglePtr ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) GetButtonToggleDBFromButtonTogglePtr(buttontoggle *models.ButtonToggle) (buttontoggleDB *ButtonToggleDB)
GetButtonToggleDBFromButtonTogglePtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoButtonToggleStruct) GetDB ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) GetDB() db.DBInterface
func (*BackRepoButtonToggleStruct) GetStage ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) GetStage() (stage *models.Stage)
func (*BackRepoButtonToggleStruct) ResetReversePointers ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoButtonToggle.ResetReversePointers commits all staged instances of ButtonToggle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoButtonToggleStruct) ResetReversePointersInstance ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, buttontoggle *models.ButtonToggle) (Error error)
func (*BackRepoButtonToggleStruct) RestorePhaseOne ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "ButtonToggleDB.json" in dirPath that stores an array of ButtonToggleDB and stores it in the database the map BackRepoButtonToggleid_atBckpTime_newID is updated accordingly
func (*BackRepoButtonToggleStruct) RestorePhaseTwo ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<ButtonToggle>id_atBckpTime_newID to compute new index
func (*BackRepoButtonToggleStruct) RestoreXLPhaseOne ¶
func (backRepoButtonToggle *BackRepoButtonToggleStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "ButtonToggle" sheet all ButtonToggleDB instances
type BackRepoData ¶
type BackRepoData struct {
ButtonAPIs []*ButtonAPI
ButtonToggleAPIs []*ButtonToggleAPI
GroupAPIs []*GroupAPI
GroupToogleAPIs []*GroupToogleAPI
LayoutAPIs []*LayoutAPI
// index of the web socket for this stack type (unique among all stack instances)
GONG__Index int
}
type BackRepoGroupStruct ¶
type BackRepoGroupStruct struct {
// stores GroupDB according to their gorm ID
Map_GroupDBID_GroupDB map[uint]*GroupDB
// stores GroupDB ID according to Group address
Map_GroupPtr_GroupDBID map[*models.Group]uint
// stores Group according to their gorm ID
Map_GroupDBID_GroupPtr map[uint]*models.Group
// contains filtered or unexported fields
}
func (*BackRepoGroupStruct) Backup ¶
func (backRepoGroup *BackRepoGroupStruct) Backup(dirPath string)
Backup generates a json file from a slice of all GroupDB instances in the backrepo
func (*BackRepoGroupStruct) BackupXL ¶
func (backRepoGroup *BackRepoGroupStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all GroupDB instances in the backrepo
func (*BackRepoGroupStruct) CheckoutPhaseOne ¶
func (backRepoGroup *BackRepoGroupStruct) CheckoutPhaseOne() (Error error)
BackRepoGroup.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 (*BackRepoGroupStruct) CheckoutPhaseOneInstance ¶
func (backRepoGroup *BackRepoGroupStruct) CheckoutPhaseOneInstance(groupDB *GroupDB) (Error error)
CheckoutPhaseOneInstance takes a groupDB that has been found in the DB, updates the backRepo and stages the models version of the groupDB
func (*BackRepoGroupStruct) CheckoutPhaseTwo ¶
func (backRepoGroup *BackRepoGroupStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoGroup.CheckoutPhaseTwo Checkouts all staged instances of Group to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupStruct) CheckoutPhaseTwoInstance ¶
func (backRepoGroup *BackRepoGroupStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, groupDB *GroupDB) (Error error)
BackRepoGroup.CheckoutPhaseTwoInstance Checkouts staged instances of Group to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupStruct) CommitDeleteInstance ¶
func (backRepoGroup *BackRepoGroupStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoGroup.CommitDeleteInstance commits deletion of Group to the BackRepo
func (*BackRepoGroupStruct) CommitPhaseOne ¶
func (backRepoGroup *BackRepoGroupStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoGroup.CommitPhaseOne commits all staged instances of Group 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 (*BackRepoGroupStruct) CommitPhaseOneInstance ¶
func (backRepoGroup *BackRepoGroupStruct) CommitPhaseOneInstance(group *models.Group) (Error error)
BackRepoGroup.CommitPhaseOneInstance commits group staged instances of Group 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 (*BackRepoGroupStruct) CommitPhaseTwo ¶
func (backRepoGroup *BackRepoGroupStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoGroup.CommitPhaseTwo commits all staged instances of Group to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupStruct) CommitPhaseTwoInstance ¶
func (backRepoGroup *BackRepoGroupStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, group *models.Group) (Error error)
BackRepoGroup.CommitPhaseTwoInstance commits {{structname }} of models.Group to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupStruct) GetDB ¶
func (backRepoGroup *BackRepoGroupStruct) GetDB() db.DBInterface
func (*BackRepoGroupStruct) GetGroupDBFromGroupPtr ¶
func (backRepoGroup *BackRepoGroupStruct) GetGroupDBFromGroupPtr(group *models.Group) (groupDB *GroupDB)
GetGroupDBFromGroupPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoGroupStruct) GetStage ¶
func (backRepoGroup *BackRepoGroupStruct) GetStage() (stage *models.Stage)
func (*BackRepoGroupStruct) ResetReversePointers ¶
func (backRepoGroup *BackRepoGroupStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoGroup.ResetReversePointers commits all staged instances of Group to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupStruct) ResetReversePointersInstance ¶
func (backRepoGroup *BackRepoGroupStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, group *models.Group) (Error error)
func (*BackRepoGroupStruct) RestorePhaseOne ¶
func (backRepoGroup *BackRepoGroupStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "GroupDB.json" in dirPath that stores an array of GroupDB and stores it in the database the map BackRepoGroupid_atBckpTime_newID is updated accordingly
func (*BackRepoGroupStruct) RestorePhaseTwo ¶
func (backRepoGroup *BackRepoGroupStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<Group>id_atBckpTime_newID to compute new index
func (*BackRepoGroupStruct) RestoreXLPhaseOne ¶
func (backRepoGroup *BackRepoGroupStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "Group" sheet all GroupDB instances
type BackRepoGroupToogleStruct ¶
type BackRepoGroupToogleStruct struct {
// stores GroupToogleDB according to their gorm ID
Map_GroupToogleDBID_GroupToogleDB map[uint]*GroupToogleDB
// stores GroupToogleDB ID according to GroupToogle address
Map_GroupTooglePtr_GroupToogleDBID map[*models.GroupToogle]uint
// stores GroupToogle according to their gorm ID
Map_GroupToogleDBID_GroupTooglePtr map[uint]*models.GroupToogle
// contains filtered or unexported fields
}
func (*BackRepoGroupToogleStruct) Backup ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) Backup(dirPath string)
Backup generates a json file from a slice of all GroupToogleDB instances in the backrepo
func (*BackRepoGroupToogleStruct) BackupXL ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all GroupToogleDB instances in the backrepo
func (*BackRepoGroupToogleStruct) CheckoutPhaseOne ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) CheckoutPhaseOne() (Error error)
BackRepoGroupToogle.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 (*BackRepoGroupToogleStruct) CheckoutPhaseOneInstance ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) CheckoutPhaseOneInstance(grouptoogleDB *GroupToogleDB) (Error error)
CheckoutPhaseOneInstance takes a grouptoogleDB that has been found in the DB, updates the backRepo and stages the models version of the grouptoogleDB
func (*BackRepoGroupToogleStruct) CheckoutPhaseTwo ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoGroupToogle.CheckoutPhaseTwo Checkouts all staged instances of GroupToogle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupToogleStruct) CheckoutPhaseTwoInstance ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, grouptoogleDB *GroupToogleDB) (Error error)
BackRepoGroupToogle.CheckoutPhaseTwoInstance Checkouts staged instances of GroupToogle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupToogleStruct) CommitDeleteInstance ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoGroupToogle.CommitDeleteInstance commits deletion of GroupToogle to the BackRepo
func (*BackRepoGroupToogleStruct) CommitPhaseOne ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoGroupToogle.CommitPhaseOne commits all staged instances of GroupToogle 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 (*BackRepoGroupToogleStruct) CommitPhaseOneInstance ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitPhaseOneInstance(grouptoogle *models.GroupToogle) (Error error)
BackRepoGroupToogle.CommitPhaseOneInstance commits grouptoogle staged instances of GroupToogle 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 (*BackRepoGroupToogleStruct) CommitPhaseTwo ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoGroupToogle.CommitPhaseTwo commits all staged instances of GroupToogle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupToogleStruct) CommitPhaseTwoInstance ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, grouptoogle *models.GroupToogle) (Error error)
BackRepoGroupToogle.CommitPhaseTwoInstance commits {{structname }} of models.GroupToogle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupToogleStruct) GetDB ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) GetDB() db.DBInterface
func (*BackRepoGroupToogleStruct) GetGroupToogleDBFromGroupTooglePtr ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) GetGroupToogleDBFromGroupTooglePtr(grouptoogle *models.GroupToogle) (grouptoogleDB *GroupToogleDB)
GetGroupToogleDBFromGroupTooglePtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoGroupToogleStruct) GetStage ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) GetStage() (stage *models.Stage)
func (*BackRepoGroupToogleStruct) ResetReversePointers ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoGroupToogle.ResetReversePointers commits all staged instances of GroupToogle to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoGroupToogleStruct) ResetReversePointersInstance ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, grouptoogle *models.GroupToogle) (Error error)
func (*BackRepoGroupToogleStruct) RestorePhaseOne ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "GroupToogleDB.json" in dirPath that stores an array of GroupToogleDB and stores it in the database the map BackRepoGroupToogleid_atBckpTime_newID is updated accordingly
func (*BackRepoGroupToogleStruct) RestorePhaseTwo ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<GroupToogle>id_atBckpTime_newID to compute new index
func (*BackRepoGroupToogleStruct) RestoreXLPhaseOne ¶
func (backRepoGroupToogle *BackRepoGroupToogleStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "GroupToogle" sheet all GroupToogleDB instances
type BackRepoLayoutStruct ¶
type BackRepoLayoutStruct struct {
// stores LayoutDB according to their gorm ID
Map_LayoutDBID_LayoutDB map[uint]*LayoutDB
// stores LayoutDB ID according to Layout address
Map_LayoutPtr_LayoutDBID map[*models.Layout]uint
// stores Layout according to their gorm ID
Map_LayoutDBID_LayoutPtr map[uint]*models.Layout
// contains filtered or unexported fields
}
func (*BackRepoLayoutStruct) Backup ¶
func (backRepoLayout *BackRepoLayoutStruct) Backup(dirPath string)
Backup generates a json file from a slice of all LayoutDB instances in the backrepo
func (*BackRepoLayoutStruct) BackupXL ¶
func (backRepoLayout *BackRepoLayoutStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all LayoutDB instances in the backrepo
func (*BackRepoLayoutStruct) CheckoutPhaseOne ¶
func (backRepoLayout *BackRepoLayoutStruct) CheckoutPhaseOne() (Error error)
BackRepoLayout.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 (*BackRepoLayoutStruct) CheckoutPhaseOneInstance ¶
func (backRepoLayout *BackRepoLayoutStruct) CheckoutPhaseOneInstance(layoutDB *LayoutDB) (Error error)
CheckoutPhaseOneInstance takes a layoutDB that has been found in the DB, updates the backRepo and stages the models version of the layoutDB
func (*BackRepoLayoutStruct) CheckoutPhaseTwo ¶
func (backRepoLayout *BackRepoLayoutStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoLayout.CheckoutPhaseTwo Checkouts all staged instances of Layout to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoLayoutStruct) CheckoutPhaseTwoInstance ¶
func (backRepoLayout *BackRepoLayoutStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, layoutDB *LayoutDB) (Error error)
BackRepoLayout.CheckoutPhaseTwoInstance Checkouts staged instances of Layout to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoLayoutStruct) CommitDeleteInstance ¶
func (backRepoLayout *BackRepoLayoutStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoLayout.CommitDeleteInstance commits deletion of Layout to the BackRepo
func (*BackRepoLayoutStruct) CommitPhaseOne ¶
func (backRepoLayout *BackRepoLayoutStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoLayout.CommitPhaseOne commits all staged instances of Layout 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 (*BackRepoLayoutStruct) CommitPhaseOneInstance ¶
func (backRepoLayout *BackRepoLayoutStruct) CommitPhaseOneInstance(layout *models.Layout) (Error error)
BackRepoLayout.CommitPhaseOneInstance commits layout staged instances of Layout 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 (*BackRepoLayoutStruct) CommitPhaseTwo ¶
func (backRepoLayout *BackRepoLayoutStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoLayout.CommitPhaseTwo commits all staged instances of Layout to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoLayoutStruct) CommitPhaseTwoInstance ¶
func (backRepoLayout *BackRepoLayoutStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, layout *models.Layout) (Error error)
BackRepoLayout.CommitPhaseTwoInstance commits {{structname }} of models.Layout to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoLayoutStruct) GetDB ¶
func (backRepoLayout *BackRepoLayoutStruct) GetDB() db.DBInterface
func (*BackRepoLayoutStruct) GetLayoutDBFromLayoutPtr ¶
func (backRepoLayout *BackRepoLayoutStruct) GetLayoutDBFromLayoutPtr(layout *models.Layout) (layoutDB *LayoutDB)
GetLayoutDBFromLayoutPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoLayoutStruct) GetStage ¶
func (backRepoLayout *BackRepoLayoutStruct) GetStage() (stage *models.Stage)
func (*BackRepoLayoutStruct) ResetReversePointers ¶
func (backRepoLayout *BackRepoLayoutStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoLayout.ResetReversePointers commits all staged instances of Layout to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoLayoutStruct) ResetReversePointersInstance ¶
func (backRepoLayout *BackRepoLayoutStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, layout *models.Layout) (Error error)
func (*BackRepoLayoutStruct) RestorePhaseOne ¶
func (backRepoLayout *BackRepoLayoutStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "LayoutDB.json" in dirPath that stores an array of LayoutDB and stores it in the database the map BackRepoLayoutid_atBckpTime_newID is updated accordingly
func (*BackRepoLayoutStruct) RestorePhaseTwo ¶
func (backRepoLayout *BackRepoLayoutStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<Layout>id_atBckpTime_newID to compute new index
func (*BackRepoLayoutStruct) RestoreXLPhaseOne ¶
func (backRepoLayout *BackRepoLayoutStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "Layout" sheet all LayoutDB instances
type BackRepoStruct ¶
type BackRepoStruct struct {
// insertion point for per struct back repo declarations
BackRepoButton BackRepoButtonStruct
BackRepoButtonToggle BackRepoButtonToggleStruct
BackRepoGroup BackRepoGroupStruct
BackRepoGroupToogle BackRepoGroupToogleStruct
BackRepoLayout BackRepoLayoutStruct
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) CheckoutButton ¶
func (backRepo *BackRepoStruct) CheckoutButton(button *models.Button)
CommitButton allows checkout of a single button (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutButtonToggle ¶
func (backRepo *BackRepoStruct) CheckoutButtonToggle(buttontoggle *models.ButtonToggle)
CommitButtonToggle allows checkout of a single buttontoggle (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutGroup ¶
func (backRepo *BackRepoStruct) CheckoutGroup(group *models.Group)
CommitGroup allows checkout of a single group (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutGroupToogle ¶
func (backRepo *BackRepoStruct) CheckoutGroupToogle(grouptoogle *models.GroupToogle)
CommitGroupToogle allows checkout of a single grouptoogle (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutLayout ¶
func (backRepo *BackRepoStruct) CheckoutLayout(layout *models.Layout)
CommitLayout allows checkout of a single layout (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) CommitButton ¶
func (backRepo *BackRepoStruct) CommitButton(button *models.Button)
CommitButton allows commit of a single button (if already staged)
func (*BackRepoStruct) CommitButtonToggle ¶
func (backRepo *BackRepoStruct) CommitButtonToggle(buttontoggle *models.ButtonToggle)
CommitButtonToggle allows commit of a single buttontoggle (if already staged)
func (*BackRepoStruct) CommitGroup ¶
func (backRepo *BackRepoStruct) CommitGroup(group *models.Group)
CommitGroup allows commit of a single group (if already staged)
func (*BackRepoStruct) CommitGroupToogle ¶
func (backRepo *BackRepoStruct) CommitGroupToogle(grouptoogle *models.GroupToogle)
CommitGroupToogle allows commit of a single grouptoogle (if already staged)
func (*BackRepoStruct) CommitLayout ¶
func (backRepo *BackRepoStruct) CommitLayout(layout *models.Layout)
CommitLayout allows commit of a single layout (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 ButtonAPI ¶
type ButtonAPI struct {
gorm.Model
models.Button_WOP
// encoding of pointers
// for API, it cannot be embedded
ButtonPointersEncoding ButtonPointersEncoding
}
ButtonAPI 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 buttonAPI
type ButtonDB ¶
type ButtonDB struct {
gorm.Model
// Declation for basic field buttonDB.Name
Name_Data sql.NullString
// Declation for basic field buttonDB.Label
Label_Data sql.NullString
// Declation for basic field buttonDB.Icon
Icon_Data sql.NullString
// Declation for basic field buttonDB.IsDisabled
// provide the sql storage for the boolan
IsDisabled_Data sql.NullBool
// Declation for basic field buttonDB.Color
Color_Data sql.NullString
// Declation for basic field buttonDB.MatButtonType
MatButtonType_Data sql.NullString
// Declation for basic field buttonDB.MatButtonAppearance
MatButtonAppearance_Data sql.NullString
// encoding of pointers
// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
ButtonPointersEncoding
}
ButtonDB describes a button 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 buttonDB
func (*ButtonDB) CopyBasicFieldsFromButton ¶
CopyBasicFieldsFromButton
func (*ButtonDB) CopyBasicFieldsFromButtonWOP ¶
CopyBasicFieldsFromButtonWOP
func (*ButtonDB) CopyBasicFieldsFromButton_WOP ¶
func (buttonDB *ButtonDB) CopyBasicFieldsFromButton_WOP(button *models.Button_WOP)
CopyBasicFieldsFromButton_WOP
func (*ButtonDB) CopyBasicFieldsToButton ¶
CopyBasicFieldsToButton
func (*ButtonDB) CopyBasicFieldsToButtonWOP ¶
CopyBasicFieldsToButtonWOP
func (*ButtonDB) CopyBasicFieldsToButton_WOP ¶
func (buttonDB *ButtonDB) CopyBasicFieldsToButton_WOP(button *models.Button_WOP)
CopyBasicFieldsToButton_WOP
func (*ButtonDB) DecodePointers ¶
func (buttonDB *ButtonDB) DecodePointers(backRepo *BackRepoStruct, button *models.Button)
type ButtonDBResponse ¶
type ButtonDBResponse struct {
ButtonDB
}
ButtonDBResponse provides response swagger:response buttonDBResponse
type ButtonDBs ¶
type ButtonDBs []ButtonDB
ButtonDBs arrays buttonDBs swagger:response buttonDBsResponse
type ButtonPointersEncoding ¶
type ButtonPointersEncoding struct {
}
ButtonPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type ButtonToggleAPI ¶
type ButtonToggleAPI struct {
gorm.Model
models.ButtonToggle_WOP
// encoding of pointers
// for API, it cannot be embedded
ButtonTogglePointersEncoding ButtonTogglePointersEncoding
}
ButtonToggleAPI 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 buttontoggleAPI
type ButtonToggleDB ¶
type ButtonToggleDB struct {
gorm.Model
// Declation for basic field buttontoggleDB.Name
Name_Data sql.NullString
// Declation for basic field buttontoggleDB.Label
Label_Data sql.NullString
// Declation for basic field buttontoggleDB.Icon
Icon_Data sql.NullString
// Declation for basic field buttontoggleDB.IsDisabled
// provide the sql storage for the boolan
IsDisabled_Data sql.NullBool
// Declation for basic field buttontoggleDB.IsChecked
// provide the sql storage for the boolan
IsChecked_Data sql.NullBool
// encoding of pointers
// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
ButtonTogglePointersEncoding
}
ButtonToggleDB describes a buttontoggle 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 buttontoggleDB
func (*ButtonToggleDB) CopyBasicFieldsFromButtonToggle ¶
func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsFromButtonToggle(buttontoggle *models.ButtonToggle)
CopyBasicFieldsFromButtonToggle
func (*ButtonToggleDB) CopyBasicFieldsFromButtonToggleWOP ¶
func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsFromButtonToggleWOP(buttontoggle *ButtonToggleWOP)
CopyBasicFieldsFromButtonToggleWOP
func (*ButtonToggleDB) CopyBasicFieldsFromButtonToggle_WOP ¶
func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsFromButtonToggle_WOP(buttontoggle *models.ButtonToggle_WOP)
CopyBasicFieldsFromButtonToggle_WOP
func (*ButtonToggleDB) CopyBasicFieldsToButtonToggle ¶
func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsToButtonToggle(buttontoggle *models.ButtonToggle)
CopyBasicFieldsToButtonToggle
func (*ButtonToggleDB) CopyBasicFieldsToButtonToggleWOP ¶
func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsToButtonToggleWOP(buttontoggle *ButtonToggleWOP)
CopyBasicFieldsToButtonToggleWOP
func (*ButtonToggleDB) CopyBasicFieldsToButtonToggle_WOP ¶
func (buttontoggleDB *ButtonToggleDB) CopyBasicFieldsToButtonToggle_WOP(buttontoggle *models.ButtonToggle_WOP)
CopyBasicFieldsToButtonToggle_WOP
func (*ButtonToggleDB) DecodePointers ¶
func (buttontoggleDB *ButtonToggleDB) DecodePointers(backRepo *BackRepoStruct, buttontoggle *models.ButtonToggle)
type ButtonToggleDBResponse ¶
type ButtonToggleDBResponse struct {
ButtonToggleDB
}
ButtonToggleDBResponse provides response swagger:response buttontoggleDBResponse
type ButtonToggleDBs ¶
type ButtonToggleDBs []ButtonToggleDB
ButtonToggleDBs arrays buttontoggleDBs swagger:response buttontoggleDBsResponse
type ButtonTogglePointersEncoding ¶
type ButtonTogglePointersEncoding struct {
}
ButtonTogglePointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type ButtonToggleWOP ¶
type ButtonToggleWOP struct {
ID int `xlsx:"0"`
Name string `xlsx:"1"`
Label string `xlsx:"2"`
Icon string `xlsx:"3"`
IsDisabled bool `xlsx:"4"`
IsChecked bool `xlsx:"5"`
}
ButtonToggleWOP is a ButtonToggle without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type ButtonWOP ¶
type ButtonWOP struct {
ID int `xlsx:"0"`
Name string `xlsx:"1"`
Label string `xlsx:"2"`
Icon string `xlsx:"3"`
IsDisabled bool `xlsx:"4"`
Color models.MatButtonPaletteType `xlsx:"5"`
MatButtonType models.MatButtonType `xlsx:"6"`
MatButtonAppearance models.MatButtonAppearance `xlsx:"7"`
}
ButtonWOP is a Button without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
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 GongstructDB ¶
type GongstructDB interface {
}
type GroupAPI ¶
type GroupAPI struct {
gorm.Model
models.Group_WOP
// encoding of pointers
// for API, it cannot be embedded
GroupPointersEncoding GroupPointersEncoding
}
GroupAPI 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 groupAPI
type GroupDB ¶
type GroupDB struct {
gorm.Model
// Declation for basic field groupDB.Name
Name_Data sql.NullString
// Declation for basic field groupDB.Percentage
Percentage_Data sql.NullFloat64
// Declation for basic field groupDB.NbColumns
NbColumns_Data sql.NullInt64
// encoding of pointers
// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
GroupPointersEncoding
}
GroupDB describes a group 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 groupDB
func (*GroupDB) CopyBasicFieldsFromGroup ¶
CopyBasicFieldsFromGroup
func (*GroupDB) CopyBasicFieldsFromGroupWOP ¶
CopyBasicFieldsFromGroupWOP
func (*GroupDB) CopyBasicFieldsFromGroup_WOP ¶
CopyBasicFieldsFromGroup_WOP
func (*GroupDB) CopyBasicFieldsToGroup ¶
CopyBasicFieldsToGroup
func (*GroupDB) CopyBasicFieldsToGroupWOP ¶
CopyBasicFieldsToGroupWOP
func (*GroupDB) CopyBasicFieldsToGroup_WOP ¶
CopyBasicFieldsToGroup_WOP
func (*GroupDB) DecodePointers ¶
func (groupDB *GroupDB) DecodePointers(backRepo *BackRepoStruct, group *models.Group)
type GroupDBResponse ¶
type GroupDBResponse struct {
GroupDB
}
GroupDBResponse provides response swagger:response groupDBResponse
type GroupPointersEncoding ¶
type GroupPointersEncoding struct {
// field Buttons is a slice of pointers to another Struct (optional or 0..1)
Buttons IntSlice `gorm:"type:TEXT"`
}
GroupPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type GroupToogleAPI ¶
type GroupToogleAPI struct {
gorm.Model
models.GroupToogle_WOP
// encoding of pointers
// for API, it cannot be embedded
GroupTooglePointersEncoding GroupTooglePointersEncoding
}
GroupToogleAPI 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 grouptoogleAPI
type GroupToogleDB ¶
type GroupToogleDB struct {
gorm.Model
// Declation for basic field grouptoogleDB.Name
Name_Data sql.NullString
// Declation for basic field grouptoogleDB.Percentage
Percentage_Data sql.NullFloat64
// Declation for basic field grouptoogleDB.IsSingleSelector
// provide the sql storage for the boolan
IsSingleSelector_Data sql.NullBool
// encoding of pointers
// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
GroupTooglePointersEncoding
}
GroupToogleDB describes a grouptoogle 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 grouptoogleDB
func (*GroupToogleDB) CopyBasicFieldsFromGroupToogle ¶
func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsFromGroupToogle(grouptoogle *models.GroupToogle)
CopyBasicFieldsFromGroupToogle
func (*GroupToogleDB) CopyBasicFieldsFromGroupToogleWOP ¶
func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsFromGroupToogleWOP(grouptoogle *GroupToogleWOP)
CopyBasicFieldsFromGroupToogleWOP
func (*GroupToogleDB) CopyBasicFieldsFromGroupToogle_WOP ¶
func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsFromGroupToogle_WOP(grouptoogle *models.GroupToogle_WOP)
CopyBasicFieldsFromGroupToogle_WOP
func (*GroupToogleDB) CopyBasicFieldsToGroupToogle ¶
func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsToGroupToogle(grouptoogle *models.GroupToogle)
CopyBasicFieldsToGroupToogle
func (*GroupToogleDB) CopyBasicFieldsToGroupToogleWOP ¶
func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsToGroupToogleWOP(grouptoogle *GroupToogleWOP)
CopyBasicFieldsToGroupToogleWOP
func (*GroupToogleDB) CopyBasicFieldsToGroupToogle_WOP ¶
func (grouptoogleDB *GroupToogleDB) CopyBasicFieldsToGroupToogle_WOP(grouptoogle *models.GroupToogle_WOP)
CopyBasicFieldsToGroupToogle_WOP
func (*GroupToogleDB) DecodePointers ¶
func (grouptoogleDB *GroupToogleDB) DecodePointers(backRepo *BackRepoStruct, grouptoogle *models.GroupToogle)
type GroupToogleDBResponse ¶
type GroupToogleDBResponse struct {
GroupToogleDB
}
GroupToogleDBResponse provides response swagger:response grouptoogleDBResponse
type GroupToogleDBs ¶
type GroupToogleDBs []GroupToogleDB
GroupToogleDBs arrays grouptoogleDBs swagger:response grouptoogleDBsResponse
type GroupTooglePointersEncoding ¶
type GroupTooglePointersEncoding struct {
// field ButtonToggles is a slice of pointers to another Struct (optional or 0..1)
ButtonToggles IntSlice `gorm:"type:TEXT"`
}
GroupTooglePointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type GroupToogleWOP ¶
type GroupToogleWOP struct {
ID int `xlsx:"0"`
Name string `xlsx:"1"`
Percentage float64 `xlsx:"2"`
IsSingleSelector bool `xlsx:"3"`
}
GroupToogleWOP is a GroupToogle without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type GroupWOP ¶
type GroupWOP struct {
ID int `xlsx:"0"`
Name string `xlsx:"1"`
Percentage float64 `xlsx:"2"`
NbColumns int `xlsx:"3"`
}
GroupWOP is a Group without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type IntSlice ¶
type IntSlice []int
type LayoutAPI ¶
type LayoutAPI struct {
gorm.Model
models.Layout_WOP
// encoding of pointers
// for API, it cannot be embedded
LayoutPointersEncoding LayoutPointersEncoding
}
LayoutAPI 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 layoutAPI
type LayoutDB ¶
type LayoutDB struct {
gorm.Model
// Declation for basic field layoutDB.Name
Name_Data sql.NullString
// encoding of pointers
// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
LayoutPointersEncoding
}
LayoutDB describes a layout 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 layoutDB
func (*LayoutDB) CopyBasicFieldsFromLayout ¶
CopyBasicFieldsFromLayout
func (*LayoutDB) CopyBasicFieldsFromLayoutWOP ¶
CopyBasicFieldsFromLayoutWOP
func (*LayoutDB) CopyBasicFieldsFromLayout_WOP ¶
func (layoutDB *LayoutDB) CopyBasicFieldsFromLayout_WOP(layout *models.Layout_WOP)
CopyBasicFieldsFromLayout_WOP
func (*LayoutDB) CopyBasicFieldsToLayout ¶
CopyBasicFieldsToLayout
func (*LayoutDB) CopyBasicFieldsToLayoutWOP ¶
CopyBasicFieldsToLayoutWOP
func (*LayoutDB) CopyBasicFieldsToLayout_WOP ¶
func (layoutDB *LayoutDB) CopyBasicFieldsToLayout_WOP(layout *models.Layout_WOP)
CopyBasicFieldsToLayout_WOP
func (*LayoutDB) DecodePointers ¶
func (layoutDB *LayoutDB) DecodePointers(backRepo *BackRepoStruct, layout *models.Layout)
type LayoutDBResponse ¶
type LayoutDBResponse struct {
LayoutDB
}
LayoutDBResponse provides response swagger:response layoutDBResponse
type LayoutDBs ¶
type LayoutDBs []LayoutDB
LayoutDBs arrays layoutDBs swagger:response layoutDBsResponse
type LayoutPointersEncoding ¶
type LayoutPointersEncoding struct {
// field Groups is a slice of pointers to another Struct (optional or 0..1)
Groups IntSlice `gorm:"type:TEXT"`
// field GroupToogles is a slice of pointers to another Struct (optional or 0..1)
GroupToogles IntSlice `gorm:"type:TEXT"`
}
LayoutPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct