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
do not modify, generated file
generated code - do not edit
generated code - do not edit
generated code - do not edit
generated code - do not edit
Index ¶
- Variables
- func CopyBackRepoToBackRepoData(backRepo *BackRepoStruct, backRepoData *BackRepoData)
- func GetID[T models.Gongstruct](stage *models.Stage, backRepo *BackRepoStruct, instance *T) (id int)
- func GetIDPointer[T models.PointerToGongstruct](stage *models.Stage, backRepo *BackRepoStruct, instance T) (id int)
- func GetInstanceDBFromInstance[T models.Gongstruct, T2 GongstructDB](stage *models.Stage, backRepo *BackRepoStruct, instance *T) (ret *T2)
- type BackRepoData
- type BackRepoFileToDownloadStruct
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) Backup(dirPath string)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) BackupXL(file *xlsx.File)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CheckoutPhaseOne() (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CheckoutPhaseOneInstance(filetodownloadDB *FileToDownloadDB) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, filetodownloadDB *FileToDownloadDB) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitPhaseOneInstance(filetodownload *models.FileToDownload) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, filetodownload *models.FileToDownload) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) GetDB() db.DBInterface
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) GetFileToDownloadDBFromFileToDownloadPtr(filetodownload *models.FileToDownload) (filetodownloadDB *FileToDownloadDB)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) GetStage() (stage *models.Stage)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, filetodownload *models.FileToDownload) (Error error)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) RestorePhaseOne(dirPath string)
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) RestorePhaseTwo()
- func (backRepoFileToDownload *BackRepoFileToDownloadStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoFileToUploadStruct
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) Backup(dirPath string)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) BackupXL(file *xlsx.File)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) CheckoutPhaseOne() (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) CheckoutPhaseOneInstance(filetouploadDB *FileToUploadDB) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, filetouploadDB *FileToUploadDB) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitPhaseOneInstance(filetoupload *models.FileToUpload) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, filetoupload *models.FileToUpload) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) GetDB() db.DBInterface
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) GetFileToUploadDBFromFileToUploadPtr(filetoupload *models.FileToUpload) (filetouploadDB *FileToUploadDB)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) GetStage() (stage *models.Stage)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, filetoupload *models.FileToUpload) (Error error)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) RestorePhaseOne(dirPath string)
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) RestorePhaseTwo()
- func (backRepoFileToUpload *BackRepoFileToUploadStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoMessageStruct
- func (backRepoMessage *BackRepoMessageStruct) Backup(dirPath string)
- func (backRepoMessage *BackRepoMessageStruct) BackupXL(file *xlsx.File)
- func (backRepoMessage *BackRepoMessageStruct) CheckoutPhaseOne() (Error error)
- func (backRepoMessage *BackRepoMessageStruct) CheckoutPhaseOneInstance(messageDB *MessageDB) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, messageDB *MessageDB) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) CommitPhaseOne(stage *models.Stage) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) CommitPhaseOneInstance(message *models.Message) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, message *models.Message) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) GetDB() db.DBInterface
- func (backRepoMessage *BackRepoMessageStruct) GetMessageDBFromMessagePtr(message *models.Message) (messageDB *MessageDB)
- func (backRepoMessage *BackRepoMessageStruct) GetStage() (stage *models.Stage)
- func (backRepoMessage *BackRepoMessageStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, message *models.Message) (Error error)
- func (backRepoMessage *BackRepoMessageStruct) RestorePhaseOne(dirPath string)
- func (backRepoMessage *BackRepoMessageStruct) RestorePhaseTwo()
- func (backRepoMessage *BackRepoMessageStruct) 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) CheckoutFileToDownload(filetodownload *models.FileToDownload)
- func (backRepo *BackRepoStruct) CheckoutFileToUpload(filetoupload *models.FileToUpload)
- func (backRepo *BackRepoStruct) CheckoutMessage(message *models.Message)
- func (backRepo *BackRepoStruct) Commit(stage *models.Stage)
- func (backRepo *BackRepoStruct) CommitFileToDownload(filetodownload *models.FileToDownload)
- func (backRepo *BackRepoStruct) CommitFileToUpload(filetoupload *models.FileToUpload)
- func (backRepo *BackRepoStruct) CommitMessage(message *models.Message)
- 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 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 FileToDownloadAPI
- type FileToDownloadDB
- func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsFromFileToDownload(filetodownload *models.FileToDownload)
- func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsFromFileToDownloadWOP(filetodownload *FileToDownloadWOP)
- func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsFromFileToDownload_WOP(filetodownload *models.FileToDownload_WOP)
- func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsToFileToDownload(filetodownload *models.FileToDownload)
- func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsToFileToDownloadWOP(filetodownload *FileToDownloadWOP)
- func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsToFileToDownload_WOP(filetodownload *models.FileToDownload_WOP)
- func (filetodownloadDB *FileToDownloadDB) DecodePointers(backRepo *BackRepoStruct, filetodownload *models.FileToDownload)
- type FileToDownloadDBResponse
- type FileToDownloadDBs
- type FileToDownloadPointersEncoding
- type FileToDownloadWOP
- type FileToUploadAPI
- type FileToUploadDB
- func (filetouploadDB *FileToUploadDB) CopyBasicFieldsFromFileToUpload(filetoupload *models.FileToUpload)
- func (filetouploadDB *FileToUploadDB) CopyBasicFieldsFromFileToUploadWOP(filetoupload *FileToUploadWOP)
- func (filetouploadDB *FileToUploadDB) CopyBasicFieldsFromFileToUpload_WOP(filetoupload *models.FileToUpload_WOP)
- func (filetouploadDB *FileToUploadDB) CopyBasicFieldsToFileToUpload(filetoupload *models.FileToUpload)
- func (filetouploadDB *FileToUploadDB) CopyBasicFieldsToFileToUploadWOP(filetoupload *FileToUploadWOP)
- func (filetouploadDB *FileToUploadDB) CopyBasicFieldsToFileToUpload_WOP(filetoupload *models.FileToUpload_WOP)
- func (filetouploadDB *FileToUploadDB) DecodePointers(backRepo *BackRepoStruct, filetoupload *models.FileToUpload)
- type FileToUploadDBResponse
- type FileToUploadDBs
- type FileToUploadPointersEncoding
- type FileToUploadWOP
- type GongstructDB
- type IntSlice
- type MessageAPI
- type MessageDB
- func (messageDB *MessageDB) CopyBasicFieldsFromMessage(message *models.Message)
- func (messageDB *MessageDB) CopyBasicFieldsFromMessageWOP(message *MessageWOP)
- func (messageDB *MessageDB) CopyBasicFieldsFromMessage_WOP(message *models.Message_WOP)
- func (messageDB *MessageDB) CopyBasicFieldsToMessage(message *models.Message)
- func (messageDB *MessageDB) CopyBasicFieldsToMessageWOP(message *MessageWOP)
- func (messageDB *MessageDB) CopyBasicFieldsToMessage_WOP(message *models.Message_WOP)
- func (messageDB *MessageDB) DecodePointers(backRepo *BackRepoStruct, message *models.Message)
- type MessageDBResponse
- type MessageDBs
- type MessagePointersEncoding
- type MessageWOP
Constants ¶
This section is empty.
Variables ¶
var BackRepoFileToDownloadid_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 BackRepoFileToUploadid_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 BackRepoMessageid_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 FileToDownload_Fields = []string{
"ID",
"Name",
"Content",
}
var FileToUpload_Fields = []string{
"ID",
"Name",
"Base64EncodedContent",
}
var Message_Fields = []string{
"ID",
"Name",
}
Functions ¶
func CopyBackRepoToBackRepoData ¶
func CopyBackRepoToBackRepoData(backRepo *BackRepoStruct, backRepoData *BackRepoData)
func GetID ¶
func GetID[T models.Gongstruct]( stage *models.Stage, backRepo *BackRepoStruct, instance *T) (id int)
func GetIDPointer ¶
func GetIDPointer[T models.PointerToGongstruct]( stage *models.Stage, backRepo *BackRepoStruct, instance T) (id int)
func GetInstanceDBFromInstance ¶
func GetInstanceDBFromInstance[T models.Gongstruct, T2 GongstructDB]( stage *models.Stage, backRepo *BackRepoStruct, instance *T) (ret *T2)
Types ¶
type BackRepoData ¶
type BackRepoData struct { FileToDownloadAPIs []*FileToDownloadAPI FileToUploadAPIs []*FileToUploadAPI MessageAPIs []*MessageAPI // index of the web socket for this stack type (unique among all stack instances) GONG__Index int }
type BackRepoFileToDownloadStruct ¶
type BackRepoFileToDownloadStruct struct { // stores FileToDownloadDB according to their gorm ID Map_FileToDownloadDBID_FileToDownloadDB map[uint]*FileToDownloadDB // stores FileToDownloadDB ID according to FileToDownload address Map_FileToDownloadPtr_FileToDownloadDBID map[*models.FileToDownload]uint // stores FileToDownload according to their gorm ID Map_FileToDownloadDBID_FileToDownloadPtr map[uint]*models.FileToDownload // contains filtered or unexported fields }
func (*BackRepoFileToDownloadStruct) Backup ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) Backup(dirPath string)
Backup generates a json file from a slice of all FileToDownloadDB instances in the backrepo
func (*BackRepoFileToDownloadStruct) BackupXL ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all FileToDownloadDB instances in the backrepo
func (*BackRepoFileToDownloadStruct) CheckoutPhaseOne ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CheckoutPhaseOne() (Error error)
BackRepoFileToDownload.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 (*BackRepoFileToDownloadStruct) CheckoutPhaseOneInstance ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CheckoutPhaseOneInstance(filetodownloadDB *FileToDownloadDB) (Error error)
CheckoutPhaseOneInstance takes a filetodownloadDB that has been found in the DB, updates the backRepo and stages the models version of the filetodownloadDB
func (*BackRepoFileToDownloadStruct) CheckoutPhaseTwo ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoFileToDownload.CheckoutPhaseTwo Checkouts all staged instances of FileToDownload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToDownloadStruct) CheckoutPhaseTwoInstance ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, filetodownloadDB *FileToDownloadDB) (Error error)
BackRepoFileToDownload.CheckoutPhaseTwoInstance Checkouts staged instances of FileToDownload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToDownloadStruct) CommitDeleteInstance ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoFileToDownload.CommitDeleteInstance commits deletion of FileToDownload to the BackRepo
func (*BackRepoFileToDownloadStruct) CommitPhaseOne ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoFileToDownload.CommitPhaseOne commits all staged instances of FileToDownload 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 (*BackRepoFileToDownloadStruct) CommitPhaseOneInstance ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitPhaseOneInstance(filetodownload *models.FileToDownload) (Error error)
BackRepoFileToDownload.CommitPhaseOneInstance commits filetodownload staged instances of FileToDownload 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 (*BackRepoFileToDownloadStruct) CommitPhaseTwo ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoFileToDownload.CommitPhaseTwo commits all staged instances of FileToDownload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToDownloadStruct) CommitPhaseTwoInstance ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, filetodownload *models.FileToDownload) (Error error)
BackRepoFileToDownload.CommitPhaseTwoInstance commits {{structname }} of models.FileToDownload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToDownloadStruct) GetDB ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) GetDB() db.DBInterface
func (*BackRepoFileToDownloadStruct) GetFileToDownloadDBFromFileToDownloadPtr ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) GetFileToDownloadDBFromFileToDownloadPtr(filetodownload *models.FileToDownload) (filetodownloadDB *FileToDownloadDB)
GetFileToDownloadDBFromFileToDownloadPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoFileToDownloadStruct) GetStage ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) GetStage() (stage *models.Stage)
func (*BackRepoFileToDownloadStruct) ResetReversePointers ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoFileToDownload.ResetReversePointers commits all staged instances of FileToDownload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToDownloadStruct) ResetReversePointersInstance ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, filetodownload *models.FileToDownload) (Error error)
func (*BackRepoFileToDownloadStruct) RestorePhaseOne ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "FileToDownloadDB.json" in dirPath that stores an array of FileToDownloadDB and stores it in the database the map BackRepoFileToDownloadid_atBckpTime_newID is updated accordingly
func (*BackRepoFileToDownloadStruct) RestorePhaseTwo ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<FileToDownload>id_atBckpTime_newID to compute new index
func (*BackRepoFileToDownloadStruct) RestoreXLPhaseOne ¶
func (backRepoFileToDownload *BackRepoFileToDownloadStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "FileToDownload" sheet all FileToDownloadDB instances
type BackRepoFileToUploadStruct ¶
type BackRepoFileToUploadStruct struct { // stores FileToUploadDB according to their gorm ID Map_FileToUploadDBID_FileToUploadDB map[uint]*FileToUploadDB // stores FileToUploadDB ID according to FileToUpload address Map_FileToUploadPtr_FileToUploadDBID map[*models.FileToUpload]uint // stores FileToUpload according to their gorm ID Map_FileToUploadDBID_FileToUploadPtr map[uint]*models.FileToUpload // contains filtered or unexported fields }
func (*BackRepoFileToUploadStruct) Backup ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) Backup(dirPath string)
Backup generates a json file from a slice of all FileToUploadDB instances in the backrepo
func (*BackRepoFileToUploadStruct) BackupXL ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all FileToUploadDB instances in the backrepo
func (*BackRepoFileToUploadStruct) CheckoutPhaseOne ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) CheckoutPhaseOne() (Error error)
BackRepoFileToUpload.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 (*BackRepoFileToUploadStruct) CheckoutPhaseOneInstance ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) CheckoutPhaseOneInstance(filetouploadDB *FileToUploadDB) (Error error)
CheckoutPhaseOneInstance takes a filetouploadDB that has been found in the DB, updates the backRepo and stages the models version of the filetouploadDB
func (*BackRepoFileToUploadStruct) CheckoutPhaseTwo ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoFileToUpload.CheckoutPhaseTwo Checkouts all staged instances of FileToUpload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToUploadStruct) CheckoutPhaseTwoInstance ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, filetouploadDB *FileToUploadDB) (Error error)
BackRepoFileToUpload.CheckoutPhaseTwoInstance Checkouts staged instances of FileToUpload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToUploadStruct) CommitDeleteInstance ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoFileToUpload.CommitDeleteInstance commits deletion of FileToUpload to the BackRepo
func (*BackRepoFileToUploadStruct) CommitPhaseOne ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoFileToUpload.CommitPhaseOne commits all staged instances of FileToUpload 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 (*BackRepoFileToUploadStruct) CommitPhaseOneInstance ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitPhaseOneInstance(filetoupload *models.FileToUpload) (Error error)
BackRepoFileToUpload.CommitPhaseOneInstance commits filetoupload staged instances of FileToUpload 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 (*BackRepoFileToUploadStruct) CommitPhaseTwo ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoFileToUpload.CommitPhaseTwo commits all staged instances of FileToUpload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToUploadStruct) CommitPhaseTwoInstance ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, filetoupload *models.FileToUpload) (Error error)
BackRepoFileToUpload.CommitPhaseTwoInstance commits {{structname }} of models.FileToUpload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToUploadStruct) GetDB ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) GetDB() db.DBInterface
func (*BackRepoFileToUploadStruct) GetFileToUploadDBFromFileToUploadPtr ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) GetFileToUploadDBFromFileToUploadPtr(filetoupload *models.FileToUpload) (filetouploadDB *FileToUploadDB)
GetFileToUploadDBFromFileToUploadPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoFileToUploadStruct) GetStage ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) GetStage() (stage *models.Stage)
func (*BackRepoFileToUploadStruct) ResetReversePointers ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoFileToUpload.ResetReversePointers commits all staged instances of FileToUpload to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoFileToUploadStruct) ResetReversePointersInstance ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, filetoupload *models.FileToUpload) (Error error)
func (*BackRepoFileToUploadStruct) RestorePhaseOne ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "FileToUploadDB.json" in dirPath that stores an array of FileToUploadDB and stores it in the database the map BackRepoFileToUploadid_atBckpTime_newID is updated accordingly
func (*BackRepoFileToUploadStruct) RestorePhaseTwo ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<FileToUpload>id_atBckpTime_newID to compute new index
func (*BackRepoFileToUploadStruct) RestoreXLPhaseOne ¶
func (backRepoFileToUpload *BackRepoFileToUploadStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "FileToUpload" sheet all FileToUploadDB instances
type BackRepoMessageStruct ¶
type BackRepoMessageStruct struct { // stores MessageDB according to their gorm ID Map_MessageDBID_MessageDB map[uint]*MessageDB // stores MessageDB ID according to Message address Map_MessagePtr_MessageDBID map[*models.Message]uint // stores Message according to their gorm ID Map_MessageDBID_MessagePtr map[uint]*models.Message // contains filtered or unexported fields }
func (*BackRepoMessageStruct) Backup ¶
func (backRepoMessage *BackRepoMessageStruct) Backup(dirPath string)
Backup generates a json file from a slice of all MessageDB instances in the backrepo
func (*BackRepoMessageStruct) BackupXL ¶
func (backRepoMessage *BackRepoMessageStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all MessageDB instances in the backrepo
func (*BackRepoMessageStruct) CheckoutPhaseOne ¶
func (backRepoMessage *BackRepoMessageStruct) CheckoutPhaseOne() (Error error)
BackRepoMessage.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 (*BackRepoMessageStruct) CheckoutPhaseOneInstance ¶
func (backRepoMessage *BackRepoMessageStruct) CheckoutPhaseOneInstance(messageDB *MessageDB) (Error error)
CheckoutPhaseOneInstance takes a messageDB that has been found in the DB, updates the backRepo and stages the models version of the messageDB
func (*BackRepoMessageStruct) CheckoutPhaseTwo ¶
func (backRepoMessage *BackRepoMessageStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoMessage.CheckoutPhaseTwo Checkouts all staged instances of Message to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoMessageStruct) CheckoutPhaseTwoInstance ¶
func (backRepoMessage *BackRepoMessageStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, messageDB *MessageDB) (Error error)
BackRepoMessage.CheckoutPhaseTwoInstance Checkouts staged instances of Message to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoMessageStruct) CommitDeleteInstance ¶
func (backRepoMessage *BackRepoMessageStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoMessage.CommitDeleteInstance commits deletion of Message to the BackRepo
func (*BackRepoMessageStruct) CommitPhaseOne ¶
func (backRepoMessage *BackRepoMessageStruct) CommitPhaseOne(stage *models.Stage) (Error error)
BackRepoMessage.CommitPhaseOne commits all staged instances of Message 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 (*BackRepoMessageStruct) CommitPhaseOneInstance ¶
func (backRepoMessage *BackRepoMessageStruct) CommitPhaseOneInstance(message *models.Message) (Error error)
BackRepoMessage.CommitPhaseOneInstance commits message staged instances of Message 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 (*BackRepoMessageStruct) CommitPhaseTwo ¶
func (backRepoMessage *BackRepoMessageStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoMessage.CommitPhaseTwo commits all staged instances of Message to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoMessageStruct) CommitPhaseTwoInstance ¶
func (backRepoMessage *BackRepoMessageStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, message *models.Message) (Error error)
BackRepoMessage.CommitPhaseTwoInstance commits {{structname }} of models.Message to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoMessageStruct) GetDB ¶
func (backRepoMessage *BackRepoMessageStruct) GetDB() db.DBInterface
func (*BackRepoMessageStruct) GetMessageDBFromMessagePtr ¶
func (backRepoMessage *BackRepoMessageStruct) GetMessageDBFromMessagePtr(message *models.Message) (messageDB *MessageDB)
GetMessageDBFromMessagePtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoMessageStruct) GetStage ¶
func (backRepoMessage *BackRepoMessageStruct) GetStage() (stage *models.Stage)
func (*BackRepoMessageStruct) ResetReversePointers ¶
func (backRepoMessage *BackRepoMessageStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)
BackRepoMessage.ResetReversePointers commits all staged instances of Message to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoMessageStruct) ResetReversePointersInstance ¶
func (backRepoMessage *BackRepoMessageStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, message *models.Message) (Error error)
func (*BackRepoMessageStruct) RestorePhaseOne ¶
func (backRepoMessage *BackRepoMessageStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "MessageDB.json" in dirPath that stores an array of MessageDB and stores it in the database the map BackRepoMessageid_atBckpTime_newID is updated accordingly
func (*BackRepoMessageStruct) RestorePhaseTwo ¶
func (backRepoMessage *BackRepoMessageStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<Message>id_atBckpTime_newID to compute new index
func (*BackRepoMessageStruct) RestoreXLPhaseOne ¶
func (backRepoMessage *BackRepoMessageStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "Message" sheet all MessageDB instances
type BackRepoStruct ¶
type BackRepoStruct struct { // insertion point for per struct back repo declarations BackRepoFileToDownload BackRepoFileToDownloadStruct BackRepoFileToUpload BackRepoFileToUploadStruct BackRepoMessage BackRepoMessageStruct 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) CheckoutFileToDownload ¶
func (backRepo *BackRepoStruct) CheckoutFileToDownload(filetodownload *models.FileToDownload)
CommitFileToDownload allows checkout of a single filetodownload (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutFileToUpload ¶
func (backRepo *BackRepoStruct) CheckoutFileToUpload(filetoupload *models.FileToUpload)
CommitFileToUpload allows checkout of a single filetoupload (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutMessage ¶
func (backRepo *BackRepoStruct) CheckoutMessage(message *models.Message)
CommitMessage allows checkout of a single message (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) CommitFileToDownload ¶
func (backRepo *BackRepoStruct) CommitFileToDownload(filetodownload *models.FileToDownload)
CommitFileToDownload allows commit of a single filetodownload (if already staged)
func (*BackRepoStruct) CommitFileToUpload ¶
func (backRepo *BackRepoStruct) CommitFileToUpload(filetoupload *models.FileToUpload)
CommitFileToUpload allows commit of a single filetoupload (if already staged)
func (*BackRepoStruct) CommitMessage ¶
func (backRepo *BackRepoStruct) CommitMessage(message *models.Message)
CommitMessage allows commit of a single message (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 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 FileToDownloadAPI ¶
type FileToDownloadAPI struct { gorm.Model models.FileToDownload_WOP // encoding of pointers // for API, it cannot be embedded FileToDownloadPointersEncoding FileToDownloadPointersEncoding }
FileToDownloadAPI 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 filetodownloadAPI
type FileToDownloadDB ¶
type FileToDownloadDB struct { gorm.Model // Declation for basic field filetodownloadDB.Name Name_Data sql.NullString // Declation for basic field filetodownloadDB.Content Content_Data sql.NullString // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration FileToDownloadPointersEncoding }
FileToDownloadDB describes a filetodownload 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 filetodownloadDB
func (*FileToDownloadDB) CopyBasicFieldsFromFileToDownload ¶
func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsFromFileToDownload(filetodownload *models.FileToDownload)
CopyBasicFieldsFromFileToDownload
func (*FileToDownloadDB) CopyBasicFieldsFromFileToDownloadWOP ¶
func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsFromFileToDownloadWOP(filetodownload *FileToDownloadWOP)
CopyBasicFieldsFromFileToDownloadWOP
func (*FileToDownloadDB) CopyBasicFieldsFromFileToDownload_WOP ¶
func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsFromFileToDownload_WOP(filetodownload *models.FileToDownload_WOP)
CopyBasicFieldsFromFileToDownload_WOP
func (*FileToDownloadDB) CopyBasicFieldsToFileToDownload ¶
func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsToFileToDownload(filetodownload *models.FileToDownload)
CopyBasicFieldsToFileToDownload
func (*FileToDownloadDB) CopyBasicFieldsToFileToDownloadWOP ¶
func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsToFileToDownloadWOP(filetodownload *FileToDownloadWOP)
CopyBasicFieldsToFileToDownloadWOP
func (*FileToDownloadDB) CopyBasicFieldsToFileToDownload_WOP ¶
func (filetodownloadDB *FileToDownloadDB) CopyBasicFieldsToFileToDownload_WOP(filetodownload *models.FileToDownload_WOP)
CopyBasicFieldsToFileToDownload_WOP
func (*FileToDownloadDB) DecodePointers ¶
func (filetodownloadDB *FileToDownloadDB) DecodePointers(backRepo *BackRepoStruct, filetodownload *models.FileToDownload)
type FileToDownloadDBResponse ¶
type FileToDownloadDBResponse struct {
FileToDownloadDB
}
FileToDownloadDBResponse provides response swagger:response filetodownloadDBResponse
type FileToDownloadDBs ¶
type FileToDownloadDBs []FileToDownloadDB
FileToDownloadDBs arrays filetodownloadDBs swagger:response filetodownloadDBsResponse
type FileToDownloadPointersEncoding ¶
type FileToDownloadPointersEncoding struct { }
FileToDownloadPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type FileToDownloadWOP ¶
type FileToDownloadWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` Content string `xlsx:"2"` }
FileToDownloadWOP is a FileToDownload without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type FileToUploadAPI ¶
type FileToUploadAPI struct { gorm.Model models.FileToUpload_WOP // encoding of pointers // for API, it cannot be embedded FileToUploadPointersEncoding FileToUploadPointersEncoding }
FileToUploadAPI 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 filetouploadAPI
type FileToUploadDB ¶
type FileToUploadDB struct { gorm.Model // Declation for basic field filetouploadDB.Name Name_Data sql.NullString // Declation for basic field filetouploadDB.Base64EncodedContent Base64EncodedContent_Data sql.NullString // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration FileToUploadPointersEncoding }
FileToUploadDB describes a filetoupload 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 filetouploadDB
func (*FileToUploadDB) CopyBasicFieldsFromFileToUpload ¶
func (filetouploadDB *FileToUploadDB) CopyBasicFieldsFromFileToUpload(filetoupload *models.FileToUpload)
CopyBasicFieldsFromFileToUpload
func (*FileToUploadDB) CopyBasicFieldsFromFileToUploadWOP ¶
func (filetouploadDB *FileToUploadDB) CopyBasicFieldsFromFileToUploadWOP(filetoupload *FileToUploadWOP)
CopyBasicFieldsFromFileToUploadWOP
func (*FileToUploadDB) CopyBasicFieldsFromFileToUpload_WOP ¶
func (filetouploadDB *FileToUploadDB) CopyBasicFieldsFromFileToUpload_WOP(filetoupload *models.FileToUpload_WOP)
CopyBasicFieldsFromFileToUpload_WOP
func (*FileToUploadDB) CopyBasicFieldsToFileToUpload ¶
func (filetouploadDB *FileToUploadDB) CopyBasicFieldsToFileToUpload(filetoupload *models.FileToUpload)
CopyBasicFieldsToFileToUpload
func (*FileToUploadDB) CopyBasicFieldsToFileToUploadWOP ¶
func (filetouploadDB *FileToUploadDB) CopyBasicFieldsToFileToUploadWOP(filetoupload *FileToUploadWOP)
CopyBasicFieldsToFileToUploadWOP
func (*FileToUploadDB) CopyBasicFieldsToFileToUpload_WOP ¶
func (filetouploadDB *FileToUploadDB) CopyBasicFieldsToFileToUpload_WOP(filetoupload *models.FileToUpload_WOP)
CopyBasicFieldsToFileToUpload_WOP
func (*FileToUploadDB) DecodePointers ¶
func (filetouploadDB *FileToUploadDB) DecodePointers(backRepo *BackRepoStruct, filetoupload *models.FileToUpload)
type FileToUploadDBResponse ¶
type FileToUploadDBResponse struct {
FileToUploadDB
}
FileToUploadDBResponse provides response swagger:response filetouploadDBResponse
type FileToUploadDBs ¶
type FileToUploadDBs []FileToUploadDB
FileToUploadDBs arrays filetouploadDBs swagger:response filetouploadDBsResponse
type FileToUploadPointersEncoding ¶
type FileToUploadPointersEncoding struct { }
FileToUploadPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type FileToUploadWOP ¶
type FileToUploadWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` Base64EncodedContent string `xlsx:"2"` }
FileToUploadWOP is a FileToUpload 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 MessageAPI ¶
type MessageAPI struct { gorm.Model models.Message_WOP // encoding of pointers // for API, it cannot be embedded MessagePointersEncoding MessagePointersEncoding }
MessageAPI 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 messageAPI
type MessageDB ¶
type MessageDB struct { gorm.Model // Declation for basic field messageDB.Name Name_Data sql.NullString // encoding of pointers // for GORM serialization, it is necessary to embed to Pointer Encoding declaration MessagePointersEncoding }
MessageDB describes a message 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 messageDB
func (*MessageDB) CopyBasicFieldsFromMessage ¶
CopyBasicFieldsFromMessage
func (*MessageDB) CopyBasicFieldsFromMessageWOP ¶
func (messageDB *MessageDB) CopyBasicFieldsFromMessageWOP(message *MessageWOP)
CopyBasicFieldsFromMessageWOP
func (*MessageDB) CopyBasicFieldsFromMessage_WOP ¶
func (messageDB *MessageDB) CopyBasicFieldsFromMessage_WOP(message *models.Message_WOP)
CopyBasicFieldsFromMessage_WOP
func (*MessageDB) CopyBasicFieldsToMessage ¶
CopyBasicFieldsToMessage
func (*MessageDB) CopyBasicFieldsToMessageWOP ¶
func (messageDB *MessageDB) CopyBasicFieldsToMessageWOP(message *MessageWOP)
CopyBasicFieldsToMessageWOP
func (*MessageDB) CopyBasicFieldsToMessage_WOP ¶
func (messageDB *MessageDB) CopyBasicFieldsToMessage_WOP(message *models.Message_WOP)
CopyBasicFieldsToMessage_WOP
func (*MessageDB) DecodePointers ¶
func (messageDB *MessageDB) DecodePointers(backRepo *BackRepoStruct, message *models.Message)
type MessageDBResponse ¶
type MessageDBResponse struct {
MessageDB
}
MessageDBResponse provides response swagger:response messageDBResponse
type MessageDBs ¶
type MessageDBs []MessageDB
MessageDBs arrays messageDBs swagger:response messageDBsResponse
type MessagePointersEncoding ¶
type MessagePointersEncoding struct { }
MessagePointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type MessageWOP ¶
MessageWOP is a Message without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint