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 genORMTranslation.go
generated from OrmFileSetupTemplate
Index ¶
- Variables
- func AutoMigrate(db *gorm.DB)
- func GetLastCommitNb() uint
- func GetLastPushFromFrontNb() uint
- func ResetDB(db *gorm.DB)
- func SetupModels(logMode bool, filepath string) *gorm.DB
- type BackRepoCountrySpecStruct
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) Backup(dirPath string)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) BackupXL(file *xlsx.File)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) CheckoutPhaseOne() (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) CheckoutPhaseOneInstance(countryspecDB *CountrySpecDB) (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, countryspecDB *CountrySpecDB) (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitPhaseOneInstance(countryspec *models.CountrySpec) (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, countryspec *models.CountrySpec) (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) GetCountrySpecDBFromCountrySpecPtr(countryspec *models.CountrySpec) (countryspecDB *CountrySpecDB)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) GetDB() *gorm.DB
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) Init(db *gorm.DB) (Error error)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) RestorePhaseOne(dirPath string)
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) RestorePhaseTwo()
- func (backRepoCountrySpec *BackRepoCountrySpecStruct) RestoreXLPhaseOne(file *xlsx.File)
- type BackRepoCountryWithBodiesStruct
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) Backup(dirPath string)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) BackupXL(file *xlsx.File)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CheckoutPhaseOne() (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CheckoutPhaseOneInstance(countrywithbodiesDB *CountryWithBodiesDB) (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, countrywithbodiesDB *CountryWithBodiesDB) (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitDeleteInstance(id uint) (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitPhaseOneInstance(countrywithbodies *models.CountryWithBodies) (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, ...) (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) GetCountryWithBodiesDBFromCountryWithBodiesPtr(countrywithbodies *models.CountryWithBodies) (countrywithbodiesDB *CountryWithBodiesDB)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) GetDB() *gorm.DB
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) Init(db *gorm.DB) (Error error)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) RestorePhaseOne(dirPath string)
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) RestorePhaseTwo()
- func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) 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) CheckoutCountrySpec(countryspec *models.CountrySpec)
- func (backRepo *BackRepoStruct) CheckoutCountryWithBodies(countrywithbodies *models.CountryWithBodies)
- func (backRepo *BackRepoStruct) Commit(stage *models.StageStruct)
- func (backRepo *BackRepoStruct) CommitCountrySpec(countryspec *models.CountrySpec)
- func (backRepo *BackRepoStruct) CommitCountryWithBodies(countrywithbodies *models.CountryWithBodies)
- func (backRepo *BackRepoStruct) GetLastCommitNb() uint
- func (backRepo *BackRepoStruct) GetLastPushFromFrontNb() uint
- func (backRepo *BackRepoStruct) IncrementCommitNb() uint
- func (backRepo *BackRepoStruct) IncrementPushFromFrontNb() uint
- func (backRepo *BackRepoStruct) Restore(stage *models.StageStruct, dirPath string)
- func (backRepo *BackRepoStruct) RestoreXL(stage *models.StageStruct, dirPath string)
- type CountrySpecAPI
- type CountrySpecDB
- func (countryspecDB *CountrySpecDB) CopyBasicFieldsFromCountrySpec(countryspec *models.CountrySpec)
- func (countryspecDB *CountrySpecDB) CopyBasicFieldsFromCountrySpecWOP(countryspec *CountrySpecWOP)
- func (countryspecDB *CountrySpecDB) CopyBasicFieldsToCountrySpec(countryspec *models.CountrySpec)
- func (countryspecDB *CountrySpecDB) CopyBasicFieldsToCountrySpecWOP(countryspec *CountrySpecWOP)
- type CountrySpecDBResponse
- type CountrySpecDBs
- type CountrySpecPointersEnconding
- type CountrySpecWOP
- type CountryWithBodiesAPI
- type CountryWithBodiesDB
- func (countrywithbodiesDB *CountryWithBodiesDB) CopyBasicFieldsFromCountryWithBodies(countrywithbodies *models.CountryWithBodies)
- func (countrywithbodiesDB *CountryWithBodiesDB) CopyBasicFieldsFromCountryWithBodiesWOP(countrywithbodies *CountryWithBodiesWOP)
- func (countrywithbodiesDB *CountryWithBodiesDB) CopyBasicFieldsToCountryWithBodies(countrywithbodies *models.CountryWithBodies)
- func (countrywithbodiesDB *CountryWithBodiesDB) CopyBasicFieldsToCountryWithBodiesWOP(countrywithbodies *CountryWithBodiesWOP)
- type CountryWithBodiesDBResponse
- type CountryWithBodiesDBs
- type CountryWithBodiesPointersEnconding
- type CountryWithBodiesWOP
Constants ¶
This section is empty.
Variables ¶
var BackRepoCountrySpecid_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 BackRepoCountryWithBodiesid_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 CountrySpec_Fields = []string{
"ID",
"Name",
"NbBodies",
"Step",
}
var CountryWithBodies_Fields = []string{
"ID",
"Name",
"NCols",
"NRows",
"XllCorner",
"YllCorner",
"NbBodies",
"Step",
}
Functions ¶
func GetLastCommitNb ¶
func GetLastCommitNb() uint
func GetLastPushFromFrontNb ¶
func GetLastPushFromFrontNb() uint
Types ¶
type BackRepoCountrySpecStruct ¶
type BackRepoCountrySpecStruct struct { // stores CountrySpecDB according to their gorm ID Map_CountrySpecDBID_CountrySpecDB *map[uint]*CountrySpecDB // stores CountrySpecDB ID according to CountrySpec address Map_CountrySpecPtr_CountrySpecDBID *map[*models.CountrySpec]uint // stores CountrySpec according to their gorm ID Map_CountrySpecDBID_CountrySpecPtr *map[uint]*models.CountrySpec // contains filtered or unexported fields }
func (*BackRepoCountrySpecStruct) Backup ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) Backup(dirPath string)
Backup generates a json file from a slice of all CountrySpecDB instances in the backrepo
func (*BackRepoCountrySpecStruct) BackupXL ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all CountrySpecDB instances in the backrepo
func (*BackRepoCountrySpecStruct) CheckoutPhaseOne ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) CheckoutPhaseOne() (Error error)
BackRepoCountrySpec.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 pahse two)
func (*BackRepoCountrySpecStruct) CheckoutPhaseOneInstance ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) CheckoutPhaseOneInstance(countryspecDB *CountrySpecDB) (Error error)
CheckoutPhaseOneInstance takes a countryspecDB that has been found in the DB, updates the backRepo and stages the models version of the countryspecDB
func (*BackRepoCountrySpecStruct) CheckoutPhaseTwo ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoCountrySpec.CheckoutPhaseTwo Checkouts all staged instances of CountrySpec to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCountrySpecStruct) CheckoutPhaseTwoInstance ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, countryspecDB *CountrySpecDB) (Error error)
BackRepoCountrySpec.CheckoutPhaseTwoInstance Checkouts staged instances of CountrySpec to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCountrySpecStruct) CommitDeleteInstance ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoCountrySpec.CommitDeleteInstance commits deletion of CountrySpec to the BackRepo
func (*BackRepoCountrySpecStruct) CommitPhaseOne ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
BackRepoCountrySpec.CommitPhaseOne commits all staged instances of CountrySpec 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 (*BackRepoCountrySpecStruct) CommitPhaseOneInstance ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitPhaseOneInstance(countryspec *models.CountrySpec) (Error error)
BackRepoCountrySpec.CommitPhaseOneInstance commits countryspec staged instances of CountrySpec 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 (*BackRepoCountrySpecStruct) CommitPhaseTwo ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoCountrySpec.CommitPhaseTwo commits all staged instances of CountrySpec to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCountrySpecStruct) CommitPhaseTwoInstance ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, countryspec *models.CountrySpec) (Error error)
BackRepoCountrySpec.CommitPhaseTwoInstance commits {{structname }} of models.CountrySpec to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCountrySpecStruct) GetCountrySpecDBFromCountrySpecPtr ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) GetCountrySpecDBFromCountrySpecPtr(countryspec *models.CountrySpec) (countryspecDB *CountrySpecDB)
GetCountrySpecDBFromCountrySpecPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoCountrySpecStruct) GetDB ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) GetDB() *gorm.DB
func (*BackRepoCountrySpecStruct) Init ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) Init(db *gorm.DB) (Error error)
BackRepoCountrySpec.Init set up the BackRepo of the CountrySpec
func (*BackRepoCountrySpecStruct) RestorePhaseOne ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "CountrySpecDB.json" in dirPath that stores an array of CountrySpecDB and stores it in the database the map BackRepoCountrySpecid_atBckpTime_newID is updated accordingly
func (*BackRepoCountrySpecStruct) RestorePhaseTwo ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<CountrySpec>id_atBckpTime_newID to compute new index
func (*BackRepoCountrySpecStruct) RestoreXLPhaseOne ¶
func (backRepoCountrySpec *BackRepoCountrySpecStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "CountrySpec" sheet all CountrySpecDB instances
type BackRepoCountryWithBodiesStruct ¶
type BackRepoCountryWithBodiesStruct struct { // stores CountryWithBodiesDB according to their gorm ID Map_CountryWithBodiesDBID_CountryWithBodiesDB *map[uint]*CountryWithBodiesDB // stores CountryWithBodiesDB ID according to CountryWithBodies address Map_CountryWithBodiesPtr_CountryWithBodiesDBID *map[*models.CountryWithBodies]uint // stores CountryWithBodies according to their gorm ID Map_CountryWithBodiesDBID_CountryWithBodiesPtr *map[uint]*models.CountryWithBodies // contains filtered or unexported fields }
func (*BackRepoCountryWithBodiesStruct) Backup ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) Backup(dirPath string)
Backup generates a json file from a slice of all CountryWithBodiesDB instances in the backrepo
func (*BackRepoCountryWithBodiesStruct) BackupXL ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) BackupXL(file *xlsx.File)
Backup generates a json file from a slice of all CountryWithBodiesDB instances in the backrepo
func (*BackRepoCountryWithBodiesStruct) CheckoutPhaseOne ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CheckoutPhaseOne() (Error error)
BackRepoCountryWithBodies.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 pahse two)
func (*BackRepoCountryWithBodiesStruct) CheckoutPhaseOneInstance ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CheckoutPhaseOneInstance(countrywithbodiesDB *CountryWithBodiesDB) (Error error)
CheckoutPhaseOneInstance takes a countrywithbodiesDB that has been found in the DB, updates the backRepo and stages the models version of the countrywithbodiesDB
func (*BackRepoCountryWithBodiesStruct) CheckoutPhaseTwo ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoCountryWithBodies.CheckoutPhaseTwo Checkouts all staged instances of CountryWithBodies to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCountryWithBodiesStruct) CheckoutPhaseTwoInstance ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, countrywithbodiesDB *CountryWithBodiesDB) (Error error)
BackRepoCountryWithBodies.CheckoutPhaseTwoInstance Checkouts staged instances of CountryWithBodies to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCountryWithBodiesStruct) CommitDeleteInstance ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitDeleteInstance(id uint) (Error error)
BackRepoCountryWithBodies.CommitDeleteInstance commits deletion of CountryWithBodies to the BackRepo
func (*BackRepoCountryWithBodiesStruct) CommitPhaseOne ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)
BackRepoCountryWithBodies.CommitPhaseOne commits all staged instances of CountryWithBodies 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 (*BackRepoCountryWithBodiesStruct) CommitPhaseOneInstance ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitPhaseOneInstance(countrywithbodies *models.CountryWithBodies) (Error error)
BackRepoCountryWithBodies.CommitPhaseOneInstance commits countrywithbodies staged instances of CountryWithBodies 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 (*BackRepoCountryWithBodiesStruct) CommitPhaseTwo ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)
BackRepoCountryWithBodies.CommitPhaseTwo commits all staged instances of CountryWithBodies to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCountryWithBodiesStruct) CommitPhaseTwoInstance ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, countrywithbodies *models.CountryWithBodies) (Error error)
BackRepoCountryWithBodies.CommitPhaseTwoInstance commits {{structname }} of models.CountryWithBodies to the BackRepo Phase Two is the update of instance with the field in the database
func (*BackRepoCountryWithBodiesStruct) GetCountryWithBodiesDBFromCountryWithBodiesPtr ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) GetCountryWithBodiesDBFromCountryWithBodiesPtr(countrywithbodies *models.CountryWithBodies) (countrywithbodiesDB *CountryWithBodiesDB)
GetCountryWithBodiesDBFromCountryWithBodiesPtr is a handy function to access the back repo instance from the stage instance
func (*BackRepoCountryWithBodiesStruct) GetDB ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) GetDB() *gorm.DB
func (*BackRepoCountryWithBodiesStruct) Init ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) Init(db *gorm.DB) (Error error)
BackRepoCountryWithBodies.Init set up the BackRepo of the CountryWithBodies
func (*BackRepoCountryWithBodiesStruct) RestorePhaseOne ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) RestorePhaseOne(dirPath string)
RestorePhaseOne read the file "CountryWithBodiesDB.json" in dirPath that stores an array of CountryWithBodiesDB and stores it in the database the map BackRepoCountryWithBodiesid_atBckpTime_newID is updated accordingly
func (*BackRepoCountryWithBodiesStruct) RestorePhaseTwo ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) RestorePhaseTwo()
RestorePhaseTwo uses all map BackRepo<CountryWithBodies>id_atBckpTime_newID to compute new index
func (*BackRepoCountryWithBodiesStruct) RestoreXLPhaseOne ¶
func (backRepoCountryWithBodies *BackRepoCountryWithBodiesStruct) RestoreXLPhaseOne(file *xlsx.File)
RestoreXL from the "CountryWithBodies" sheet all CountryWithBodiesDB instances
type BackRepoStruct ¶
type BackRepoStruct struct { // insertion point for per struct back repo declarations BackRepoCountrySpec BackRepoCountrySpecStruct BackRepoCountryWithBodies BackRepoCountryWithBodiesStruct CommitNb uint // this ng is updated at the BackRepo level but also at the BackRepo<GongStruct> level PushFromFrontNb uint // records increments from push from front }
BackRepoStruct supports callback functions
var 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) CheckoutCountrySpec ¶
func (backRepo *BackRepoStruct) CheckoutCountrySpec(countryspec *models.CountrySpec)
CommitCountrySpec allows checkout of a single countryspec (if already staged and with a BackRepo id)
func (*BackRepoStruct) CheckoutCountryWithBodies ¶
func (backRepo *BackRepoStruct) CheckoutCountryWithBodies(countrywithbodies *models.CountryWithBodies)
CommitCountryWithBodies allows checkout of a single countrywithbodies (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) CommitCountrySpec ¶
func (backRepo *BackRepoStruct) CommitCountrySpec(countryspec *models.CountrySpec)
CommitCountrySpec allows commit of a single countryspec (if already staged)
func (*BackRepoStruct) CommitCountryWithBodies ¶
func (backRepo *BackRepoStruct) CommitCountryWithBodies(countrywithbodies *models.CountryWithBodies)
CommitCountryWithBodies allows commit of a single countrywithbodies (if already staged)
func (*BackRepoStruct) GetLastCommitNb ¶
func (backRepo *BackRepoStruct) GetLastCommitNb() uint
func (*BackRepoStruct) GetLastPushFromFrontNb ¶
func (backRepo *BackRepoStruct) GetLastPushFromFrontNb() uint
func (*BackRepoStruct) IncrementCommitNb ¶
func (backRepo *BackRepoStruct) IncrementCommitNb() 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
type CountrySpecAPI ¶
type CountrySpecAPI struct { gorm.Model models.CountrySpec // encoding of pointers CountrySpecPointersEnconding }
CountrySpecAPI 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 countryspecAPI
type CountrySpecDB ¶
type CountrySpecDB struct { gorm.Model // Declation for basic field countryspecDB.Name {{BasicKind}} (to be completed) Name_Data sql.NullString // Declation for basic field countryspecDB.NbBodies {{BasicKind}} (to be completed) NbBodies_Data sql.NullInt64 // Declation for basic field countryspecDB.Step {{BasicKind}} (to be completed) Step_Data sql.NullInt64 // encoding of pointers CountrySpecPointersEnconding }
CountrySpecDB describes a countryspec 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 countryspecDB
func (*CountrySpecDB) CopyBasicFieldsFromCountrySpec ¶
func (countryspecDB *CountrySpecDB) CopyBasicFieldsFromCountrySpec(countryspec *models.CountrySpec)
CopyBasicFieldsFromCountrySpec
func (*CountrySpecDB) CopyBasicFieldsFromCountrySpecWOP ¶
func (countryspecDB *CountrySpecDB) CopyBasicFieldsFromCountrySpecWOP(countryspec *CountrySpecWOP)
CopyBasicFieldsFromCountrySpecWOP
func (*CountrySpecDB) CopyBasicFieldsToCountrySpec ¶
func (countryspecDB *CountrySpecDB) CopyBasicFieldsToCountrySpec(countryspec *models.CountrySpec)
CopyBasicFieldsToCountrySpec
func (*CountrySpecDB) CopyBasicFieldsToCountrySpecWOP ¶
func (countryspecDB *CountrySpecDB) CopyBasicFieldsToCountrySpecWOP(countryspec *CountrySpecWOP)
CopyBasicFieldsToCountrySpecWOP
type CountrySpecDBResponse ¶
type CountrySpecDBResponse struct {
CountrySpecDB
}
CountrySpecDBResponse provides response swagger:response countryspecDBResponse
type CountrySpecDBs ¶
type CountrySpecDBs []CountrySpecDB
CountrySpecDBs arrays countryspecDBs swagger:response countryspecDBsResponse
type CountrySpecPointersEnconding ¶
type CountrySpecPointersEnconding struct { }
CountrySpecPointersEnconding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type CountrySpecWOP ¶
type CountrySpecWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` NbBodies int `xlsx:"2"` Step int `xlsx:"3"` }
CountrySpecWOP is a CountrySpec without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint
type CountryWithBodiesAPI ¶
type CountryWithBodiesAPI struct { gorm.Model models.CountryWithBodies // encoding of pointers CountryWithBodiesPointersEnconding }
CountryWithBodiesAPI 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 countrywithbodiesAPI
type CountryWithBodiesDB ¶
type CountryWithBodiesDB struct { gorm.Model // Declation for basic field countrywithbodiesDB.Name {{BasicKind}} (to be completed) Name_Data sql.NullString // Declation for basic field countrywithbodiesDB.NCols {{BasicKind}} (to be completed) NCols_Data sql.NullInt64 // Declation for basic field countrywithbodiesDB.NRows {{BasicKind}} (to be completed) NRows_Data sql.NullInt64 // Declation for basic field countrywithbodiesDB.XllCorner {{BasicKind}} (to be completed) XllCorner_Data sql.NullFloat64 // Declation for basic field countrywithbodiesDB.YllCorner {{BasicKind}} (to be completed) YllCorner_Data sql.NullFloat64 // Declation for basic field countrywithbodiesDB.NbBodies {{BasicKind}} (to be completed) NbBodies_Data sql.NullInt64 // Declation for basic field countrywithbodiesDB.Step {{BasicKind}} (to be completed) Step_Data sql.NullInt64 // encoding of pointers CountryWithBodiesPointersEnconding }
CountryWithBodiesDB describes a countrywithbodies 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 countrywithbodiesDB
func (*CountryWithBodiesDB) CopyBasicFieldsFromCountryWithBodies ¶
func (countrywithbodiesDB *CountryWithBodiesDB) CopyBasicFieldsFromCountryWithBodies(countrywithbodies *models.CountryWithBodies)
CopyBasicFieldsFromCountryWithBodies
func (*CountryWithBodiesDB) CopyBasicFieldsFromCountryWithBodiesWOP ¶
func (countrywithbodiesDB *CountryWithBodiesDB) CopyBasicFieldsFromCountryWithBodiesWOP(countrywithbodies *CountryWithBodiesWOP)
CopyBasicFieldsFromCountryWithBodiesWOP
func (*CountryWithBodiesDB) CopyBasicFieldsToCountryWithBodies ¶
func (countrywithbodiesDB *CountryWithBodiesDB) CopyBasicFieldsToCountryWithBodies(countrywithbodies *models.CountryWithBodies)
CopyBasicFieldsToCountryWithBodies
func (*CountryWithBodiesDB) CopyBasicFieldsToCountryWithBodiesWOP ¶
func (countrywithbodiesDB *CountryWithBodiesDB) CopyBasicFieldsToCountryWithBodiesWOP(countrywithbodies *CountryWithBodiesWOP)
CopyBasicFieldsToCountryWithBodiesWOP
type CountryWithBodiesDBResponse ¶
type CountryWithBodiesDBResponse struct {
CountryWithBodiesDB
}
CountryWithBodiesDBResponse provides response swagger:response countrywithbodiesDBResponse
type CountryWithBodiesDBs ¶
type CountryWithBodiesDBs []CountryWithBodiesDB
CountryWithBodiesDBs arrays countrywithbodiesDBs swagger:response countrywithbodiesDBsResponse
type CountryWithBodiesPointersEnconding ¶
type CountryWithBodiesPointersEnconding struct { }
CountryWithBodiesPointersEnconding encodes pointers to Struct and reverse pointers of slice of poitners to Struct
type CountryWithBodiesWOP ¶
type CountryWithBodiesWOP struct { ID int `xlsx:"0"` Name string `xlsx:"1"` NCols int `xlsx:"2"` NRows int `xlsx:"3"` XllCorner float64 `xlsx:"4"` YllCorner float64 `xlsx:"5"` NbBodies int `xlsx:"6"` Step int `xlsx:"7"` }
CountryWithBodiesWOP is a CountryWithBodies without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint