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
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
generated code - do not edit
Index ¶
- Variables
- func CopyBackRepoToBackRepoData(backRepo *BackRepoStruct, backRepoData *BackRepoData)
- func GetID[T models.Gongstruct](stage *models.StageStruct, backRepo *BackRepoStruct, instance *T) (id int)
- func GetIDPointer[T models.PointerToGongstruct](stage *models.StageStruct, backRepo *BackRepoStruct, instance T) (id int)
- func GetInstanceDBFromInstance[T models.Gongstruct, T2 GongstructDB](stage *models.StageStruct, backRepo *BackRepoStruct, instance *T) (ret *T2)
- func GetReverseFieldOwner[T models.Gongstruct](stage *models.StageStruct, backRepo *BackRepoStruct, instance *T, ...) (res any)
- func GetReverseFieldOwnerName(stage *models.StageStruct, backRepo *BackRepoStruct, instance any, ...) (res string)
- type BackRepoCommandStruct
- func (backRepoCommand *BackRepoCommandStruct) Backup(dirPath string)
- func (backRepoCommand *BackRepoCommandStruct) BackupXL(file *xlsx.File)
- func (backRepoCommand *BackRepoCommandStruct) CheckoutPhaseOne() (Error error)
- func (backRepoCommand *BackRepoCommandStruct) CheckoutPhaseOneInstance(commandDB *CommandDB) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, commandDB *CommandDB) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) CommitPhaseOneInstance(command *models.Command) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, command *models.Command) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) GetCommandDBFromCommandPtr(command *models.Command) (commandDB *CommandDB)
- func (backRepoCommand *BackRepoCommandStruct) GetDB() db.DBInterface
- func (backRepoCommand *BackRepoCommandStruct) GetStage() (stage *models.StageStruct)
- func (backRepoCommand *BackRepoCommandStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, command *models.Command) (Error error)
- func (backRepoCommand *BackRepoCommandStruct) RestorePhaseOne(dirPath string)
- func (backRepoCommand *BackRepoCommandStruct) RestorePhaseTwo()
- func (backRepoCommand *BackRepoCommandStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoData
- type BackRepoDummyAgentStruct
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) Backup(dirPath string)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) BackupXL(file *xlsx.File)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) CheckoutPhaseOne() (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) CheckoutPhaseOneInstance(dummyagentDB *DummyAgentDB) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, dummyagentDB *DummyAgentDB) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitPhaseOneInstance(dummyagent *models.DummyAgent) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, dummyagent *models.DummyAgent) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) GetDB() db.DBInterface
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) GetDummyAgentDBFromDummyAgentPtr(dummyagent *models.DummyAgent) (dummyagentDB *DummyAgentDB)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) GetStage() (stage *models.StageStruct)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, dummyagent *models.DummyAgent) (Error error)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) RestorePhaseOne(dirPath string)
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) RestorePhaseTwo()
- func (backRepoDummyAgent *BackRepoDummyAgentStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoEngineStruct
- func (backRepoEngine *BackRepoEngineStruct) Backup(dirPath string)
- func (backRepoEngine *BackRepoEngineStruct) BackupXL(file *xlsx.File)
- func (backRepoEngine *BackRepoEngineStruct) CheckoutPhaseOne() (Error error)
- func (backRepoEngine *BackRepoEngineStruct) CheckoutPhaseOneInstance(engineDB *EngineDB) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, engineDB *EngineDB) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) CommitPhaseOneInstance(engine *models.Engine) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, engine *models.Engine) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) GetDB() db.DBInterface
- func (backRepoEngine *BackRepoEngineStruct) GetEngineDBFromEnginePtr(engine *models.Engine) (engineDB *EngineDB)
- func (backRepoEngine *BackRepoEngineStruct) GetStage() (stage *models.StageStruct)
- func (backRepoEngine *BackRepoEngineStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, engine *models.Engine) (Error error)
- func (backRepoEngine *BackRepoEngineStruct) RestorePhaseOne(dirPath string)
- func (backRepoEngine *BackRepoEngineStruct) RestorePhaseTwo()
- func (backRepoEngine *BackRepoEngineStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoEventStruct
- func (backRepoEvent *BackRepoEventStruct) Backup(dirPath string)
- func (backRepoEvent *BackRepoEventStruct) BackupXL(file *xlsx.File)
- func (backRepoEvent *BackRepoEventStruct) CheckoutPhaseOne() (Error error)
- func (backRepoEvent *BackRepoEventStruct) CheckoutPhaseOneInstance(eventDB *EventDB) (Error error)
- func (backRepoEvent *BackRepoEventStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoEvent *BackRepoEventStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, eventDB *EventDB) (Error error)
- func (backRepoEvent *BackRepoEventStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoEvent *BackRepoEventStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
- func (backRepoEvent *BackRepoEventStruct) CommitPhaseOneInstance(event *models.Event) (Error error)
- func (backRepoEvent *BackRepoEventStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoEvent *BackRepoEventStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, event *models.Event) (Error error)
- func (backRepoEvent *BackRepoEventStruct) GetDB() db.DBInterface
- func (backRepoEvent *BackRepoEventStruct) GetEventDBFromEventPtr(event *models.Event) (eventDB *EventDB)
- func (backRepoEvent *BackRepoEventStruct) GetStage() (stage *models.StageStruct)
- func (backRepoEvent *BackRepoEventStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoEvent *BackRepoEventStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, event *models.Event) (Error error)
- func (backRepoEvent *BackRepoEventStruct) RestorePhaseOne(dirPath string)
- func (backRepoEvent *BackRepoEventStruct) RestorePhaseTwo()
- func (backRepoEvent *BackRepoEventStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoStatusStruct
- func (backRepoStatus *BackRepoStatusStruct) Backup(dirPath string)
- func (backRepoStatus *BackRepoStatusStruct) BackupXL(file *xlsx.File)
- func (backRepoStatus *BackRepoStatusStruct) CheckoutPhaseOne() (Error error)
- func (backRepoStatus *BackRepoStatusStruct) CheckoutPhaseOneInstance(statusDB *StatusDB) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, statusDB *StatusDB) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) CommitPhaseOneInstance(status *models.Status) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, status *models.Status) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) GetDB() db.DBInterface
- func (backRepoStatus *BackRepoStatusStruct) GetStage() (stage *models.StageStruct)
- func (backRepoStatus *BackRepoStatusStruct) GetStatusDBFromStatusPtr(status *models.Status) (statusDB *StatusDB)
- func (backRepoStatus *BackRepoStatusStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, status *models.Status) (Error error)
- func (backRepoStatus *BackRepoStatusStruct) RestorePhaseOne(dirPath string)
- func (backRepoStatus *BackRepoStatusStruct) RestorePhaseTwo()
- func (backRepoStatus *BackRepoStatusStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoStruct
- func (backRepo *BackRepoStruct) Backup(stage *models.StageStruct, dirPath string)
- func (backRepo *BackRepoStruct) BackupXL(stage *models.StageStruct, dirPath string)
- func (backRepo *BackRepoStruct) Checkout(stage *models.StageStruct)
- func (backRepo *BackRepoStruct) CheckoutCommand(command *models.Command)
- func (backRepo *BackRepoStruct) CheckoutDummyAgent(dummyagent *models.DummyAgent)
- func (backRepo *BackRepoStruct) CheckoutEngine(engine *models.Engine)
- func (backRepo *BackRepoStruct) CheckoutEvent(event *models.Event)
- func (backRepo *BackRepoStruct) CheckoutStatus(status *models.Status)
- func (backRepo *BackRepoStruct) CheckoutUpdateState(updatestate *models.UpdateState)
- func (backRepo *BackRepoStruct) Commit(stage *models.StageStruct)
- func (backRepo *BackRepoStruct) CommitCommand(command *models.Command)
- func (backRepo *BackRepoStruct) CommitDummyAgent(dummyagent *models.DummyAgent)
- func (backRepo *BackRepoStruct) CommitEngine(engine *models.Engine)
- func (backRepo *BackRepoStruct) CommitEvent(event *models.Event)
- func (backRepo *BackRepoStruct) CommitStatus(status *models.Status)
- func (backRepo *BackRepoStruct) CommitUpdateState(updatestate *models.UpdateState)
- func (backRepo *BackRepoStruct) GetLastCommitFromBackNb() uint
- func (backRepo *BackRepoStruct) GetLastPushFromFrontNb() uint
- func (backRepo *BackRepoStruct) GetStage() (stage *models.StageStruct)
- func (backRepo *BackRepoStruct) IncrementCommitFromBackNb() uint
- func (backRepo *BackRepoStruct) IncrementPushFromFrontNb() uint
- func (backRepo *BackRepoStruct) Restore(stage *models.StageStruct, dirPath string)
- func (backRepo *BackRepoStruct) RestoreXL(stage *models.StageStruct, dirPath string)
- func (backRepoStruct *BackRepoStruct) SubscribeToCommitNb(ctx context.Context) <-chan int
- type BackRepoUpdateStateStruct
- func (backRepoUpdateState *BackRepoUpdateStateStruct) Backup(dirPath string)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) BackupXL(file *xlsx.File)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) CheckoutPhaseOne() (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) CheckoutPhaseOneInstance(updatestateDB *UpdateStateDB) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, updatestateDB *UpdateStateDB) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitPhaseOneInstance(updatestate *models.UpdateState) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, updatestate *models.UpdateState) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) GetDB() db.DBInterface
- func (backRepoUpdateState *BackRepoUpdateStateStruct) GetStage() (stage *models.StageStruct)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) GetUpdateStateDBFromUpdateStatePtr(updatestate *models.UpdateState) (updatestateDB *UpdateStateDB)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, updatestate *models.UpdateState) (Error error)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) RestorePhaseOne(dirPath string)
- func (backRepoUpdateState *BackRepoUpdateStateStruct) RestorePhaseTwo()
- func (backRepoUpdateState *BackRepoUpdateStateStruct) RestoreXLPhaseOne(file *xlsx.File)
- type CommandAPI
- type CommandDB
- func (commandDB *CommandDB) CopyBasicFieldsFromCommand(command *models.Command)
- func (commandDB *CommandDB) CopyBasicFieldsFromCommandWOP(command *CommandWOP)
- func (commandDB *CommandDB) CopyBasicFieldsFromCommand_WOP(command *models.Command_WOP)
- func (commandDB *CommandDB) CopyBasicFieldsToCommand(command *models.Command)
- func (commandDB *CommandDB) CopyBasicFieldsToCommandWOP(command *CommandWOP)
- func (commandDB *CommandDB) CopyBasicFieldsToCommand_WOP(command *models.Command_WOP)
- func (commandDB *CommandDB) DecodePointers(backRepo *BackRepoStruct, command *models.Command)
- type CommandDBResponse
- type CommandDBs
- type CommandPointersEncoding
- type CommandWOP
- 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 DummyAgentAPI
- type DummyAgentDB
- func (dummyagentDB *DummyAgentDB) CopyBasicFieldsFromDummyAgent(dummyagent *models.DummyAgent)
- func (dummyagentDB *DummyAgentDB) CopyBasicFieldsFromDummyAgentWOP(dummyagent *DummyAgentWOP)
- func (dummyagentDB *DummyAgentDB) CopyBasicFieldsFromDummyAgent_WOP(dummyagent *models.DummyAgent_WOP)
- func (dummyagentDB *DummyAgentDB) CopyBasicFieldsToDummyAgent(dummyagent *models.DummyAgent)
- func (dummyagentDB *DummyAgentDB) CopyBasicFieldsToDummyAgentWOP(dummyagent *DummyAgentWOP)
- func (dummyagentDB *DummyAgentDB) CopyBasicFieldsToDummyAgent_WOP(dummyagent *models.DummyAgent_WOP)
- func (dummyagentDB *DummyAgentDB) DecodePointers(backRepo *BackRepoStruct, dummyagent *models.DummyAgent)
- type DummyAgentDBResponse
- type DummyAgentDBs
- type DummyAgentPointersEncoding
- type DummyAgentWOP
- type EngineAPI
- type EngineDB
- func (engineDB *EngineDB) CopyBasicFieldsFromEngine(engine *models.Engine)
- func (engineDB *EngineDB) CopyBasicFieldsFromEngineWOP(engine *EngineWOP)
- func (engineDB *EngineDB) CopyBasicFieldsFromEngine_WOP(engine *models.Engine_WOP)
- func (engineDB *EngineDB) CopyBasicFieldsToEngine(engine *models.Engine)
- func (engineDB *EngineDB) CopyBasicFieldsToEngineWOP(engine *EngineWOP)
- func (engineDB *EngineDB) CopyBasicFieldsToEngine_WOP(engine *models.Engine_WOP)
- func (engineDB *EngineDB) DecodePointers(backRepo *BackRepoStruct, engine *models.Engine)
- type EngineDBResponse
- type EngineDBs
- type EnginePointersEncoding
- type EngineWOP
- type EventAPI
- type EventDB
- func (eventDB *EventDB) CopyBasicFieldsFromEvent(event *models.Event)
- func (eventDB *EventDB) CopyBasicFieldsFromEventWOP(event *EventWOP)
- func (eventDB *EventDB) CopyBasicFieldsFromEvent_WOP(event *models.Event_WOP)
- func (eventDB *EventDB) CopyBasicFieldsToEvent(event *models.Event)
- func (eventDB *EventDB) CopyBasicFieldsToEventWOP(event *EventWOP)
- func (eventDB *EventDB) CopyBasicFieldsToEvent_WOP(event *models.Event_WOP)
- func (eventDB *EventDB) DecodePointers(backRepo *BackRepoStruct, event *models.Event)
- type EventDBResponse
- type EventDBs
- type EventPointersEncoding
- type EventWOP
- type GongstructDB
- type IntSlice
- type StatusAPI
- type StatusDB
- func (statusDB *StatusDB) CopyBasicFieldsFromStatus(status *models.Status)
- func (statusDB *StatusDB) CopyBasicFieldsFromStatusWOP(status *StatusWOP)
- func (statusDB *StatusDB) CopyBasicFieldsFromStatus_WOP(status *models.Status_WOP)
- func (statusDB *StatusDB) CopyBasicFieldsToStatus(status *models.Status)
- func (statusDB *StatusDB) CopyBasicFieldsToStatusWOP(status *StatusWOP)
- func (statusDB *StatusDB) CopyBasicFieldsToStatus_WOP(status *models.Status_WOP)
- func (statusDB *StatusDB) DecodePointers(backRepo *BackRepoStruct, status *models.Status)
- type StatusDBResponse
- type StatusDBs
- type StatusPointersEncoding
- type StatusWOP
- type UpdateStateAPI
- type UpdateStateDB
- func (updatestateDB *UpdateStateDB) CopyBasicFieldsFromUpdateState(updatestate *models.UpdateState)
- func (updatestateDB *UpdateStateDB) CopyBasicFieldsFromUpdateStateWOP(updatestate *UpdateStateWOP)
- func (updatestateDB *UpdateStateDB) CopyBasicFieldsFromUpdateState_WOP(updatestate *models.UpdateState_WOP)
- func (updatestateDB *UpdateStateDB) CopyBasicFieldsToUpdateState(updatestate *models.UpdateState)
- func (updatestateDB *UpdateStateDB) CopyBasicFieldsToUpdateStateWOP(updatestate *UpdateStateWOP)
- func (updatestateDB *UpdateStateDB) CopyBasicFieldsToUpdateState_WOP(updatestate *models.UpdateState_WOP)
- func (updatestateDB *UpdateStateDB) DecodePointers(backRepo *BackRepoStruct, updatestate *models.UpdateState)
- type UpdateStateDBResponse
- type UpdateStateDBs
- type UpdateStatePointersEncoding
- type UpdateStateWOP
Constants ¶
This section is empty.
Variables ¶
var BackRepoCommandid_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 BackRepoDummyAgentid_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 BackRepoEngineid_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 BackRepoEventid_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 BackRepoStatusid_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 BackRepoUpdateStateid_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 Command_Fields = []string{
"ID",
"Name",
"Command",
"CommandDate",
}
var DummyAgent_Fields = []string{
"ID",
"TechName",
"Name",
}
var Engine_Fields = []string{
"ID",
"Name",
"EndTime",
"CurrentTime",
"DisplayFormat",
"SecondsSinceStart",
"Fired",
"ControlMode",
"State",
"Speed",
}
var Event_Fields = []string{
"ID",
"Name",
"Duration",
}
var Status_Fields = []string{
"ID",
"Name",
"CurrentCommand",
"CompletionDate",
"CurrentSpeedCommand",
"SpeedCommandCompletionDate",
}
var UpdateState_Fields = []string{
"ID",
"Name",
"Duration",
"Period",
}
Functions ¶
func CopyBackRepoToBackRepoData ¶
func CopyBackRepoToBackRepoData(backRepo *BackRepoStruct, backRepoData *BackRepoData)
func GetID ¶
func GetID[T models.Gongstruct]( stage *models.StageStruct, backRepo *BackRepoStruct, instance *T) (id int)
func GetIDPointer ¶
func GetIDPointer[T models.PointerToGongstruct]( stage *models.StageStruct, backRepo *BackRepoStruct, instance T) (id int)
func GetInstanceDBFromInstance ¶
func GetInstanceDBFromInstance[T models.Gongstruct, T2 GongstructDB]( stage *models.StageStruct, backRepo *BackRepoStruct, instance *T) (ret *T2)
func GetReverseFieldOwner ¶
func GetReverseFieldOwner[T models.Gongstruct]( stage *models.StageStruct, backRepo *BackRepoStruct, instance *T, reverseField *models.ReverseField) (res any)
func GetReverseFieldOwnerName ¶
func GetReverseFieldOwnerName( stage *models.StageStruct, backRepo *BackRepoStruct, instance any, reverseField *models.ReverseField) (res string)
Types ¶
type BackRepoCommandStruct ¶
type BackRepoCommandStruct struct { // stores CommandDB according to their gorm ID Map_CommandDBID_CommandDB map[uint]*CommandDB // stores CommandDB ID according to Command address Map_CommandPtr_CommandDBID map[*models.Command]uint // stores Command according to their gorm ID Map_CommandDBID_CommandPtr map[uint]*models.Command // contains filtered or unexported fields }
func (*BackRepoCommandStruct) Backup ¶
func (backRepoCommand *BackRepoCommandStruct) Backup(dirPath string)
Backup generates a json file from a slice of all CommandDB instances in the backrepo
func (*BackRepoCommandStruct) BackupXL ¶
func (backRepoCommand *BackRepoCommandStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all CommandDB instances in the backrepo
func (*BackRepoCommandStruct) CheckoutPhaseOne ¶
func (backRepoCommand *BackRepoCommandStruct) CheckoutPhaseOne() (Error error)
BackRepoCommand.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 (*BackRepoCommandStruct) CheckoutPhaseOneInstance ¶
func (backRepoCommand *BackRepoCommandStruct) CheckoutPhaseOneInstance(commandDB *CommandDB) (Error error)
CheckoutPhaseOneInstance takes a commandDB that has been found in the DB, updates the backRepo and stages the models version of the commandDB
func (*BackRepoCommandStruct) CheckoutPhaseTwo ¶
func (backRepoCommand *BackRepoCommandStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoCommand.CheckoutPhaseTwo Checkouts all staged instances of Command to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCommandStruct) CheckoutPhaseTwoInstance ¶
func (backRepoCommand *BackRepoCommandStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, commandDB *CommandDB) (Error error)
BackRepoCommand.CheckoutPhaseTwoInstance Checkouts staged instances of Command to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCommandStruct) CommitDeleteInstance ¶
func (backRepoCommand *BackRepoCommandStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoCommand.CommitDeleteInstance commits deletion of Command to the BackRepo
func (*BackRepoCommandStruct) CommitPhaseOne ¶
func (backRepoCommand *BackRepoCommandStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
BackRepoCommand.CommitPhaseOne commits all staged instances of Command 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 (*BackRepoCommandStruct) CommitPhaseOneInstance ¶
func (backRepoCommand *BackRepoCommandStruct) CommitPhaseOneInstance(command *models.Command) (Error error)
BackRepoCommand.CommitPhaseOneInstance commits command staged instances of Command 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 (*BackRepoCommandStruct) CommitPhaseTwo ¶
func (backRepoCommand *BackRepoCommandStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoCommand.CommitPhaseTwo commits all staged instances of Command to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCommandStruct) CommitPhaseTwoInstance ¶
func (backRepoCommand *BackRepoCommandStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, command *models.Command) (Error error)
BackRepoCommand.CommitPhaseTwoInstance commits {{structname }} of models.Command to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCommandStruct) GetCommandDBFromCommandPtr ¶
func (backRepoCommand *BackRepoCommandStruct) GetCommandDBFromCommandPtr(command *models.Command) (commandDB *CommandDB)
GetCommandDBFromCommandPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoCommandStruct) GetDB ¶
func (backRepoCommand *BackRepoCommandStruct) GetDB() db.DBInterface
func (*BackRepoCommandStruct) GetStage ¶
func (backRepoCommand *BackRepoCommandStruct) GetStage() (stage *models.StageStruct)
func (*BackRepoCommandStruct) ResetReversePointers ¶
func (backRepoCommand *BackRepoCommandStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoCommand.ResetReversePointers commits all staged instances of Command to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCommandStruct) ResetReversePointersInstance ¶
func (backRepoCommand *BackRepoCommandStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, command *models.Command) (Error error)
func (*BackRepoCommandStruct) RestorePhaseOne ¶
func (backRepoCommand *BackRepoCommandStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "CommandDB.json" in dirPath that stores an array of CommandDB and stores it in the database the map BackRepoCommandid_atBckpTime_newID is updated accordingly
func (*BackRepoCommandStruct) RestorePhaseTwo ¶
func (backRepoCommand *BackRepoCommandStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<Command>id_atBckpTime_newID to compute new index
func (*BackRepoCommandStruct) RestoreXLPhaseOne ¶
func (backRepoCommand *BackRepoCommandStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "Command" sheet all CommandDB instances
type BackRepoData ¶
type BackRepoData struct { CommandAPIs []*CommandAPI DummyAgentAPIs []*DummyAgentAPI EngineAPIs []*EngineAPI EventAPIs []*EventAPI StatusAPIs []*StatusAPI UpdateStateAPIs []*UpdateStateAPI }
type BackRepoDummyAgentStruct ¶
type BackRepoDummyAgentStruct struct { // stores DummyAgentDB according to their gorm ID Map_DummyAgentDBID_DummyAgentDB map[uint]*DummyAgentDB // stores DummyAgentDB ID according to DummyAgent address Map_DummyAgentPtr_DummyAgentDBID map[*models.DummyAgent]uint // stores DummyAgent according to their gorm ID Map_DummyAgentDBID_DummyAgentPtr map[uint]*models.DummyAgent // contains filtered or unexported fields }
func (*BackRepoDummyAgentStruct) Backup ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) Backup(dirPath string)
Backup generates a json file from a slice of all DummyAgentDB instances in the backrepo
func (*BackRepoDummyAgentStruct) BackupXL ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all DummyAgentDB instances in the backrepo
func (*BackRepoDummyAgentStruct) CheckoutPhaseOne ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) CheckoutPhaseOne() (Error error)
BackRepoDummyAgent.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 (*BackRepoDummyAgentStruct) CheckoutPhaseOneInstance ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) CheckoutPhaseOneInstance(dummyagentDB *DummyAgentDB) (Error error)
CheckoutPhaseOneInstance takes a dummyagentDB that has been found in the DB, updates the backRepo and stages the models version of the dummyagentDB
func (*BackRepoDummyAgentStruct) CheckoutPhaseTwo ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoDummyAgent.CheckoutPhaseTwo Checkouts all staged instances of DummyAgent to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDummyAgentStruct) CheckoutPhaseTwoInstance ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, dummyagentDB *DummyAgentDB) (Error error)
BackRepoDummyAgent.CheckoutPhaseTwoInstance Checkouts staged instances of DummyAgent to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDummyAgentStruct) CommitDeleteInstance ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoDummyAgent.CommitDeleteInstance commits deletion of DummyAgent to the BackRepo
func (*BackRepoDummyAgentStruct) CommitPhaseOne ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
BackRepoDummyAgent.CommitPhaseOne commits all staged instances of DummyAgent 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 (*BackRepoDummyAgentStruct) CommitPhaseOneInstance ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitPhaseOneInstance(dummyagent *models.DummyAgent) (Error error)
BackRepoDummyAgent.CommitPhaseOneInstance commits dummyagent staged instances of DummyAgent 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 (*BackRepoDummyAgentStruct) CommitPhaseTwo ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoDummyAgent.CommitPhaseTwo commits all staged instances of DummyAgent to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDummyAgentStruct) CommitPhaseTwoInstance ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, dummyagent *models.DummyAgent) (Error error)
BackRepoDummyAgent.CommitPhaseTwoInstance commits {{structname }} of models.DummyAgent to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDummyAgentStruct) GetDB ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) GetDB() db.DBInterface
func (*BackRepoDummyAgentStruct) GetDummyAgentDBFromDummyAgentPtr ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) GetDummyAgentDBFromDummyAgentPtr(dummyagent *models.DummyAgent) (dummyagentDB *DummyAgentDB)
GetDummyAgentDBFromDummyAgentPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoDummyAgentStruct) GetStage ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) GetStage() (stage *models.StageStruct)
func (*BackRepoDummyAgentStruct) ResetReversePointers ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoDummyAgent.ResetReversePointers commits all staged instances of DummyAgent to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoDummyAgentStruct) ResetReversePointersInstance ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, dummyagent *models.DummyAgent) (Error error)
func (*BackRepoDummyAgentStruct) RestorePhaseOne ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "DummyAgentDB.json" in dirPath that stores an array of DummyAgentDB and stores it in the database the map BackRepoDummyAgentid_atBckpTime_newID is updated accordingly
func (*BackRepoDummyAgentStruct) RestorePhaseTwo ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<DummyAgent>id_atBckpTime_newID to compute new index
func (*BackRepoDummyAgentStruct) RestoreXLPhaseOne ¶
func (backRepoDummyAgent *BackRepoDummyAgentStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "DummyAgent" sheet all DummyAgentDB instances
type BackRepoEngineStruct ¶
type BackRepoEngineStruct struct { // stores EngineDB according to their gorm ID Map_EngineDBID_EngineDB map[uint]*EngineDB // stores EngineDB ID according to Engine address Map_EnginePtr_EngineDBID map[*models.Engine]uint // stores Engine according to their gorm ID Map_EngineDBID_EnginePtr map[uint]*models.Engine // contains filtered or unexported fields }
func (*BackRepoEngineStruct) Backup ¶
func (backRepoEngine *BackRepoEngineStruct) Backup(dirPath string)
Backup generates a json file from a slice of all EngineDB instances in the backrepo
func (*BackRepoEngineStruct) BackupXL ¶
func (backRepoEngine *BackRepoEngineStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all EngineDB instances in the backrepo
func (*BackRepoEngineStruct) CheckoutPhaseOne ¶
func (backRepoEngine *BackRepoEngineStruct) CheckoutPhaseOne() (Error error)
BackRepoEngine.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 (*BackRepoEngineStruct) CheckoutPhaseOneInstance ¶
func (backRepoEngine *BackRepoEngineStruct) CheckoutPhaseOneInstance(engineDB *EngineDB) (Error error)
CheckoutPhaseOneInstance takes a engineDB that has been found in the DB, updates the backRepo and stages the models version of the engineDB
func (*BackRepoEngineStruct) CheckoutPhaseTwo ¶
func (backRepoEngine *BackRepoEngineStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoEngine.CheckoutPhaseTwo Checkouts all staged instances of Engine to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEngineStruct) CheckoutPhaseTwoInstance ¶
func (backRepoEngine *BackRepoEngineStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, engineDB *EngineDB) (Error error)
BackRepoEngine.CheckoutPhaseTwoInstance Checkouts staged instances of Engine to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEngineStruct) CommitDeleteInstance ¶
func (backRepoEngine *BackRepoEngineStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoEngine.CommitDeleteInstance commits deletion of Engine to the BackRepo
func (*BackRepoEngineStruct) CommitPhaseOne ¶
func (backRepoEngine *BackRepoEngineStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
BackRepoEngine.CommitPhaseOne commits all staged instances of Engine 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 (*BackRepoEngineStruct) CommitPhaseOneInstance ¶
func (backRepoEngine *BackRepoEngineStruct) CommitPhaseOneInstance(engine *models.Engine) (Error error)
BackRepoEngine.CommitPhaseOneInstance commits engine staged instances of Engine 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 (*BackRepoEngineStruct) CommitPhaseTwo ¶
func (backRepoEngine *BackRepoEngineStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoEngine.CommitPhaseTwo commits all staged instances of Engine to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEngineStruct) CommitPhaseTwoInstance ¶
func (backRepoEngine *BackRepoEngineStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, engine *models.Engine) (Error error)
BackRepoEngine.CommitPhaseTwoInstance commits {{structname }} of models.Engine to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEngineStruct) GetDB ¶
func (backRepoEngine *BackRepoEngineStruct) GetDB() db.DBInterface
func (*BackRepoEngineStruct) GetEngineDBFromEnginePtr ¶
func (backRepoEngine *BackRepoEngineStruct) GetEngineDBFromEnginePtr(engine *models.Engine) (engineDB *EngineDB)
GetEngineDBFromEnginePtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoEngineStruct) GetStage ¶
func (backRepoEngine *BackRepoEngineStruct) GetStage() (stage *models.StageStruct)
func (*BackRepoEngineStruct) ResetReversePointers ¶
func (backRepoEngine *BackRepoEngineStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoEngine.ResetReversePointers commits all staged instances of Engine to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEngineStruct) ResetReversePointersInstance ¶
func (backRepoEngine *BackRepoEngineStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, engine *models.Engine) (Error error)
func (*BackRepoEngineStruct) RestorePhaseOne ¶
func (backRepoEngine *BackRepoEngineStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "EngineDB.json" in dirPath that stores an array of EngineDB and stores it in the database the map BackRepoEngineid_atBckpTime_newID is updated accordingly
func (*BackRepoEngineStruct) RestorePhaseTwo ¶
func (backRepoEngine *BackRepoEngineStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<Engine>id_atBckpTime_newID to compute new index
func (*BackRepoEngineStruct) RestoreXLPhaseOne ¶
func (backRepoEngine *BackRepoEngineStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "Engine" sheet all EngineDB instances
type BackRepoEventStruct ¶
type BackRepoEventStruct struct { // stores EventDB according to their gorm ID Map_EventDBID_EventDB map[uint]*EventDB // stores EventDB ID according to Event address Map_EventPtr_EventDBID map[*models.Event]uint // stores Event according to their gorm ID Map_EventDBID_EventPtr map[uint]*models.Event // contains filtered or unexported fields }
func (*BackRepoEventStruct) Backup ¶
func (backRepoEvent *BackRepoEventStruct) Backup(dirPath string)
Backup generates a json file from a slice of all EventDB instances in the backrepo
func (*BackRepoEventStruct) BackupXL ¶
func (backRepoEvent *BackRepoEventStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all EventDB instances in the backrepo
func (*BackRepoEventStruct) CheckoutPhaseOne ¶
func (backRepoEvent *BackRepoEventStruct) CheckoutPhaseOne() (Error error)
BackRepoEvent.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 (*BackRepoEventStruct) CheckoutPhaseOneInstance ¶
func (backRepoEvent *BackRepoEventStruct) CheckoutPhaseOneInstance(eventDB *EventDB) (Error error)
CheckoutPhaseOneInstance takes a eventDB that has been found in the DB, updates the backRepo and stages the models version of the eventDB
func (*BackRepoEventStruct) CheckoutPhaseTwo ¶
func (backRepoEvent *BackRepoEventStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoEvent.CheckoutPhaseTwo Checkouts all staged instances of Event to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEventStruct) CheckoutPhaseTwoInstance ¶
func (backRepoEvent *BackRepoEventStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, eventDB *EventDB) (Error error)
BackRepoEvent.CheckoutPhaseTwoInstance Checkouts staged instances of Event to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEventStruct) CommitDeleteInstance ¶
func (backRepoEvent *BackRepoEventStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoEvent.CommitDeleteInstance commits deletion of Event to the BackRepo
func (*BackRepoEventStruct) CommitPhaseOne ¶
func (backRepoEvent *BackRepoEventStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
BackRepoEvent.CommitPhaseOne commits all staged instances of Event 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 (*BackRepoEventStruct) CommitPhaseOneInstance ¶
func (backRepoEvent *BackRepoEventStruct) CommitPhaseOneInstance(event *models.Event) (Error error)
BackRepoEvent.CommitPhaseOneInstance commits event staged instances of Event 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 (*BackRepoEventStruct) CommitPhaseTwo ¶
func (backRepoEvent *BackRepoEventStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoEvent.CommitPhaseTwo commits all staged instances of Event to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEventStruct) CommitPhaseTwoInstance ¶
func (backRepoEvent *BackRepoEventStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, event *models.Event) (Error error)
BackRepoEvent.CommitPhaseTwoInstance commits {{structname }} of models.Event to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEventStruct) GetDB ¶
func (backRepoEvent *BackRepoEventStruct) GetDB() db.DBInterface
func (*BackRepoEventStruct) GetEventDBFromEventPtr ¶
func (backRepoEvent *BackRepoEventStruct) GetEventDBFromEventPtr(event *models.Event) (eventDB *EventDB)
GetEventDBFromEventPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoEventStruct) GetStage ¶
func (backRepoEvent *BackRepoEventStruct) GetStage() (stage *models.StageStruct)
func (*BackRepoEventStruct) ResetReversePointers ¶
func (backRepoEvent *BackRepoEventStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoEvent.ResetReversePointers commits all staged instances of Event to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoEventStruct) ResetReversePointersInstance ¶
func (backRepoEvent *BackRepoEventStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, event *models.Event) (Error error)
func (*BackRepoEventStruct) RestorePhaseOne ¶
func (backRepoEvent *BackRepoEventStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "EventDB.json" in dirPath that stores an array of EventDB and stores it in the database the map BackRepoEventid_atBckpTime_newID is updated accordingly
func (*BackRepoEventStruct) RestorePhaseTwo ¶
func (backRepoEvent *BackRepoEventStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<Event>id_atBckpTime_newID to compute new index
func (*BackRepoEventStruct) RestoreXLPhaseOne ¶
func (backRepoEvent *BackRepoEventStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "Event" sheet all EventDB instances
type BackRepoStatusStruct ¶
type BackRepoStatusStruct struct { // stores StatusDB according to their gorm ID Map_StatusDBID_StatusDB map[uint]*StatusDB // stores StatusDB ID according to Status address Map_StatusPtr_StatusDBID map[*models.Status]uint // stores Status according to their gorm ID Map_StatusDBID_StatusPtr map[uint]*models.Status // contains filtered or unexported fields }
func (*BackRepoStatusStruct) Backup ¶
func (backRepoStatus *BackRepoStatusStruct) Backup(dirPath string)
Backup generates a json file from a slice of all StatusDB instances in the backrepo
func (*BackRepoStatusStruct) BackupXL ¶
func (backRepoStatus *BackRepoStatusStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all StatusDB instances in the backrepo
func (*BackRepoStatusStruct) CheckoutPhaseOne ¶
func (backRepoStatus *BackRepoStatusStruct) CheckoutPhaseOne() (Error error)
BackRepoStatus.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 (*BackRepoStatusStruct) CheckoutPhaseOneInstance ¶
func (backRepoStatus *BackRepoStatusStruct) CheckoutPhaseOneInstance(statusDB *StatusDB) (Error error)
CheckoutPhaseOneInstance takes a statusDB that has been found in the DB, updates the backRepo and stages the models version of the statusDB
func (*BackRepoStatusStruct) CheckoutPhaseTwo ¶
func (backRepoStatus *BackRepoStatusStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoStatus.CheckoutPhaseTwo Checkouts all staged instances of Status to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoStatusStruct) CheckoutPhaseTwoInstance ¶
func (backRepoStatus *BackRepoStatusStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, statusDB *StatusDB) (Error error)
BackRepoStatus.CheckoutPhaseTwoInstance Checkouts staged instances of Status to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoStatusStruct) CommitDeleteInstance ¶
func (backRepoStatus *BackRepoStatusStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoStatus.CommitDeleteInstance commits deletion of Status to the BackRepo
func (*BackRepoStatusStruct) CommitPhaseOne ¶
func (backRepoStatus *BackRepoStatusStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
BackRepoStatus.CommitPhaseOne commits all staged instances of Status 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 (*BackRepoStatusStruct) CommitPhaseOneInstance ¶
func (backRepoStatus *BackRepoStatusStruct) CommitPhaseOneInstance(status *models.Status) (Error error)
BackRepoStatus.CommitPhaseOneInstance commits status staged instances of Status 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 (*BackRepoStatusStruct) CommitPhaseTwo ¶
func (backRepoStatus *BackRepoStatusStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoStatus.CommitPhaseTwo commits all staged instances of Status to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoStatusStruct) CommitPhaseTwoInstance ¶
func (backRepoStatus *BackRepoStatusStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, status *models.Status) (Error error)
BackRepoStatus.CommitPhaseTwoInstance commits {{structname }} of models.Status to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoStatusStruct) GetDB ¶
func (backRepoStatus *BackRepoStatusStruct) GetDB() db.DBInterface
func (*BackRepoStatusStruct) GetStage ¶
func (backRepoStatus *BackRepoStatusStruct) GetStage() (stage *models.StageStruct)
func (*BackRepoStatusStruct) GetStatusDBFromStatusPtr ¶
func (backRepoStatus *BackRepoStatusStruct) GetStatusDBFromStatusPtr(status *models.Status) (statusDB *StatusDB)
GetStatusDBFromStatusPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoStatusStruct) ResetReversePointers ¶
func (backRepoStatus *BackRepoStatusStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoStatus.ResetReversePointers commits all staged instances of Status to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoStatusStruct) ResetReversePointersInstance ¶
func (backRepoStatus *BackRepoStatusStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, status *models.Status) (Error error)
func (*BackRepoStatusStruct) RestorePhaseOne ¶
func (backRepoStatus *BackRepoStatusStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "StatusDB.json" in dirPath that stores an array of StatusDB and stores it in the database the map BackRepoStatusid_atBckpTime_newID is updated accordingly
func (*BackRepoStatusStruct) RestorePhaseTwo ¶
func (backRepoStatus *BackRepoStatusStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<Status>id_atBckpTime_newID to compute new index
func (*BackRepoStatusStruct) RestoreXLPhaseOne ¶
func (backRepoStatus *BackRepoStatusStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "Status" sheet all StatusDB instances
type BackRepoStruct ¶
type BackRepoStruct struct { // insertion point for per struct back repo declarations BackRepoCommand BackRepoCommandStruct BackRepoDummyAgent BackRepoDummyAgentStruct BackRepoEngine BackRepoEngineStruct BackRepoEvent BackRepoEventStruct BackRepoStatus BackRepoStatusStruct BackRepoUpdateState BackRepoUpdateStateStruct 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.StageStruct, filename string) (backRepo *BackRepoStruct)
func (*BackRepoStruct) Backup ¶
func (backRepo *BackRepoStruct) Backup(stage *models.StageStruct, dirPath string)
Backup the BackRepoStruct
func (*BackRepoStruct) BackupXL ¶
func (backRepo *BackRepoStruct) BackupXL(stage *models.StageStruct, dirPath string)
Backup in XL the BackRepoStruct
func (*BackRepoStruct) Checkout ¶
func (backRepo *BackRepoStruct) Checkout(stage *models.StageStruct)
Checkout the database into the stage
func (*BackRepoStruct) CheckoutCommand ¶
func (backRepo *BackRepoStruct) CheckoutCommand(command *models.Command)
CommitCommand allows checkout of a single command (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutDummyAgent ¶
func (backRepo *BackRepoStruct) CheckoutDummyAgent(dummyagent *models.DummyAgent)
CommitDummyAgent allows checkout of a single dummyagent (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutEngine ¶
func (backRepo *BackRepoStruct) CheckoutEngine(engine *models.Engine)
CommitEngine allows checkout of a single engine (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutEvent ¶
func (backRepo *BackRepoStruct) CheckoutEvent(event *models.Event)
CommitEvent allows checkout of a single event (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutStatus ¶
func (backRepo *BackRepoStruct) CheckoutStatus(status *models.Status)
CommitStatus allows checkout of a single status (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutUpdateState ¶
func (backRepo *BackRepoStruct) CheckoutUpdateState(updatestate *models.UpdateState)
CommitUpdateState allows checkout of a single updatestate (if already staged and with a BackRepo id)
func (*BackRepoStruct) Commit ¶
func (backRepo *BackRepoStruct) Commit(stage *models.StageStruct)
Commit the BackRepoStruct inner variables and link to the database
func (*BackRepoStruct) CommitCommand ¶
func (backRepo *BackRepoStruct) CommitCommand(command *models.Command)
CommitCommand allows commit of a single command (if already staged)
func (*BackRepoStruct) CommitDummyAgent ¶
func (backRepo *BackRepoStruct) CommitDummyAgent(dummyagent *models.DummyAgent)
CommitDummyAgent allows commit of a single dummyagent (if already staged)
func (*BackRepoStruct) CommitEngine ¶
func (backRepo *BackRepoStruct) CommitEngine(engine *models.Engine)
CommitEngine allows commit of a single engine (if already staged)
func (*BackRepoStruct) CommitEvent ¶
func (backRepo *BackRepoStruct) CommitEvent(event *models.Event)
CommitEvent allows commit of a single event (if already staged)
func (*BackRepoStruct) CommitStatus ¶
func (backRepo *BackRepoStruct) CommitStatus(status *models.Status)
CommitStatus allows commit of a single status (if already staged)
func (*BackRepoStruct) CommitUpdateState ¶
func (backRepo *BackRepoStruct) CommitUpdateState(updatestate *models.UpdateState)
CommitUpdateState allows commit of a single updatestate (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.StageStruct)
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.StageStruct, dirPath string)
Restore the database into the back repo
func (*BackRepoStruct) RestoreXL ¶
func (backRepo *BackRepoStruct) RestoreXL(stage *models.StageStruct, dirPath string)
Restore the database into the back repo
func (*BackRepoStruct) SubscribeToCommitNb ¶
func (backRepoStruct *BackRepoStruct) SubscribeToCommitNb(ctx context.Context) <-chan int
type BackRepoUpdateStateStruct ¶
type BackRepoUpdateStateStruct struct { // stores UpdateStateDB according to their gorm ID Map_UpdateStateDBID_UpdateStateDB map[uint]*UpdateStateDB // stores UpdateStateDB ID according to UpdateState address Map_UpdateStatePtr_UpdateStateDBID map[*models.UpdateState]uint // stores UpdateState according to their gorm ID Map_UpdateStateDBID_UpdateStatePtr map[uint]*models.UpdateState // contains filtered or unexported fields }
func (*BackRepoUpdateStateStruct) Backup ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) Backup(dirPath string)
Backup generates a json file from a slice of all UpdateStateDB instances in the backrepo
func (*BackRepoUpdateStateStruct) BackupXL ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all UpdateStateDB instances in the backrepo
func (*BackRepoUpdateStateStruct) CheckoutPhaseOne ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) CheckoutPhaseOne() (Error error)
BackRepoUpdateState.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 (*BackRepoUpdateStateStruct) CheckoutPhaseOneInstance ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) CheckoutPhaseOneInstance(updatestateDB *UpdateStateDB) (Error error)
CheckoutPhaseOneInstance takes a updatestateDB that has been found in the DB, updates the backRepo and stages the models version of the updatestateDB
func (*BackRepoUpdateStateStruct) CheckoutPhaseTwo ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoUpdateState.CheckoutPhaseTwo Checkouts all staged instances of UpdateState to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoUpdateStateStruct) CheckoutPhaseTwoInstance ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, updatestateDB *UpdateStateDB) (Error error)
BackRepoUpdateState.CheckoutPhaseTwoInstance Checkouts staged instances of UpdateState to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoUpdateStateStruct) CommitDeleteInstance ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoUpdateState.CommitDeleteInstance commits deletion of UpdateState to the BackRepo
func (*BackRepoUpdateStateStruct) CommitPhaseOne ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
BackRepoUpdateState.CommitPhaseOne commits all staged instances of UpdateState 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 (*BackRepoUpdateStateStruct) CommitPhaseOneInstance ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitPhaseOneInstance(updatestate *models.UpdateState) (Error error)
BackRepoUpdateState.CommitPhaseOneInstance commits updatestate staged instances of UpdateState 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 (*BackRepoUpdateStateStruct) CommitPhaseTwo ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoUpdateState.CommitPhaseTwo commits all staged instances of UpdateState to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoUpdateStateStruct) CommitPhaseTwoInstance ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, updatestate *models.UpdateState) (Error error)
BackRepoUpdateState.CommitPhaseTwoInstance commits {{structname }} of models.UpdateState to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoUpdateStateStruct) GetDB ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) GetDB() db.DBInterface
func (*BackRepoUpdateStateStruct) GetStage ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) GetStage() (stage *models.StageStruct)
func (*BackRepoUpdateStateStruct) GetUpdateStateDBFromUpdateStatePtr ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) GetUpdateStateDBFromUpdateStatePtr(updatestate *models.UpdateState) (updatestateDB *UpdateStateDB)
GetUpdateStateDBFromUpdateStatePtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoUpdateStateStruct) ResetReversePointers ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoUpdateState.ResetReversePointers commits all staged instances of UpdateState to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoUpdateStateStruct) ResetReversePointersInstance ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, updatestate *models.UpdateState) (Error error)
func (*BackRepoUpdateStateStruct) RestorePhaseOne ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "UpdateStateDB.json" in dirPath that stores an array of UpdateStateDB and stores it in the database the map BackRepoUpdateStateid_atBckpTime_newID is updated accordingly
func (*BackRepoUpdateStateStruct) RestorePhaseTwo ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<UpdateState>id_atBckpTime_newID to compute new index
func (*BackRepoUpdateStateStruct) RestoreXLPhaseOne ¶
func (backRepoUpdateState *BackRepoUpdateStateStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "UpdateState" sheet all UpdateStateDB instances
type CommandAPI ¶
type CommandAPI struct { gorm.Model models.Command_WOP // encoding of pointers // for API, it cannot be embedded CommandPointersEncoding CommandPointersEncoding }
CommandAPI 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 commandAPI
type CommandDB ¶
type CommandDB struct { gorm.Model // Declation for basic field commandDB.Name Name_Data sql.NullString // Declation for basic field commandDB.Command Command_Data sql.NullString // Declation for basic field commandDB.CommandDate CommandDate_Data sql.NullString // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration CommandPointersEncoding }
CommandDB describes a command 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 commandDB
func (*CommandDB) CopyBasicFieldsFromCommand ¶
CopyBasicFieldsFromCommand
func (*CommandDB) CopyBasicFieldsFromCommandWOP ¶
func (commandDB *CommandDB) CopyBasicFieldsFromCommandWOP(command *CommandWOP)
CopyBasicFieldsFromCommandWOP
func (*CommandDB) CopyBasicFieldsFromCommand_WOP ¶
func (commandDB *CommandDB) CopyBasicFieldsFromCommand_WOP(command *models.Command_WOP)
CopyBasicFieldsFromCommand_WOP
func (*CommandDB) CopyBasicFieldsToCommand ¶
CopyBasicFieldsToCommand
func (*CommandDB) CopyBasicFieldsToCommandWOP ¶
func (commandDB *CommandDB) CopyBasicFieldsToCommandWOP(command *CommandWOP)
CopyBasicFieldsToCommandWOP
func (*CommandDB) CopyBasicFieldsToCommand_WOP ¶
func (commandDB *CommandDB) CopyBasicFieldsToCommand_WOP(command *models.Command_WOP)
CopyBasicFieldsToCommand_WOP
func (*CommandDB) DecodePointers ¶
func (commandDB *CommandDB) DecodePointers(backRepo *BackRepoStruct, command *models.Command)
type CommandDBResponse ¶
type CommandDBResponse struct {
CommandDB
}
CommandDBResponse provides response swagger:response commandDBResponse
type CommandDBs ¶
type CommandDBs []CommandDB
CommandDBs arrays commandDBs swagger:response commandDBsResponse
type CommandPointersEncoding ¶
type CommandPointersEncoding struct { // field Engine is a pointer to another Struct (optional or 0..1) // This field is generated into another field to enable AS ONE association EngineID sql.NullInt64 }
CommandPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type CommandWOP ¶
type CommandWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` Command models.CommandType `xlsx:"2"` CommandDate string `xlsx:"3"` }
CommandWOP is a Command 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 DummyAgentAPI ¶
type DummyAgentAPI struct { gorm.Model models.DummyAgent_WOP // encoding of pointers // for API, it cannot be embedded DummyAgentPointersEncoding DummyAgentPointersEncoding }
DummyAgentAPI 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 dummyagentAPI
type DummyAgentDB ¶
type DummyAgentDB struct { gorm.Model // Declation for basic field dummyagentDB.TechName TechName_Data sql.NullString // Declation for basic field dummyagentDB.Name Name_Data sql.NullString // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration DummyAgentPointersEncoding }
DummyAgentDB describes a dummyagent 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 dummyagentDB
func (*DummyAgentDB) CopyBasicFieldsFromDummyAgent ¶
func (dummyagentDB *DummyAgentDB) CopyBasicFieldsFromDummyAgent(dummyagent *models.DummyAgent)
CopyBasicFieldsFromDummyAgent
func (*DummyAgentDB) CopyBasicFieldsFromDummyAgentWOP ¶
func (dummyagentDB *DummyAgentDB) CopyBasicFieldsFromDummyAgentWOP(dummyagent *DummyAgentWOP)
CopyBasicFieldsFromDummyAgentWOP
func (*DummyAgentDB) CopyBasicFieldsFromDummyAgent_WOP ¶
func (dummyagentDB *DummyAgentDB) CopyBasicFieldsFromDummyAgent_WOP(dummyagent *models.DummyAgent_WOP)
CopyBasicFieldsFromDummyAgent_WOP
func (*DummyAgentDB) CopyBasicFieldsToDummyAgent ¶
func (dummyagentDB *DummyAgentDB) CopyBasicFieldsToDummyAgent(dummyagent *models.DummyAgent)
CopyBasicFieldsToDummyAgent
func (*DummyAgentDB) CopyBasicFieldsToDummyAgentWOP ¶
func (dummyagentDB *DummyAgentDB) CopyBasicFieldsToDummyAgentWOP(dummyagent *DummyAgentWOP)
CopyBasicFieldsToDummyAgentWOP
func (*DummyAgentDB) CopyBasicFieldsToDummyAgent_WOP ¶
func (dummyagentDB *DummyAgentDB) CopyBasicFieldsToDummyAgent_WOP(dummyagent *models.DummyAgent_WOP)
CopyBasicFieldsToDummyAgent_WOP
func (*DummyAgentDB) DecodePointers ¶
func (dummyagentDB *DummyAgentDB) DecodePointers(backRepo *BackRepoStruct, dummyagent *models.DummyAgent)
type DummyAgentDBResponse ¶
type DummyAgentDBResponse struct {
DummyAgentDB
}
DummyAgentDBResponse provides response swagger:response dummyagentDBResponse
type DummyAgentDBs ¶
type DummyAgentDBs []DummyAgentDB
DummyAgentDBs arrays dummyagentDBs swagger:response dummyagentDBsResponse
type DummyAgentPointersEncoding ¶
type DummyAgentPointersEncoding struct { }
DummyAgentPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type DummyAgentWOP ¶
DummyAgentWOP is a DummyAgent without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type EngineAPI ¶
type EngineAPI struct { gorm.Model models.Engine_WOP // encoding of pointers // for API, it cannot be embedded EnginePointersEncoding EnginePointersEncoding }
EngineAPI 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 engineAPI
type EngineDB ¶
type EngineDB struct { gorm.Model // Declation for basic field engineDB.Name Name_Data sql.NullString // Declation for basic field engineDB.EndTime EndTime_Data sql.NullString // Declation for basic field engineDB.CurrentTime CurrentTime_Data sql.NullString // Declation for basic field engineDB.DisplayFormat DisplayFormat_Data sql.NullString // Declation for basic field engineDB.SecondsSinceStart SecondsSinceStart_Data sql.NullFloat64 // Declation for basic field engineDB.Fired Fired_Data sql.NullInt64 // Declation for basic field engineDB.ControlMode ControlMode_Data sql.NullString // Declation for basic field engineDB.State State_Data sql.NullString // Declation for basic field engineDB.Speed Speed_Data sql.NullFloat64 // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration EnginePointersEncoding }
EngineDB describes a engine 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 engineDB
func (*EngineDB) CopyBasicFieldsFromEngine ¶
CopyBasicFieldsFromEngine
func (*EngineDB) CopyBasicFieldsFromEngineWOP ¶
CopyBasicFieldsFromEngineWOP
func (*EngineDB) CopyBasicFieldsFromEngine_WOP ¶
func (engineDB *EngineDB) CopyBasicFieldsFromEngine_WOP(engine *models.Engine_WOP)
CopyBasicFieldsFromEngine_WOP
func (*EngineDB) CopyBasicFieldsToEngine ¶
CopyBasicFieldsToEngine
func (*EngineDB) CopyBasicFieldsToEngineWOP ¶
CopyBasicFieldsToEngineWOP
func (*EngineDB) CopyBasicFieldsToEngine_WOP ¶
func (engineDB *EngineDB) CopyBasicFieldsToEngine_WOP(engine *models.Engine_WOP)
CopyBasicFieldsToEngine_WOP
func (*EngineDB) DecodePointers ¶
func (engineDB *EngineDB) DecodePointers(backRepo *BackRepoStruct, engine *models.Engine)
type EngineDBResponse ¶
type EngineDBResponse struct {
EngineDB
}
EngineDBResponse provides response swagger:response engineDBResponse
type EngineDBs ¶
type EngineDBs []EngineDB
EngineDBs arrays engineDBs swagger:response engineDBsResponse
type EnginePointersEncoding ¶
type EnginePointersEncoding struct { }
EnginePointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type EngineWOP ¶
type EngineWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` EndTime string `xlsx:"2"` CurrentTime string `xlsx:"3"` DisplayFormat string `xlsx:"4"` SecondsSinceStart float64 `xlsx:"5"` Fired int `xlsx:"6"` ControlMode models.ControlMode `xlsx:"7"` State models.EngineState `xlsx:"8"` Speed float64 `xlsx:"9"` }
EngineWOP is a Engine without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type EventAPI ¶
type EventAPI struct { gorm.Model models.Event_WOP // encoding of pointers // for API, it cannot be embedded EventPointersEncoding EventPointersEncoding }
EventAPI 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 eventAPI
type EventDB ¶
type EventDB struct { gorm.Model // Declation for basic field eventDB.Name Name_Data sql.NullString // Declation for basic field eventDB.Duration Duration_Data sql.NullInt64 // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration EventPointersEncoding }
EventDB describes a event 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 eventDB
func (*EventDB) CopyBasicFieldsFromEvent ¶
CopyBasicFieldsFromEvent
func (*EventDB) CopyBasicFieldsFromEventWOP ¶
CopyBasicFieldsFromEventWOP
func (*EventDB) CopyBasicFieldsFromEvent_WOP ¶
CopyBasicFieldsFromEvent_WOP
func (*EventDB) CopyBasicFieldsToEvent ¶
CopyBasicFieldsToEvent
func (*EventDB) CopyBasicFieldsToEventWOP ¶
CopyBasicFieldsToEventWOP
func (*EventDB) CopyBasicFieldsToEvent_WOP ¶
CopyBasicFieldsToEvent_WOP
func (*EventDB) DecodePointers ¶
func (eventDB *EventDB) DecodePointers(backRepo *BackRepoStruct, event *models.Event)
type EventDBResponse ¶
type EventDBResponse struct {
EventDB
}
EventDBResponse provides response swagger:response eventDBResponse
type EventPointersEncoding ¶
type EventPointersEncoding struct { }
EventPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type EventWOP ¶
EventWOP is a Event 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 StatusAPI ¶
type StatusAPI struct { gorm.Model models.Status_WOP // encoding of pointers // for API, it cannot be embedded StatusPointersEncoding StatusPointersEncoding }
StatusAPI 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 statusAPI
type StatusDB ¶
type StatusDB struct { gorm.Model // Declation for basic field statusDB.Name Name_Data sql.NullString // Declation for basic field statusDB.CurrentCommand CurrentCommand_Data sql.NullString // Declation for basic field statusDB.CompletionDate CompletionDate_Data sql.NullString // Declation for basic field statusDB.CurrentSpeedCommand CurrentSpeedCommand_Data sql.NullString // Declation for basic field statusDB.SpeedCommandCompletionDate SpeedCommandCompletionDate_Data sql.NullString // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration StatusPointersEncoding }
StatusDB describes a status 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 statusDB
func (*StatusDB) CopyBasicFieldsFromStatus ¶
CopyBasicFieldsFromStatus
func (*StatusDB) CopyBasicFieldsFromStatusWOP ¶
CopyBasicFieldsFromStatusWOP
func (*StatusDB) CopyBasicFieldsFromStatus_WOP ¶
func (statusDB *StatusDB) CopyBasicFieldsFromStatus_WOP(status *models.Status_WOP)
CopyBasicFieldsFromStatus_WOP
func (*StatusDB) CopyBasicFieldsToStatus ¶
CopyBasicFieldsToStatus
func (*StatusDB) CopyBasicFieldsToStatusWOP ¶
CopyBasicFieldsToStatusWOP
func (*StatusDB) CopyBasicFieldsToStatus_WOP ¶
func (statusDB *StatusDB) CopyBasicFieldsToStatus_WOP(status *models.Status_WOP)
CopyBasicFieldsToStatus_WOP
func (*StatusDB) DecodePointers ¶
func (statusDB *StatusDB) DecodePointers(backRepo *BackRepoStruct, status *models.Status)
type StatusDBResponse ¶
type StatusDBResponse struct {
StatusDB
}
StatusDBResponse provides response swagger:response statusDBResponse
type StatusDBs ¶
type StatusDBs []StatusDB
StatusDBs arrays statusDBs swagger:response statusDBsResponse
type StatusPointersEncoding ¶
type StatusPointersEncoding struct { }
StatusPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type StatusWOP ¶
type StatusWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` CurrentCommand models.CommandType `xlsx:"2"` CompletionDate string `xlsx:"3"` CurrentSpeedCommand models.SpeedCommandType `xlsx:"4"` SpeedCommandCompletionDate string `xlsx:"5"` }
StatusWOP is a Status without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type UpdateStateAPI ¶
type UpdateStateAPI struct { gorm.Model models.UpdateState_WOP // encoding of pointers // for API, it cannot be embedded UpdateStatePointersEncoding UpdateStatePointersEncoding }
UpdateStateAPI 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 updatestateAPI
type UpdateStateDB ¶
type UpdateStateDB struct { gorm.Model // Declation for basic field updatestateDB.Name Name_Data sql.NullString // Declation for basic field updatestateDB.Duration Duration_Data sql.NullInt64 // Declation for basic field updatestateDB.Period Period_Data sql.NullInt64 // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration UpdateStatePointersEncoding }
UpdateStateDB describes a updatestate 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 updatestateDB
func (*UpdateStateDB) CopyBasicFieldsFromUpdateState ¶
func (updatestateDB *UpdateStateDB) CopyBasicFieldsFromUpdateState(updatestate *models.UpdateState)
CopyBasicFieldsFromUpdateState
func (*UpdateStateDB) CopyBasicFieldsFromUpdateStateWOP ¶
func (updatestateDB *UpdateStateDB) CopyBasicFieldsFromUpdateStateWOP(updatestate *UpdateStateWOP)
CopyBasicFieldsFromUpdateStateWOP
func (*UpdateStateDB) CopyBasicFieldsFromUpdateState_WOP ¶
func (updatestateDB *UpdateStateDB) CopyBasicFieldsFromUpdateState_WOP(updatestate *models.UpdateState_WOP)
CopyBasicFieldsFromUpdateState_WOP
func (*UpdateStateDB) CopyBasicFieldsToUpdateState ¶
func (updatestateDB *UpdateStateDB) CopyBasicFieldsToUpdateState(updatestate *models.UpdateState)
CopyBasicFieldsToUpdateState
func (*UpdateStateDB) CopyBasicFieldsToUpdateStateWOP ¶
func (updatestateDB *UpdateStateDB) CopyBasicFieldsToUpdateStateWOP(updatestate *UpdateStateWOP)
CopyBasicFieldsToUpdateStateWOP
func (*UpdateStateDB) CopyBasicFieldsToUpdateState_WOP ¶
func (updatestateDB *UpdateStateDB) CopyBasicFieldsToUpdateState_WOP(updatestate *models.UpdateState_WOP)
CopyBasicFieldsToUpdateState_WOP
func (*UpdateStateDB) DecodePointers ¶
func (updatestateDB *UpdateStateDB) DecodePointers(backRepo *BackRepoStruct, updatestate *models.UpdateState)
type UpdateStateDBResponse ¶
type UpdateStateDBResponse struct {
UpdateStateDB
}
UpdateStateDBResponse provides response swagger:response updatestateDBResponse
type UpdateStateDBs ¶
type UpdateStateDBs []UpdateStateDB
UpdateStateDBs arrays updatestateDBs swagger:response updatestateDBsResponse
type UpdateStatePointersEncoding ¶
type UpdateStatePointersEncoding struct { }
UpdateStatePointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type UpdateStateWOP ¶
type UpdateStateWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` Duration time.Duration `xlsx:"2"` Period time.Duration `xlsx:"3"` }
UpdateStateWOP is a UpdateState without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint