orm

package
v0.0.0-...-fb6039f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2022 License: MIT Imports: 17 Imported by: 0

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

generated by genORMTranslation.go

generated from OrmFileSetupTemplate

Index

Constants

This section is empty.

Variables

View Source
var AnotherDummyData_Fields = []string{

	"ID",
	"Name",
}
View Source
var BackRepoAnotherDummyDataid_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

View Source
var BackRepoCellid_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

View Source
var BackRepoDummyDataid_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

View Source
var BackRepoElementid_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

View Source
var BackRepoMarkdownContentid_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

View Source
var BackRepoRowid_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

View Source
var Cell_Fields = []string{

	"ID",
	"Name",
}
View Source
var DummyData_Fields = []string{

	"ID",
	"Name",
	"DummyString",
	"DummyInt",
	"DummyFloat",
	"DummyBool",
	"DummyEnumString",
	"DummyEnumInt",
	"DummyTime",
	"DummyDuration",
}
View Source
var Element_Fields = []string{

	"ID",
	"Name",
	"Content",
	"Type",
}
View Source
var MarkdownContent_Fields = []string{

	"ID",
	"Name",
	"Content",
}
View Source
var Row_Fields = []string{

	"ID",
	"Name",
}

Functions

func AutoMigrate

func AutoMigrate(db *gorm.DB)

AutoMigrate migrates db with with orm Struct

func GetLastCommitFromBackNb

func GetLastCommitFromBackNb() uint

func GetLastPushFromFrontNb

func GetLastPushFromFrontNb() uint

func ResetDB

func ResetDB(db *gorm.DB)

func SetupModels

func SetupModels(logMode bool, filepath string) *gorm.DB

SetupModels connects to the sqlite database

Types

type AnotherDummyDataAPI

type AnotherDummyDataAPI struct {
	gorm.Model

	models.AnotherDummyData

	// encoding of pointers
	AnotherDummyDataPointersEnconding
}

AnotherDummyDataAPI 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 anotherdummydataAPI

type AnotherDummyDataDB

type AnotherDummyDataDB struct {
	gorm.Model

	// Declation for basic field anotherdummydataDB.Name
	Name_Data sql.NullString
	// encoding of pointers
	AnotherDummyDataPointersEnconding
}

AnotherDummyDataDB describes a anotherdummydata 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 anotherdummydataDB

func (*AnotherDummyDataDB) CopyBasicFieldsFromAnotherDummyData

func (anotherdummydataDB *AnotherDummyDataDB) CopyBasicFieldsFromAnotherDummyData(anotherdummydata *models.AnotherDummyData)

CopyBasicFieldsFromAnotherDummyData

func (*AnotherDummyDataDB) CopyBasicFieldsFromAnotherDummyDataWOP

func (anotherdummydataDB *AnotherDummyDataDB) CopyBasicFieldsFromAnotherDummyDataWOP(anotherdummydata *AnotherDummyDataWOP)

CopyBasicFieldsFromAnotherDummyDataWOP

func (*AnotherDummyDataDB) CopyBasicFieldsToAnotherDummyData

func (anotherdummydataDB *AnotherDummyDataDB) CopyBasicFieldsToAnotherDummyData(anotherdummydata *models.AnotherDummyData)

CopyBasicFieldsToAnotherDummyData

func (*AnotherDummyDataDB) CopyBasicFieldsToAnotherDummyDataWOP

func (anotherdummydataDB *AnotherDummyDataDB) CopyBasicFieldsToAnotherDummyDataWOP(anotherdummydata *AnotherDummyDataWOP)

CopyBasicFieldsToAnotherDummyDataWOP

type AnotherDummyDataDBResponse

type AnotherDummyDataDBResponse struct {
	AnotherDummyDataDB
}

AnotherDummyDataDBResponse provides response swagger:response anotherdummydataDBResponse

type AnotherDummyDataDBs

type AnotherDummyDataDBs []AnotherDummyDataDB

AnotherDummyDataDBs arrays anotherdummydataDBs swagger:response anotherdummydataDBsResponse

type AnotherDummyDataPointersEnconding

type AnotherDummyDataPointersEnconding struct {
}

AnotherDummyDataPointersEnconding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type AnotherDummyDataWOP

type AnotherDummyDataWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`
}

AnotherDummyDataWOP is a AnotherDummyData without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type BackRepoAnotherDummyDataStruct

type BackRepoAnotherDummyDataStruct struct {
	// stores AnotherDummyDataDB according to their gorm ID
	Map_AnotherDummyDataDBID_AnotherDummyDataDB *map[uint]*AnotherDummyDataDB

	// stores AnotherDummyDataDB ID according to AnotherDummyData address
	Map_AnotherDummyDataPtr_AnotherDummyDataDBID *map[*models.AnotherDummyData]uint

	// stores AnotherDummyData according to their gorm ID
	Map_AnotherDummyDataDBID_AnotherDummyDataPtr *map[uint]*models.AnotherDummyData
	// contains filtered or unexported fields
}

func (*BackRepoAnotherDummyDataStruct) Backup

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) Backup(dirPath string)

Backup generates a json file from a slice of all AnotherDummyDataDB instances in the backrepo

func (*BackRepoAnotherDummyDataStruct) BackupXL

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all AnotherDummyDataDB instances in the backrepo

func (*BackRepoAnotherDummyDataStruct) CheckoutPhaseOne

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) CheckoutPhaseOne() (Error error)

BackRepoAnotherDummyData.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 (*BackRepoAnotherDummyDataStruct) CheckoutPhaseOneInstance

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) CheckoutPhaseOneInstance(anotherdummydataDB *AnotherDummyDataDB) (Error error)

CheckoutPhaseOneInstance takes a anotherdummydataDB that has been found in the DB, updates the backRepo and stages the models version of the anotherdummydataDB

func (*BackRepoAnotherDummyDataStruct) CheckoutPhaseTwo

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoAnotherDummyData.CheckoutPhaseTwo Checkouts all staged instances of AnotherDummyData to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAnotherDummyDataStruct) CheckoutPhaseTwoInstance

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, anotherdummydataDB *AnotherDummyDataDB) (Error error)

BackRepoAnotherDummyData.CheckoutPhaseTwoInstance Checkouts staged instances of AnotherDummyData to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAnotherDummyDataStruct) CommitDeleteInstance

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoAnotherDummyData.CommitDeleteInstance commits deletion of AnotherDummyData to the BackRepo

func (*BackRepoAnotherDummyDataStruct) CommitPhaseOne

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoAnotherDummyData.CommitPhaseOne commits all staged instances of AnotherDummyData 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 (*BackRepoAnotherDummyDataStruct) CommitPhaseOneInstance

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) CommitPhaseOneInstance(anotherdummydata *models.AnotherDummyData) (Error error)

BackRepoAnotherDummyData.CommitPhaseOneInstance commits anotherdummydata staged instances of AnotherDummyData 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 (*BackRepoAnotherDummyDataStruct) CommitPhaseTwo

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoAnotherDummyData.CommitPhaseTwo commits all staged instances of AnotherDummyData to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAnotherDummyDataStruct) CommitPhaseTwoInstance

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, anotherdummydata *models.AnotherDummyData) (Error error)

BackRepoAnotherDummyData.CommitPhaseTwoInstance commits {{structname }} of models.AnotherDummyData to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAnotherDummyDataStruct) GetAnotherDummyDataDBFromAnotherDummyDataPtr

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) GetAnotherDummyDataDBFromAnotherDummyDataPtr(anotherdummydata *models.AnotherDummyData) (anotherdummydataDB *AnotherDummyDataDB)

GetAnotherDummyDataDBFromAnotherDummyDataPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoAnotherDummyDataStruct) GetDB

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) GetDB() *gorm.DB

func (*BackRepoAnotherDummyDataStruct) Init

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) Init(db *gorm.DB) (Error error)

BackRepoAnotherDummyData.Init set up the BackRepo of the AnotherDummyData

func (*BackRepoAnotherDummyDataStruct) RestorePhaseOne

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "AnotherDummyDataDB.json" in dirPath that stores an array of AnotherDummyDataDB and stores it in the database the map BackRepoAnotherDummyDataid_atBckpTime_newID is updated accordingly

func (*BackRepoAnotherDummyDataStruct) RestorePhaseTwo

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<AnotherDummyData>id_atBckpTime_newID to compute new index

func (*BackRepoAnotherDummyDataStruct) RestoreXLPhaseOne

func (backRepoAnotherDummyData *BackRepoAnotherDummyDataStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "AnotherDummyData" sheet all AnotherDummyDataDB instances

type BackRepoCellStruct

type BackRepoCellStruct struct {
	// stores CellDB according to their gorm ID
	Map_CellDBID_CellDB *map[uint]*CellDB

	// stores CellDB ID according to Cell address
	Map_CellPtr_CellDBID *map[*models.Cell]uint

	// stores Cell according to their gorm ID
	Map_CellDBID_CellPtr *map[uint]*models.Cell
	// contains filtered or unexported fields
}

func (*BackRepoCellStruct) Backup

func (backRepoCell *BackRepoCellStruct) Backup(dirPath string)

Backup generates a json file from a slice of all CellDB instances in the backrepo

func (*BackRepoCellStruct) BackupXL

func (backRepoCell *BackRepoCellStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all CellDB instances in the backrepo

func (*BackRepoCellStruct) CheckoutPhaseOne

func (backRepoCell *BackRepoCellStruct) CheckoutPhaseOne() (Error error)

BackRepoCell.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 (*BackRepoCellStruct) CheckoutPhaseOneInstance

func (backRepoCell *BackRepoCellStruct) CheckoutPhaseOneInstance(cellDB *CellDB) (Error error)

CheckoutPhaseOneInstance takes a cellDB that has been found in the DB, updates the backRepo and stages the models version of the cellDB

func (*BackRepoCellStruct) CheckoutPhaseTwo

func (backRepoCell *BackRepoCellStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoCell.CheckoutPhaseTwo Checkouts all staged instances of Cell to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoCellStruct) CheckoutPhaseTwoInstance

func (backRepoCell *BackRepoCellStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, cellDB *CellDB) (Error error)

BackRepoCell.CheckoutPhaseTwoInstance Checkouts staged instances of Cell to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoCellStruct) CommitDeleteInstance

func (backRepoCell *BackRepoCellStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoCell.CommitDeleteInstance commits deletion of Cell to the BackRepo

func (*BackRepoCellStruct) CommitPhaseOne

func (backRepoCell *BackRepoCellStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoCell.CommitPhaseOne commits all staged instances of Cell 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 (*BackRepoCellStruct) CommitPhaseOneInstance

func (backRepoCell *BackRepoCellStruct) CommitPhaseOneInstance(cell *models.Cell) (Error error)

BackRepoCell.CommitPhaseOneInstance commits cell staged instances of Cell 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 (*BackRepoCellStruct) CommitPhaseTwo

func (backRepoCell *BackRepoCellStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoCell.CommitPhaseTwo commits all staged instances of Cell to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoCellStruct) CommitPhaseTwoInstance

func (backRepoCell *BackRepoCellStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, cell *models.Cell) (Error error)

BackRepoCell.CommitPhaseTwoInstance commits {{structname }} of models.Cell to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoCellStruct) GetCellDBFromCellPtr

func (backRepoCell *BackRepoCellStruct) GetCellDBFromCellPtr(cell *models.Cell) (cellDB *CellDB)

GetCellDBFromCellPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoCellStruct) GetDB

func (backRepoCell *BackRepoCellStruct) GetDB() *gorm.DB

func (*BackRepoCellStruct) Init

func (backRepoCell *BackRepoCellStruct) Init(db *gorm.DB) (Error error)

BackRepoCell.Init set up the BackRepo of the Cell

func (*BackRepoCellStruct) RestorePhaseOne

func (backRepoCell *BackRepoCellStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "CellDB.json" in dirPath that stores an array of CellDB and stores it in the database the map BackRepoCellid_atBckpTime_newID is updated accordingly

func (*BackRepoCellStruct) RestorePhaseTwo

func (backRepoCell *BackRepoCellStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<Cell>id_atBckpTime_newID to compute new index

func (*BackRepoCellStruct) RestoreXLPhaseOne

func (backRepoCell *BackRepoCellStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Cell" sheet all CellDB instances

type BackRepoDummyDataStruct

type BackRepoDummyDataStruct struct {
	// stores DummyDataDB according to their gorm ID
	Map_DummyDataDBID_DummyDataDB *map[uint]*DummyDataDB

	// stores DummyDataDB ID according to DummyData address
	Map_DummyDataPtr_DummyDataDBID *map[*models.DummyData]uint

	// stores DummyData according to their gorm ID
	Map_DummyDataDBID_DummyDataPtr *map[uint]*models.DummyData
	// contains filtered or unexported fields
}

func (*BackRepoDummyDataStruct) Backup

func (backRepoDummyData *BackRepoDummyDataStruct) Backup(dirPath string)

Backup generates a json file from a slice of all DummyDataDB instances in the backrepo

func (*BackRepoDummyDataStruct) BackupXL

func (backRepoDummyData *BackRepoDummyDataStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all DummyDataDB instances in the backrepo

func (*BackRepoDummyDataStruct) CheckoutPhaseOne

func (backRepoDummyData *BackRepoDummyDataStruct) CheckoutPhaseOne() (Error error)

BackRepoDummyData.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 (*BackRepoDummyDataStruct) CheckoutPhaseOneInstance

func (backRepoDummyData *BackRepoDummyDataStruct) CheckoutPhaseOneInstance(dummydataDB *DummyDataDB) (Error error)

CheckoutPhaseOneInstance takes a dummydataDB that has been found in the DB, updates the backRepo and stages the models version of the dummydataDB

func (*BackRepoDummyDataStruct) CheckoutPhaseTwo

func (backRepoDummyData *BackRepoDummyDataStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoDummyData.CheckoutPhaseTwo Checkouts all staged instances of DummyData to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDummyDataStruct) CheckoutPhaseTwoInstance

func (backRepoDummyData *BackRepoDummyDataStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, dummydataDB *DummyDataDB) (Error error)

BackRepoDummyData.CheckoutPhaseTwoInstance Checkouts staged instances of DummyData to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDummyDataStruct) CommitDeleteInstance

func (backRepoDummyData *BackRepoDummyDataStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoDummyData.CommitDeleteInstance commits deletion of DummyData to the BackRepo

func (*BackRepoDummyDataStruct) CommitPhaseOne

func (backRepoDummyData *BackRepoDummyDataStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoDummyData.CommitPhaseOne commits all staged instances of DummyData 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 (*BackRepoDummyDataStruct) CommitPhaseOneInstance

func (backRepoDummyData *BackRepoDummyDataStruct) CommitPhaseOneInstance(dummydata *models.DummyData) (Error error)

BackRepoDummyData.CommitPhaseOneInstance commits dummydata staged instances of DummyData 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 (*BackRepoDummyDataStruct) CommitPhaseTwo

func (backRepoDummyData *BackRepoDummyDataStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoDummyData.CommitPhaseTwo commits all staged instances of DummyData to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDummyDataStruct) CommitPhaseTwoInstance

func (backRepoDummyData *BackRepoDummyDataStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, dummydata *models.DummyData) (Error error)

BackRepoDummyData.CommitPhaseTwoInstance commits {{structname }} of models.DummyData to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDummyDataStruct) GetDB

func (backRepoDummyData *BackRepoDummyDataStruct) GetDB() *gorm.DB

func (*BackRepoDummyDataStruct) GetDummyDataDBFromDummyDataPtr

func (backRepoDummyData *BackRepoDummyDataStruct) GetDummyDataDBFromDummyDataPtr(dummydata *models.DummyData) (dummydataDB *DummyDataDB)

GetDummyDataDBFromDummyDataPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoDummyDataStruct) Init

func (backRepoDummyData *BackRepoDummyDataStruct) Init(db *gorm.DB) (Error error)

BackRepoDummyData.Init set up the BackRepo of the DummyData

func (*BackRepoDummyDataStruct) RestorePhaseOne

func (backRepoDummyData *BackRepoDummyDataStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "DummyDataDB.json" in dirPath that stores an array of DummyDataDB and stores it in the database the map BackRepoDummyDataid_atBckpTime_newID is updated accordingly

func (*BackRepoDummyDataStruct) RestorePhaseTwo

func (backRepoDummyData *BackRepoDummyDataStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<DummyData>id_atBckpTime_newID to compute new index

func (*BackRepoDummyDataStruct) RestoreXLPhaseOne

func (backRepoDummyData *BackRepoDummyDataStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "DummyData" sheet all DummyDataDB instances

type BackRepoElementStruct

type BackRepoElementStruct struct {
	// stores ElementDB according to their gorm ID
	Map_ElementDBID_ElementDB *map[uint]*ElementDB

	// stores ElementDB ID according to Element address
	Map_ElementPtr_ElementDBID *map[*models.Element]uint

	// stores Element according to their gorm ID
	Map_ElementDBID_ElementPtr *map[uint]*models.Element
	// contains filtered or unexported fields
}

func (*BackRepoElementStruct) Backup

func (backRepoElement *BackRepoElementStruct) Backup(dirPath string)

Backup generates a json file from a slice of all ElementDB instances in the backrepo

func (*BackRepoElementStruct) BackupXL

func (backRepoElement *BackRepoElementStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all ElementDB instances in the backrepo

func (*BackRepoElementStruct) CheckoutPhaseOne

func (backRepoElement *BackRepoElementStruct) CheckoutPhaseOne() (Error error)

BackRepoElement.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 (*BackRepoElementStruct) CheckoutPhaseOneInstance

func (backRepoElement *BackRepoElementStruct) CheckoutPhaseOneInstance(elementDB *ElementDB) (Error error)

CheckoutPhaseOneInstance takes a elementDB that has been found in the DB, updates the backRepo and stages the models version of the elementDB

func (*BackRepoElementStruct) CheckoutPhaseTwo

func (backRepoElement *BackRepoElementStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoElement.CheckoutPhaseTwo Checkouts all staged instances of Element to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoElementStruct) CheckoutPhaseTwoInstance

func (backRepoElement *BackRepoElementStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, elementDB *ElementDB) (Error error)

BackRepoElement.CheckoutPhaseTwoInstance Checkouts staged instances of Element to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoElementStruct) CommitDeleteInstance

func (backRepoElement *BackRepoElementStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoElement.CommitDeleteInstance commits deletion of Element to the BackRepo

func (*BackRepoElementStruct) CommitPhaseOne

func (backRepoElement *BackRepoElementStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoElement.CommitPhaseOne commits all staged instances of Element 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 (*BackRepoElementStruct) CommitPhaseOneInstance

func (backRepoElement *BackRepoElementStruct) CommitPhaseOneInstance(element *models.Element) (Error error)

BackRepoElement.CommitPhaseOneInstance commits element staged instances of Element 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 (*BackRepoElementStruct) CommitPhaseTwo

func (backRepoElement *BackRepoElementStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoElement.CommitPhaseTwo commits all staged instances of Element to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoElementStruct) CommitPhaseTwoInstance

func (backRepoElement *BackRepoElementStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, element *models.Element) (Error error)

BackRepoElement.CommitPhaseTwoInstance commits {{structname }} of models.Element to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoElementStruct) GetDB

func (backRepoElement *BackRepoElementStruct) GetDB() *gorm.DB

func (*BackRepoElementStruct) GetElementDBFromElementPtr

func (backRepoElement *BackRepoElementStruct) GetElementDBFromElementPtr(element *models.Element) (elementDB *ElementDB)

GetElementDBFromElementPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoElementStruct) Init

func (backRepoElement *BackRepoElementStruct) Init(db *gorm.DB) (Error error)

BackRepoElement.Init set up the BackRepo of the Element

func (*BackRepoElementStruct) RestorePhaseOne

func (backRepoElement *BackRepoElementStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "ElementDB.json" in dirPath that stores an array of ElementDB and stores it in the database the map BackRepoElementid_atBckpTime_newID is updated accordingly

func (*BackRepoElementStruct) RestorePhaseTwo

func (backRepoElement *BackRepoElementStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<Element>id_atBckpTime_newID to compute new index

func (*BackRepoElementStruct) RestoreXLPhaseOne

func (backRepoElement *BackRepoElementStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Element" sheet all ElementDB instances

type BackRepoMarkdownContentStruct

type BackRepoMarkdownContentStruct struct {
	// stores MarkdownContentDB according to their gorm ID
	Map_MarkdownContentDBID_MarkdownContentDB *map[uint]*MarkdownContentDB

	// stores MarkdownContentDB ID according to MarkdownContent address
	Map_MarkdownContentPtr_MarkdownContentDBID *map[*models.MarkdownContent]uint

	// stores MarkdownContent according to their gorm ID
	Map_MarkdownContentDBID_MarkdownContentPtr *map[uint]*models.MarkdownContent
	// contains filtered or unexported fields
}

func (*BackRepoMarkdownContentStruct) Backup

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) Backup(dirPath string)

Backup generates a json file from a slice of all MarkdownContentDB instances in the backrepo

func (*BackRepoMarkdownContentStruct) BackupXL

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all MarkdownContentDB instances in the backrepo

func (*BackRepoMarkdownContentStruct) CheckoutPhaseOne

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) CheckoutPhaseOne() (Error error)

BackRepoMarkdownContent.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 (*BackRepoMarkdownContentStruct) CheckoutPhaseOneInstance

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) CheckoutPhaseOneInstance(markdowncontentDB *MarkdownContentDB) (Error error)

CheckoutPhaseOneInstance takes a markdowncontentDB that has been found in the DB, updates the backRepo and stages the models version of the markdowncontentDB

func (*BackRepoMarkdownContentStruct) CheckoutPhaseTwo

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoMarkdownContent.CheckoutPhaseTwo Checkouts all staged instances of MarkdownContent to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoMarkdownContentStruct) CheckoutPhaseTwoInstance

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, markdowncontentDB *MarkdownContentDB) (Error error)

BackRepoMarkdownContent.CheckoutPhaseTwoInstance Checkouts staged instances of MarkdownContent to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoMarkdownContentStruct) CommitDeleteInstance

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoMarkdownContent.CommitDeleteInstance commits deletion of MarkdownContent to the BackRepo

func (*BackRepoMarkdownContentStruct) CommitPhaseOne

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoMarkdownContent.CommitPhaseOne commits all staged instances of MarkdownContent 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 (*BackRepoMarkdownContentStruct) CommitPhaseOneInstance

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) CommitPhaseOneInstance(markdowncontent *models.MarkdownContent) (Error error)

BackRepoMarkdownContent.CommitPhaseOneInstance commits markdowncontent staged instances of MarkdownContent 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 (*BackRepoMarkdownContentStruct) CommitPhaseTwo

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoMarkdownContent.CommitPhaseTwo commits all staged instances of MarkdownContent to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoMarkdownContentStruct) CommitPhaseTwoInstance

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, markdowncontent *models.MarkdownContent) (Error error)

BackRepoMarkdownContent.CommitPhaseTwoInstance commits {{structname }} of models.MarkdownContent to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoMarkdownContentStruct) GetDB

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) GetDB() *gorm.DB

func (*BackRepoMarkdownContentStruct) GetMarkdownContentDBFromMarkdownContentPtr

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) GetMarkdownContentDBFromMarkdownContentPtr(markdowncontent *models.MarkdownContent) (markdowncontentDB *MarkdownContentDB)

GetMarkdownContentDBFromMarkdownContentPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoMarkdownContentStruct) Init

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) Init(db *gorm.DB) (Error error)

BackRepoMarkdownContent.Init set up the BackRepo of the MarkdownContent

func (*BackRepoMarkdownContentStruct) RestorePhaseOne

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "MarkdownContentDB.json" in dirPath that stores an array of MarkdownContentDB and stores it in the database the map BackRepoMarkdownContentid_atBckpTime_newID is updated accordingly

func (*BackRepoMarkdownContentStruct) RestorePhaseTwo

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<MarkdownContent>id_atBckpTime_newID to compute new index

func (*BackRepoMarkdownContentStruct) RestoreXLPhaseOne

func (backRepoMarkdownContent *BackRepoMarkdownContentStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "MarkdownContent" sheet all MarkdownContentDB instances

type BackRepoRowStruct

type BackRepoRowStruct struct {
	// stores RowDB according to their gorm ID
	Map_RowDBID_RowDB *map[uint]*RowDB

	// stores RowDB ID according to Row address
	Map_RowPtr_RowDBID *map[*models.Row]uint

	// stores Row according to their gorm ID
	Map_RowDBID_RowPtr *map[uint]*models.Row
	// contains filtered or unexported fields
}

func (*BackRepoRowStruct) Backup

func (backRepoRow *BackRepoRowStruct) Backup(dirPath string)

Backup generates a json file from a slice of all RowDB instances in the backrepo

func (*BackRepoRowStruct) BackupXL

func (backRepoRow *BackRepoRowStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all RowDB instances in the backrepo

func (*BackRepoRowStruct) CheckoutPhaseOne

func (backRepoRow *BackRepoRowStruct) CheckoutPhaseOne() (Error error)

BackRepoRow.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 (*BackRepoRowStruct) CheckoutPhaseOneInstance

func (backRepoRow *BackRepoRowStruct) CheckoutPhaseOneInstance(rowDB *RowDB) (Error error)

CheckoutPhaseOneInstance takes a rowDB that has been found in the DB, updates the backRepo and stages the models version of the rowDB

func (*BackRepoRowStruct) CheckoutPhaseTwo

func (backRepoRow *BackRepoRowStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoRow.CheckoutPhaseTwo Checkouts all staged instances of Row to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoRowStruct) CheckoutPhaseTwoInstance

func (backRepoRow *BackRepoRowStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, rowDB *RowDB) (Error error)

BackRepoRow.CheckoutPhaseTwoInstance Checkouts staged instances of Row to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoRowStruct) CommitDeleteInstance

func (backRepoRow *BackRepoRowStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoRow.CommitDeleteInstance commits deletion of Row to the BackRepo

func (*BackRepoRowStruct) CommitPhaseOne

func (backRepoRow *BackRepoRowStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoRow.CommitPhaseOne commits all staged instances of Row 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 (*BackRepoRowStruct) CommitPhaseOneInstance

func (backRepoRow *BackRepoRowStruct) CommitPhaseOneInstance(row *models.Row) (Error error)

BackRepoRow.CommitPhaseOneInstance commits row staged instances of Row 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 (*BackRepoRowStruct) CommitPhaseTwo

func (backRepoRow *BackRepoRowStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoRow.CommitPhaseTwo commits all staged instances of Row to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoRowStruct) CommitPhaseTwoInstance

func (backRepoRow *BackRepoRowStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, row *models.Row) (Error error)

BackRepoRow.CommitPhaseTwoInstance commits {{structname }} of models.Row to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoRowStruct) GetDB

func (backRepoRow *BackRepoRowStruct) GetDB() *gorm.DB

func (*BackRepoRowStruct) GetRowDBFromRowPtr

func (backRepoRow *BackRepoRowStruct) GetRowDBFromRowPtr(row *models.Row) (rowDB *RowDB)

GetRowDBFromRowPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoRowStruct) Init

func (backRepoRow *BackRepoRowStruct) Init(db *gorm.DB) (Error error)

BackRepoRow.Init set up the BackRepo of the Row

func (*BackRepoRowStruct) RestorePhaseOne

func (backRepoRow *BackRepoRowStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "RowDB.json" in dirPath that stores an array of RowDB and stores it in the database the map BackRepoRowid_atBckpTime_newID is updated accordingly

func (*BackRepoRowStruct) RestorePhaseTwo

func (backRepoRow *BackRepoRowStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<Row>id_atBckpTime_newID to compute new index

func (*BackRepoRowStruct) RestoreXLPhaseOne

func (backRepoRow *BackRepoRowStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Row" sheet all RowDB instances

type BackRepoStruct

type BackRepoStruct struct {
	// insertion point for per struct back repo declarations
	BackRepoAnotherDummyData BackRepoAnotherDummyDataStruct

	BackRepoCell BackRepoCellStruct

	BackRepoDummyData BackRepoDummyDataStruct

	BackRepoElement BackRepoElementStruct

	BackRepoMarkdownContent BackRepoMarkdownContentStruct

	BackRepoRow BackRepoRowStruct

	CommitFromBackNb 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) CheckoutAnotherDummyData

func (backRepo *BackRepoStruct) CheckoutAnotherDummyData(anotherdummydata *models.AnotherDummyData)

CommitAnotherDummyData allows checkout of a single anotherdummydata (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutCell

func (backRepo *BackRepoStruct) CheckoutCell(cell *models.Cell)

CommitCell allows checkout of a single cell (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutDummyData

func (backRepo *BackRepoStruct) CheckoutDummyData(dummydata *models.DummyData)

CommitDummyData allows checkout of a single dummydata (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutElement

func (backRepo *BackRepoStruct) CheckoutElement(element *models.Element)

CommitElement allows checkout of a single element (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutMarkdownContent

func (backRepo *BackRepoStruct) CheckoutMarkdownContent(markdowncontent *models.MarkdownContent)

CommitMarkdownContent allows checkout of a single markdowncontent (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutRow

func (backRepo *BackRepoStruct) CheckoutRow(row *models.Row)

CommitRow allows checkout of a single row (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) CommitAnotherDummyData

func (backRepo *BackRepoStruct) CommitAnotherDummyData(anotherdummydata *models.AnotherDummyData)

CommitAnotherDummyData allows commit of a single anotherdummydata (if already staged)

func (*BackRepoStruct) CommitCell

func (backRepo *BackRepoStruct) CommitCell(cell *models.Cell)

CommitCell allows commit of a single cell (if already staged)

func (*BackRepoStruct) CommitDummyData

func (backRepo *BackRepoStruct) CommitDummyData(dummydata *models.DummyData)

CommitDummyData allows commit of a single dummydata (if already staged)

func (*BackRepoStruct) CommitElement

func (backRepo *BackRepoStruct) CommitElement(element *models.Element)

CommitElement allows commit of a single element (if already staged)

func (*BackRepoStruct) CommitMarkdownContent

func (backRepo *BackRepoStruct) CommitMarkdownContent(markdowncontent *models.MarkdownContent)

CommitMarkdownContent allows commit of a single markdowncontent (if already staged)

func (*BackRepoStruct) CommitRow

func (backRepo *BackRepoStruct) CommitRow(row *models.Row)

CommitRow allows commit of a single row (if already staged)

func (*BackRepoStruct) GetLastCommitFromBackNb

func (backRepo *BackRepoStruct) GetLastCommitFromBackNb() uint

func (*BackRepoStruct) GetLastPushFromFrontNb

func (backRepo *BackRepoStruct) GetLastPushFromFrontNb() uint

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

type CellAPI

type CellAPI struct {
	gorm.Model

	models.Cell

	// encoding of pointers
	CellPointersEnconding
}

CellAPI 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 cellAPI

type CellDB

type CellDB struct {
	gorm.Model

	// Declation for basic field cellDB.Name
	Name_Data sql.NullString
	// encoding of pointers
	CellPointersEnconding
}

CellDB describes a cell 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 cellDB

func (*CellDB) CopyBasicFieldsFromCell

func (cellDB *CellDB) CopyBasicFieldsFromCell(cell *models.Cell)

CopyBasicFieldsFromCell

func (*CellDB) CopyBasicFieldsFromCellWOP

func (cellDB *CellDB) CopyBasicFieldsFromCellWOP(cell *CellWOP)

CopyBasicFieldsFromCellWOP

func (*CellDB) CopyBasicFieldsToCell

func (cellDB *CellDB) CopyBasicFieldsToCell(cell *models.Cell)

CopyBasicFieldsToCell

func (*CellDB) CopyBasicFieldsToCellWOP

func (cellDB *CellDB) CopyBasicFieldsToCellWOP(cell *CellWOP)

CopyBasicFieldsToCellWOP

type CellDBResponse

type CellDBResponse struct {
	CellDB
}

CellDBResponse provides response swagger:response cellDBResponse

type CellDBs

type CellDBs []CellDB

CellDBs arrays cellDBs swagger:response cellDBsResponse

type CellPointersEnconding

type CellPointersEnconding struct {

	// Implementation of a reverse ID for field Row{}.Cells []*Cell
	Row_CellsDBID sql.NullInt64

	// implementation of the index of the withing the slice
	Row_CellsDBID_Index sql.NullInt64
}

CellPointersEnconding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type CellWOP

type CellWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`
}

CellWOP is a Cell without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type DummyDataAPI

type DummyDataAPI struct {
	gorm.Model

	models.DummyData

	// encoding of pointers
	DummyDataPointersEnconding
}

DummyDataAPI 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 dummydataAPI

type DummyDataDB

type DummyDataDB struct {
	gorm.Model

	// Declation for basic field dummydataDB.Name
	Name_Data sql.NullString

	// Declation for basic field dummydataDB.DummyString
	DummyString_Data sql.NullString

	// Declation for basic field dummydataDB.DummyInt
	DummyInt_Data sql.NullInt64

	// Declation for basic field dummydataDB.DummyFloat
	DummyFloat_Data sql.NullFloat64

	// Declation for basic field dummydataDB.DummyBool
	// provide the sql storage for the boolan
	DummyBool_Data sql.NullBool

	// Declation for basic field dummydataDB.DummyEnumString
	DummyEnumString_Data sql.NullString

	// Declation for basic field dummydataDB.DummyEnumInt
	DummyEnumInt_Data sql.NullInt64

	// Declation for basic field dummydataDB.DummyTime
	DummyTime_Data sql.NullTime

	// Declation for basic field dummydataDB.DummyDuration
	DummyDuration_Data sql.NullInt64
	// encoding of pointers
	DummyDataPointersEnconding
}

DummyDataDB describes a dummydata 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 dummydataDB

func (*DummyDataDB) CopyBasicFieldsFromDummyData

func (dummydataDB *DummyDataDB) CopyBasicFieldsFromDummyData(dummydata *models.DummyData)

CopyBasicFieldsFromDummyData

func (*DummyDataDB) CopyBasicFieldsFromDummyDataWOP

func (dummydataDB *DummyDataDB) CopyBasicFieldsFromDummyDataWOP(dummydata *DummyDataWOP)

CopyBasicFieldsFromDummyDataWOP

func (*DummyDataDB) CopyBasicFieldsToDummyData

func (dummydataDB *DummyDataDB) CopyBasicFieldsToDummyData(dummydata *models.DummyData)

CopyBasicFieldsToDummyData

func (*DummyDataDB) CopyBasicFieldsToDummyDataWOP

func (dummydataDB *DummyDataDB) CopyBasicFieldsToDummyDataWOP(dummydata *DummyDataWOP)

CopyBasicFieldsToDummyDataWOP

type DummyDataDBResponse

type DummyDataDBResponse struct {
	DummyDataDB
}

DummyDataDBResponse provides response swagger:response dummydataDBResponse

type DummyDataDBs

type DummyDataDBs []DummyDataDB

DummyDataDBs arrays dummydataDBs swagger:response dummydataDBsResponse

type DummyDataPointersEnconding

type DummyDataPointersEnconding struct {

	// field DummyPointerToGongStruct is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	DummyPointerToGongStructID sql.NullInt64
}

DummyDataPointersEnconding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type DummyDataWOP

type DummyDataWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`

	DummyString string `xlsx:"2"`

	DummyInt int `xlsx:"3"`

	DummyFloat float64 `xlsx:"4"`

	DummyBool bool `xlsx:"5"`

	DummyEnumString models.ElementType `xlsx:"6"`

	DummyEnumInt models.DummnyTypeInt `xlsx:"7"`

	DummyTime time.Time `xlsx:"8"`

	DummyDuration time.Duration `xlsx:"9"`
}

DummyDataWOP is a DummyData without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type ElementAPI

type ElementAPI struct {
	gorm.Model

	models.Element

	// encoding of pointers
	ElementPointersEnconding
}

ElementAPI 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 elementAPI

type ElementDB

type ElementDB struct {
	gorm.Model

	// Declation for basic field elementDB.Name
	Name_Data sql.NullString

	// Declation for basic field elementDB.Content
	Content_Data sql.NullString

	// Declation for basic field elementDB.Type
	Type_Data sql.NullString
	// encoding of pointers
	ElementPointersEnconding
}

ElementDB describes a element 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 elementDB

func (*ElementDB) CopyBasicFieldsFromElement

func (elementDB *ElementDB) CopyBasicFieldsFromElement(element *models.Element)

CopyBasicFieldsFromElement

func (*ElementDB) CopyBasicFieldsFromElementWOP

func (elementDB *ElementDB) CopyBasicFieldsFromElementWOP(element *ElementWOP)

CopyBasicFieldsFromElementWOP

func (*ElementDB) CopyBasicFieldsToElement

func (elementDB *ElementDB) CopyBasicFieldsToElement(element *models.Element)

CopyBasicFieldsToElement

func (*ElementDB) CopyBasicFieldsToElementWOP

func (elementDB *ElementDB) CopyBasicFieldsToElementWOP(element *ElementWOP)

CopyBasicFieldsToElementWOP

type ElementDBResponse

type ElementDBResponse struct {
	ElementDB
}

ElementDBResponse provides response swagger:response elementDBResponse

type ElementDBs

type ElementDBs []ElementDB

ElementDBs arrays elementDBs swagger:response elementDBsResponse

type ElementPointersEnconding

type ElementPointersEnconding struct {

	// Implementation of a reverse ID for field Element{}.SubElements []*Element
	Element_SubElementsDBID sql.NullInt64

	// implementation of the index of the withing the slice
	Element_SubElementsDBID_Index sql.NullInt64
}

ElementPointersEnconding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type ElementWOP

type ElementWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`

	Content string `xlsx:"2"`

	Type models.ElementType `xlsx:"3"`
}

ElementWOP is a Element without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type MarkdownContentAPI

type MarkdownContentAPI struct {
	gorm.Model

	models.MarkdownContent

	// encoding of pointers
	MarkdownContentPointersEnconding
}

MarkdownContentAPI 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 markdowncontentAPI

type MarkdownContentDB

type MarkdownContentDB struct {
	gorm.Model

	// Declation for basic field markdowncontentDB.Name
	Name_Data sql.NullString

	// Declation for basic field markdowncontentDB.Content
	Content_Data sql.NullString
	// encoding of pointers
	MarkdownContentPointersEnconding
}

MarkdownContentDB describes a markdowncontent 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 markdowncontentDB

func (*MarkdownContentDB) CopyBasicFieldsFromMarkdownContent

func (markdowncontentDB *MarkdownContentDB) CopyBasicFieldsFromMarkdownContent(markdowncontent *models.MarkdownContent)

CopyBasicFieldsFromMarkdownContent

func (*MarkdownContentDB) CopyBasicFieldsFromMarkdownContentWOP

func (markdowncontentDB *MarkdownContentDB) CopyBasicFieldsFromMarkdownContentWOP(markdowncontent *MarkdownContentWOP)

CopyBasicFieldsFromMarkdownContentWOP

func (*MarkdownContentDB) CopyBasicFieldsToMarkdownContent

func (markdowncontentDB *MarkdownContentDB) CopyBasicFieldsToMarkdownContent(markdowncontent *models.MarkdownContent)

CopyBasicFieldsToMarkdownContent

func (*MarkdownContentDB) CopyBasicFieldsToMarkdownContentWOP

func (markdowncontentDB *MarkdownContentDB) CopyBasicFieldsToMarkdownContentWOP(markdowncontent *MarkdownContentWOP)

CopyBasicFieldsToMarkdownContentWOP

type MarkdownContentDBResponse

type MarkdownContentDBResponse struct {
	MarkdownContentDB
}

MarkdownContentDBResponse provides response swagger:response markdowncontentDBResponse

type MarkdownContentDBs

type MarkdownContentDBs []MarkdownContentDB

MarkdownContentDBs arrays markdowncontentDBs swagger:response markdowncontentDBsResponse

type MarkdownContentPointersEnconding

type MarkdownContentPointersEnconding struct {

	// field Root is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	RootID sql.NullInt64
}

MarkdownContentPointersEnconding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type MarkdownContentWOP

type MarkdownContentWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`

	Content string `xlsx:"2"`
}

MarkdownContentWOP is a MarkdownContent without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type RowAPI

type RowAPI struct {
	gorm.Model

	models.Row

	// encoding of pointers
	RowPointersEnconding
}

RowAPI 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 rowAPI

type RowDB

type RowDB struct {
	gorm.Model

	// Declation for basic field rowDB.Name
	Name_Data sql.NullString
	// encoding of pointers
	RowPointersEnconding
}

RowDB describes a row 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 rowDB

func (*RowDB) CopyBasicFieldsFromRow

func (rowDB *RowDB) CopyBasicFieldsFromRow(row *models.Row)

CopyBasicFieldsFromRow

func (*RowDB) CopyBasicFieldsFromRowWOP

func (rowDB *RowDB) CopyBasicFieldsFromRowWOP(row *RowWOP)

CopyBasicFieldsFromRowWOP

func (*RowDB) CopyBasicFieldsToRow

func (rowDB *RowDB) CopyBasicFieldsToRow(row *models.Row)

CopyBasicFieldsToRow

func (*RowDB) CopyBasicFieldsToRowWOP

func (rowDB *RowDB) CopyBasicFieldsToRowWOP(row *RowWOP)

CopyBasicFieldsToRowWOP

type RowDBResponse

type RowDBResponse struct {
	RowDB
}

RowDBResponse provides response swagger:response rowDBResponse

type RowDBs

type RowDBs []RowDB

RowDBs arrays rowDBs swagger:response rowDBsResponse

type RowPointersEnconding

type RowPointersEnconding struct {

	// Implementation of a reverse ID for field Element{}.Rows []*Row
	Element_RowsDBID sql.NullInt64

	// implementation of the index of the withing the slice
	Element_RowsDBID_Index sql.NullInt64
}

RowPointersEnconding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type RowWOP

type RowWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`
}

RowWOP is a Row without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL