orm

package
v0.0.0-...-a0af7a8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 19 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

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

Constants

This section is empty.

Variables

View Source
var Annotation_Fields = []string{

	"ID",
	"Name",
}
View Source
var BackRepoAnnotationid_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 BackRepoComplexContentid_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 BackRepoComplexTypeid_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 BackRepoDocumentationid_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 BackRepoSchemaid_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 ComplexContent_Fields = []string{

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

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

	"ID",
	"Name",
	"Text",
	"Source",
	"Lang",
}
View Source
var Schema_Fields = []string{

	"ID",
	"Name",
	"Xs",
	"Schema_A_ComplexType_A_ComplexContentDummy",
	"Schema_A_ComplexType_A_ComplexContent_A_Extension_SequenceDummy",
	"Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence1Dummy",
}

Functions

func CopyBackRepoToBackRepoData

func CopyBackRepoToBackRepoData(backRepo *BackRepoStruct, backRepoData *BackRepoData)

func GetID

func GetID[T models.Gongstruct](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance *T) (id int)

func GetIDPointer

func GetIDPointer[T models.PointerToGongstruct](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance T) (id int)

func GetInstanceDBFromInstance

func GetInstanceDBFromInstance[T models.Gongstruct, T2 GongstructDB](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance *T) (ret *T2)

func GetReverseFieldOwner

func GetReverseFieldOwner[T models.Gongstruct](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance *T,
	reverseField *models.ReverseField) (res any)

func GetReverseFieldOwnerName

func GetReverseFieldOwnerName[T models.Gongstruct](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance *T,
	reverseField *models.ReverseField) (res string)

Types

type AnnotationAPI

type AnnotationAPI struct {
	gorm.Model

	models.Annotation_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	AnnotationPointersEncoding AnnotationPointersEncoding
}

AnnotationAPI 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 annotationAPI

type AnnotationDB

type AnnotationDB struct {
	gorm.Model

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

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	AnnotationPointersEncoding
}

AnnotationDB describes a annotation 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 annotationDB

func (*AnnotationDB) CopyBasicFieldsFromAnnotation

func (annotationDB *AnnotationDB) CopyBasicFieldsFromAnnotation(annotation *models.Annotation)

CopyBasicFieldsFromAnnotation

func (*AnnotationDB) CopyBasicFieldsFromAnnotationWOP

func (annotationDB *AnnotationDB) CopyBasicFieldsFromAnnotationWOP(annotation *AnnotationWOP)

CopyBasicFieldsFromAnnotationWOP

func (*AnnotationDB) CopyBasicFieldsFromAnnotation_WOP

func (annotationDB *AnnotationDB) CopyBasicFieldsFromAnnotation_WOP(annotation *models.Annotation_WOP)

CopyBasicFieldsFromAnnotation_WOP

func (*AnnotationDB) CopyBasicFieldsToAnnotation

func (annotationDB *AnnotationDB) CopyBasicFieldsToAnnotation(annotation *models.Annotation)

CopyBasicFieldsToAnnotation

func (*AnnotationDB) CopyBasicFieldsToAnnotationWOP

func (annotationDB *AnnotationDB) CopyBasicFieldsToAnnotationWOP(annotation *AnnotationWOP)

CopyBasicFieldsToAnnotationWOP

func (*AnnotationDB) CopyBasicFieldsToAnnotation_WOP

func (annotationDB *AnnotationDB) CopyBasicFieldsToAnnotation_WOP(annotation *models.Annotation_WOP)

CopyBasicFieldsToAnnotation_WOP

func (*AnnotationDB) DecodePointers

func (annotationDB *AnnotationDB) DecodePointers(backRepo *BackRepoStruct, annotation *models.Annotation)

type AnnotationDBResponse

type AnnotationDBResponse struct {
	AnnotationDB
}

AnnotationDBResponse provides response swagger:response annotationDBResponse

type AnnotationDBs

type AnnotationDBs []AnnotationDB

AnnotationDBs arrays annotationDBs swagger:response annotationDBsResponse

type AnnotationPointersEncoding

type AnnotationPointersEncoding struct {

	// field Documentations is a slice of pointers to another Struct (optional or 0..1)
	Documentations IntSlice `gorm:"type:TEXT"`
}

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

type AnnotationWOP

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

	Name string `xlsx:"1"`
}

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

type BackRepoAnnotationStruct

type BackRepoAnnotationStruct struct {
	// stores AnnotationDB according to their gorm ID
	Map_AnnotationDBID_AnnotationDB map[uint]*AnnotationDB

	// stores AnnotationDB ID according to Annotation address
	Map_AnnotationPtr_AnnotationDBID map[*models.Annotation]uint

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

func (*BackRepoAnnotationStruct) Backup

func (backRepoAnnotation *BackRepoAnnotationStruct) Backup(dirPath string)

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

func (*BackRepoAnnotationStruct) BackupXL

func (backRepoAnnotation *BackRepoAnnotationStruct) BackupXL(file *xlsx.File)

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

func (*BackRepoAnnotationStruct) CheckoutPhaseOne

func (backRepoAnnotation *BackRepoAnnotationStruct) CheckoutPhaseOne() (Error error)

BackRepoAnnotation.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 (*BackRepoAnnotationStruct) CheckoutPhaseOneInstance

func (backRepoAnnotation *BackRepoAnnotationStruct) CheckoutPhaseOneInstance(annotationDB *AnnotationDB) (Error error)

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

func (*BackRepoAnnotationStruct) CheckoutPhaseTwo

func (backRepoAnnotation *BackRepoAnnotationStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoAnnotationStruct) CheckoutPhaseTwoInstance

func (backRepoAnnotation *BackRepoAnnotationStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, annotationDB *AnnotationDB) (Error error)

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

func (*BackRepoAnnotationStruct) CommitDeleteInstance

func (backRepoAnnotation *BackRepoAnnotationStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoAnnotation.CommitDeleteInstance commits deletion of Annotation to the BackRepo

func (*BackRepoAnnotationStruct) CommitPhaseOne

func (backRepoAnnotation *BackRepoAnnotationStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoAnnotation.CommitPhaseOne commits all staged instances of Annotation 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 (*BackRepoAnnotationStruct) CommitPhaseOneInstance

func (backRepoAnnotation *BackRepoAnnotationStruct) CommitPhaseOneInstance(annotation *models.Annotation) (Error error)

BackRepoAnnotation.CommitPhaseOneInstance commits annotation staged instances of Annotation 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 (*BackRepoAnnotationStruct) CommitPhaseTwo

func (backRepoAnnotation *BackRepoAnnotationStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoAnnotationStruct) CommitPhaseTwoInstance

func (backRepoAnnotation *BackRepoAnnotationStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, annotation *models.Annotation) (Error error)

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

func (*BackRepoAnnotationStruct) GetAnnotationDBFromAnnotationPtr

func (backRepoAnnotation *BackRepoAnnotationStruct) GetAnnotationDBFromAnnotationPtr(annotation *models.Annotation) (annotationDB *AnnotationDB)

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

func (*BackRepoAnnotationStruct) GetDB

func (backRepoAnnotation *BackRepoAnnotationStruct) GetDB() *gorm.DB

func (*BackRepoAnnotationStruct) GetStage

func (backRepoAnnotation *BackRepoAnnotationStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoAnnotationStruct) ResetReversePointers

func (backRepoAnnotation *BackRepoAnnotationStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoAnnotation.ResetReversePointers commits all staged instances of Annotation to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAnnotationStruct) ResetReversePointersInstance

func (backRepoAnnotation *BackRepoAnnotationStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, annotation *models.Annotation) (Error error)

func (*BackRepoAnnotationStruct) RestorePhaseOne

func (backRepoAnnotation *BackRepoAnnotationStruct) RestorePhaseOne(dirPath string)

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

func (*BackRepoAnnotationStruct) RestorePhaseTwo

func (backRepoAnnotation *BackRepoAnnotationStruct) RestorePhaseTwo()

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

func (*BackRepoAnnotationStruct) RestoreXLPhaseOne

func (backRepoAnnotation *BackRepoAnnotationStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Annotation" sheet all AnnotationDB instances

type BackRepoComplexContentStruct

type BackRepoComplexContentStruct struct {
	// stores ComplexContentDB according to their gorm ID
	Map_ComplexContentDBID_ComplexContentDB map[uint]*ComplexContentDB

	// stores ComplexContentDB ID according to ComplexContent address
	Map_ComplexContentPtr_ComplexContentDBID map[*models.ComplexContent]uint

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

func (*BackRepoComplexContentStruct) Backup

func (backRepoComplexContent *BackRepoComplexContentStruct) Backup(dirPath string)

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

func (*BackRepoComplexContentStruct) BackupXL

func (backRepoComplexContent *BackRepoComplexContentStruct) BackupXL(file *xlsx.File)

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

func (*BackRepoComplexContentStruct) CheckoutPhaseOne

func (backRepoComplexContent *BackRepoComplexContentStruct) CheckoutPhaseOne() (Error error)

BackRepoComplexContent.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 (*BackRepoComplexContentStruct) CheckoutPhaseOneInstance

func (backRepoComplexContent *BackRepoComplexContentStruct) CheckoutPhaseOneInstance(complexcontentDB *ComplexContentDB) (Error error)

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

func (*BackRepoComplexContentStruct) CheckoutPhaseTwo

func (backRepoComplexContent *BackRepoComplexContentStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoComplexContentStruct) CheckoutPhaseTwoInstance

func (backRepoComplexContent *BackRepoComplexContentStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, complexcontentDB *ComplexContentDB) (Error error)

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

func (*BackRepoComplexContentStruct) CommitDeleteInstance

func (backRepoComplexContent *BackRepoComplexContentStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoComplexContent.CommitDeleteInstance commits deletion of ComplexContent to the BackRepo

func (*BackRepoComplexContentStruct) CommitPhaseOne

func (backRepoComplexContent *BackRepoComplexContentStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoComplexContent.CommitPhaseOne commits all staged instances of ComplexContent 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 (*BackRepoComplexContentStruct) CommitPhaseOneInstance

func (backRepoComplexContent *BackRepoComplexContentStruct) CommitPhaseOneInstance(complexcontent *models.ComplexContent) (Error error)

BackRepoComplexContent.CommitPhaseOneInstance commits complexcontent staged instances of ComplexContent 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 (*BackRepoComplexContentStruct) CommitPhaseTwo

func (backRepoComplexContent *BackRepoComplexContentStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoComplexContentStruct) CommitPhaseTwoInstance

func (backRepoComplexContent *BackRepoComplexContentStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, complexcontent *models.ComplexContent) (Error error)

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

func (*BackRepoComplexContentStruct) GetComplexContentDBFromComplexContentPtr

func (backRepoComplexContent *BackRepoComplexContentStruct) GetComplexContentDBFromComplexContentPtr(complexcontent *models.ComplexContent) (complexcontentDB *ComplexContentDB)

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

func (*BackRepoComplexContentStruct) GetDB

func (backRepoComplexContent *BackRepoComplexContentStruct) GetDB() *gorm.DB

func (*BackRepoComplexContentStruct) GetStage

func (backRepoComplexContent *BackRepoComplexContentStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoComplexContentStruct) ResetReversePointers

func (backRepoComplexContent *BackRepoComplexContentStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoComplexContent.ResetReversePointers commits all staged instances of ComplexContent to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoComplexContentStruct) ResetReversePointersInstance

func (backRepoComplexContent *BackRepoComplexContentStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, complexcontent *models.ComplexContent) (Error error)

func (*BackRepoComplexContentStruct) RestorePhaseOne

func (backRepoComplexContent *BackRepoComplexContentStruct) RestorePhaseOne(dirPath string)

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

func (*BackRepoComplexContentStruct) RestorePhaseTwo

func (backRepoComplexContent *BackRepoComplexContentStruct) RestorePhaseTwo()

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

func (*BackRepoComplexContentStruct) RestoreXLPhaseOne

func (backRepoComplexContent *BackRepoComplexContentStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "ComplexContent" sheet all ComplexContentDB instances

type BackRepoComplexTypeStruct

type BackRepoComplexTypeStruct struct {
	// stores ComplexTypeDB according to their gorm ID
	Map_ComplexTypeDBID_ComplexTypeDB map[uint]*ComplexTypeDB

	// stores ComplexTypeDB ID according to ComplexType address
	Map_ComplexTypePtr_ComplexTypeDBID map[*models.ComplexType]uint

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

func (*BackRepoComplexTypeStruct) Backup

func (backRepoComplexType *BackRepoComplexTypeStruct) Backup(dirPath string)

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

func (*BackRepoComplexTypeStruct) BackupXL

func (backRepoComplexType *BackRepoComplexTypeStruct) BackupXL(file *xlsx.File)

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

func (*BackRepoComplexTypeStruct) CheckoutPhaseOne

func (backRepoComplexType *BackRepoComplexTypeStruct) CheckoutPhaseOne() (Error error)

BackRepoComplexType.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 (*BackRepoComplexTypeStruct) CheckoutPhaseOneInstance

func (backRepoComplexType *BackRepoComplexTypeStruct) CheckoutPhaseOneInstance(complextypeDB *ComplexTypeDB) (Error error)

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

func (*BackRepoComplexTypeStruct) CheckoutPhaseTwo

func (backRepoComplexType *BackRepoComplexTypeStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoComplexTypeStruct) CheckoutPhaseTwoInstance

func (backRepoComplexType *BackRepoComplexTypeStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, complextypeDB *ComplexTypeDB) (Error error)

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

func (*BackRepoComplexTypeStruct) CommitDeleteInstance

func (backRepoComplexType *BackRepoComplexTypeStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoComplexType.CommitDeleteInstance commits deletion of ComplexType to the BackRepo

func (*BackRepoComplexTypeStruct) CommitPhaseOne

func (backRepoComplexType *BackRepoComplexTypeStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoComplexType.CommitPhaseOne commits all staged instances of ComplexType 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 (*BackRepoComplexTypeStruct) CommitPhaseOneInstance

func (backRepoComplexType *BackRepoComplexTypeStruct) CommitPhaseOneInstance(complextype *models.ComplexType) (Error error)

BackRepoComplexType.CommitPhaseOneInstance commits complextype staged instances of ComplexType 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 (*BackRepoComplexTypeStruct) CommitPhaseTwo

func (backRepoComplexType *BackRepoComplexTypeStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoComplexTypeStruct) CommitPhaseTwoInstance

func (backRepoComplexType *BackRepoComplexTypeStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, complextype *models.ComplexType) (Error error)

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

func (*BackRepoComplexTypeStruct) GetComplexTypeDBFromComplexTypePtr

func (backRepoComplexType *BackRepoComplexTypeStruct) GetComplexTypeDBFromComplexTypePtr(complextype *models.ComplexType) (complextypeDB *ComplexTypeDB)

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

func (*BackRepoComplexTypeStruct) GetDB

func (backRepoComplexType *BackRepoComplexTypeStruct) GetDB() *gorm.DB

func (*BackRepoComplexTypeStruct) GetStage

func (backRepoComplexType *BackRepoComplexTypeStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoComplexTypeStruct) ResetReversePointers

func (backRepoComplexType *BackRepoComplexTypeStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoComplexType.ResetReversePointers commits all staged instances of ComplexType to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoComplexTypeStruct) ResetReversePointersInstance

func (backRepoComplexType *BackRepoComplexTypeStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, complextype *models.ComplexType) (Error error)

func (*BackRepoComplexTypeStruct) RestorePhaseOne

func (backRepoComplexType *BackRepoComplexTypeStruct) RestorePhaseOne(dirPath string)

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

func (*BackRepoComplexTypeStruct) RestorePhaseTwo

func (backRepoComplexType *BackRepoComplexTypeStruct) RestorePhaseTwo()

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

func (*BackRepoComplexTypeStruct) RestoreXLPhaseOne

func (backRepoComplexType *BackRepoComplexTypeStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "ComplexType" sheet all ComplexTypeDB instances

type BackRepoData

type BackRepoData struct {
	AnnotationAPIs []*AnnotationAPI

	ComplexContentAPIs []*ComplexContentAPI

	ComplexTypeAPIs []*ComplexTypeAPI

	DocumentationAPIs []*DocumentationAPI

	SchemaAPIs []*SchemaAPI
}

type BackRepoDocumentationStruct

type BackRepoDocumentationStruct struct {
	// stores DocumentationDB according to their gorm ID
	Map_DocumentationDBID_DocumentationDB map[uint]*DocumentationDB

	// stores DocumentationDB ID according to Documentation address
	Map_DocumentationPtr_DocumentationDBID map[*models.Documentation]uint

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

func (*BackRepoDocumentationStruct) Backup

func (backRepoDocumentation *BackRepoDocumentationStruct) Backup(dirPath string)

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

func (*BackRepoDocumentationStruct) BackupXL

func (backRepoDocumentation *BackRepoDocumentationStruct) BackupXL(file *xlsx.File)

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

func (*BackRepoDocumentationStruct) CheckoutPhaseOne

func (backRepoDocumentation *BackRepoDocumentationStruct) CheckoutPhaseOne() (Error error)

BackRepoDocumentation.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 (*BackRepoDocumentationStruct) CheckoutPhaseOneInstance

func (backRepoDocumentation *BackRepoDocumentationStruct) CheckoutPhaseOneInstance(documentationDB *DocumentationDB) (Error error)

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

func (*BackRepoDocumentationStruct) CheckoutPhaseTwo

func (backRepoDocumentation *BackRepoDocumentationStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoDocumentationStruct) CheckoutPhaseTwoInstance

func (backRepoDocumentation *BackRepoDocumentationStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, documentationDB *DocumentationDB) (Error error)

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

func (*BackRepoDocumentationStruct) CommitDeleteInstance

func (backRepoDocumentation *BackRepoDocumentationStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoDocumentation.CommitDeleteInstance commits deletion of Documentation to the BackRepo

func (*BackRepoDocumentationStruct) CommitPhaseOne

func (backRepoDocumentation *BackRepoDocumentationStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoDocumentation.CommitPhaseOne commits all staged instances of Documentation 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 (*BackRepoDocumentationStruct) CommitPhaseOneInstance

func (backRepoDocumentation *BackRepoDocumentationStruct) CommitPhaseOneInstance(documentation *models.Documentation) (Error error)

BackRepoDocumentation.CommitPhaseOneInstance commits documentation staged instances of Documentation 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 (*BackRepoDocumentationStruct) CommitPhaseTwo

func (backRepoDocumentation *BackRepoDocumentationStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoDocumentationStruct) CommitPhaseTwoInstance

func (backRepoDocumentation *BackRepoDocumentationStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, documentation *models.Documentation) (Error error)

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

func (*BackRepoDocumentationStruct) GetDB

func (backRepoDocumentation *BackRepoDocumentationStruct) GetDB() *gorm.DB

func (*BackRepoDocumentationStruct) GetDocumentationDBFromDocumentationPtr

func (backRepoDocumentation *BackRepoDocumentationStruct) GetDocumentationDBFromDocumentationPtr(documentation *models.Documentation) (documentationDB *DocumentationDB)

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

func (*BackRepoDocumentationStruct) GetStage

func (backRepoDocumentation *BackRepoDocumentationStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoDocumentationStruct) ResetReversePointers

func (backRepoDocumentation *BackRepoDocumentationStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoDocumentation.ResetReversePointers commits all staged instances of Documentation to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDocumentationStruct) ResetReversePointersInstance

func (backRepoDocumentation *BackRepoDocumentationStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, documentation *models.Documentation) (Error error)

func (*BackRepoDocumentationStruct) RestorePhaseOne

func (backRepoDocumentation *BackRepoDocumentationStruct) RestorePhaseOne(dirPath string)

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

func (*BackRepoDocumentationStruct) RestorePhaseTwo

func (backRepoDocumentation *BackRepoDocumentationStruct) RestorePhaseTwo()

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

func (*BackRepoDocumentationStruct) RestoreXLPhaseOne

func (backRepoDocumentation *BackRepoDocumentationStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Documentation" sheet all DocumentationDB instances

type BackRepoSchemaStruct

type BackRepoSchemaStruct struct {
	// stores SchemaDB according to their gorm ID
	Map_SchemaDBID_SchemaDB map[uint]*SchemaDB

	// stores SchemaDB ID according to Schema address
	Map_SchemaPtr_SchemaDBID map[*models.Schema]uint

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

func (*BackRepoSchemaStruct) Backup

func (backRepoSchema *BackRepoSchemaStruct) Backup(dirPath string)

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

func (*BackRepoSchemaStruct) BackupXL

func (backRepoSchema *BackRepoSchemaStruct) BackupXL(file *xlsx.File)

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

func (*BackRepoSchemaStruct) CheckoutPhaseOne

func (backRepoSchema *BackRepoSchemaStruct) CheckoutPhaseOne() (Error error)

BackRepoSchema.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 (*BackRepoSchemaStruct) CheckoutPhaseOneInstance

func (backRepoSchema *BackRepoSchemaStruct) CheckoutPhaseOneInstance(schemaDB *SchemaDB) (Error error)

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

func (*BackRepoSchemaStruct) CheckoutPhaseTwo

func (backRepoSchema *BackRepoSchemaStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoSchemaStruct) CheckoutPhaseTwoInstance

func (backRepoSchema *BackRepoSchemaStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, schemaDB *SchemaDB) (Error error)

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

func (*BackRepoSchemaStruct) CommitDeleteInstance

func (backRepoSchema *BackRepoSchemaStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoSchema.CommitDeleteInstance commits deletion of Schema to the BackRepo

func (*BackRepoSchemaStruct) CommitPhaseOne

func (backRepoSchema *BackRepoSchemaStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoSchema.CommitPhaseOne commits all staged instances of Schema 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 (*BackRepoSchemaStruct) CommitPhaseOneInstance

func (backRepoSchema *BackRepoSchemaStruct) CommitPhaseOneInstance(schema *models.Schema) (Error error)

BackRepoSchema.CommitPhaseOneInstance commits schema staged instances of Schema 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 (*BackRepoSchemaStruct) CommitPhaseTwo

func (backRepoSchema *BackRepoSchemaStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

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

func (*BackRepoSchemaStruct) CommitPhaseTwoInstance

func (backRepoSchema *BackRepoSchemaStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, schema *models.Schema) (Error error)

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

func (*BackRepoSchemaStruct) GetDB

func (backRepoSchema *BackRepoSchemaStruct) GetDB() *gorm.DB

func (*BackRepoSchemaStruct) GetSchemaDBFromSchemaPtr

func (backRepoSchema *BackRepoSchemaStruct) GetSchemaDBFromSchemaPtr(schema *models.Schema) (schemaDB *SchemaDB)

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

func (*BackRepoSchemaStruct) GetStage

func (backRepoSchema *BackRepoSchemaStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoSchemaStruct) ResetReversePointers

func (backRepoSchema *BackRepoSchemaStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoSchema.ResetReversePointers commits all staged instances of Schema to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoSchemaStruct) ResetReversePointersInstance

func (backRepoSchema *BackRepoSchemaStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, schema *models.Schema) (Error error)

func (*BackRepoSchemaStruct) RestorePhaseOne

func (backRepoSchema *BackRepoSchemaStruct) RestorePhaseOne(dirPath string)

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

func (*BackRepoSchemaStruct) RestorePhaseTwo

func (backRepoSchema *BackRepoSchemaStruct) RestorePhaseTwo()

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

func (*BackRepoSchemaStruct) RestoreXLPhaseOne

func (backRepoSchema *BackRepoSchemaStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Schema" sheet all SchemaDB instances

type BackRepoStruct

type BackRepoStruct struct {
	// insertion point for per struct back repo declarations
	BackRepoAnnotation BackRepoAnnotationStruct

	BackRepoComplexContent BackRepoComplexContentStruct

	BackRepoComplexType BackRepoComplexTypeStruct

	BackRepoDocumentation BackRepoDocumentationStruct

	BackRepoSchema BackRepoSchemaStruct

	CommitFromBackNb uint // records commit increments when performed by the back

	PushFromFrontNb uint // records commit increments when performed by the front
	// contains filtered or unexported fields
}

BackRepoStruct supports callback functions

func NewBackRepo

func NewBackRepo(stage *models.StageStruct, filename string) (backRepo *BackRepoStruct)

func (*BackRepoStruct) Backup

func (backRepo *BackRepoStruct) Backup(stage *models.StageStruct, dirPath string)

Backup the BackRepoStruct

func (*BackRepoStruct) BackupXL

func (backRepo *BackRepoStruct) BackupXL(stage *models.StageStruct, dirPath string)

Backup in XL the BackRepoStruct

func (*BackRepoStruct) Checkout

func (backRepo *BackRepoStruct) Checkout(stage *models.StageStruct)

Checkout the database into the stage

func (*BackRepoStruct) CheckoutAnnotation

func (backRepo *BackRepoStruct) CheckoutAnnotation(annotation *models.Annotation)

CommitAnnotation allows checkout of a single annotation (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutComplexContent

func (backRepo *BackRepoStruct) CheckoutComplexContent(complexcontent *models.ComplexContent)

CommitComplexContent allows checkout of a single complexcontent (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutComplexType

func (backRepo *BackRepoStruct) CheckoutComplexType(complextype *models.ComplexType)

CommitComplexType allows checkout of a single complextype (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutDocumentation

func (backRepo *BackRepoStruct) CheckoutDocumentation(documentation *models.Documentation)

CommitDocumentation allows checkout of a single documentation (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutSchema

func (backRepo *BackRepoStruct) CheckoutSchema(schema *models.Schema)

CommitSchema allows checkout of a single schema (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) CommitAnnotation

func (backRepo *BackRepoStruct) CommitAnnotation(annotation *models.Annotation)

CommitAnnotation allows commit of a single annotation (if already staged)

func (*BackRepoStruct) CommitComplexContent

func (backRepo *BackRepoStruct) CommitComplexContent(complexcontent *models.ComplexContent)

CommitComplexContent allows commit of a single complexcontent (if already staged)

func (*BackRepoStruct) CommitComplexType

func (backRepo *BackRepoStruct) CommitComplexType(complextype *models.ComplexType)

CommitComplexType allows commit of a single complextype (if already staged)

func (*BackRepoStruct) CommitDocumentation

func (backRepo *BackRepoStruct) CommitDocumentation(documentation *models.Documentation)

CommitDocumentation allows commit of a single documentation (if already staged)

func (*BackRepoStruct) CommitSchema

func (backRepo *BackRepoStruct) CommitSchema(schema *models.Schema)

CommitSchema allows commit of a single schema (if already staged)

func (*BackRepoStruct) GetLastCommitFromBackNb

func (backRepo *BackRepoStruct) GetLastCommitFromBackNb() uint

func (*BackRepoStruct) GetLastPushFromFrontNb

func (backRepo *BackRepoStruct) GetLastPushFromFrontNb() uint

func (*BackRepoStruct) GetStage

func (backRepo *BackRepoStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoStruct) IncrementCommitFromBackNb

func (backRepo *BackRepoStruct) IncrementCommitFromBackNb() uint

func (*BackRepoStruct) IncrementPushFromFrontNb

func (backRepo *BackRepoStruct) IncrementPushFromFrontNb() uint

func (*BackRepoStruct) Restore

func (backRepo *BackRepoStruct) Restore(stage *models.StageStruct, dirPath string)

Restore the database into the back repo

func (*BackRepoStruct) RestoreXL

func (backRepo *BackRepoStruct) RestoreXL(stage *models.StageStruct, dirPath string)

Restore the database into the back repo

func (*BackRepoStruct) SubscribeToCommitNb

func (backRepoStruct *BackRepoStruct) SubscribeToCommitNb() <-chan int

type ComplexContentAPI

type ComplexContentAPI struct {
	gorm.Model

	models.ComplexContent_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	ComplexContentPointersEncoding ComplexContentPointersEncoding
}

ComplexContentAPI 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 complexcontentAPI

type ComplexContentDB

type ComplexContentDB struct {
	gorm.Model

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

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	ComplexContentPointersEncoding
}

ComplexContentDB describes a complexcontent 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 complexcontentDB

func (*ComplexContentDB) CopyBasicFieldsFromComplexContent

func (complexcontentDB *ComplexContentDB) CopyBasicFieldsFromComplexContent(complexcontent *models.ComplexContent)

CopyBasicFieldsFromComplexContent

func (*ComplexContentDB) CopyBasicFieldsFromComplexContentWOP

func (complexcontentDB *ComplexContentDB) CopyBasicFieldsFromComplexContentWOP(complexcontent *ComplexContentWOP)

CopyBasicFieldsFromComplexContentWOP

func (*ComplexContentDB) CopyBasicFieldsFromComplexContent_WOP

func (complexcontentDB *ComplexContentDB) CopyBasicFieldsFromComplexContent_WOP(complexcontent *models.ComplexContent_WOP)

CopyBasicFieldsFromComplexContent_WOP

func (*ComplexContentDB) CopyBasicFieldsToComplexContent

func (complexcontentDB *ComplexContentDB) CopyBasicFieldsToComplexContent(complexcontent *models.ComplexContent)

CopyBasicFieldsToComplexContent

func (*ComplexContentDB) CopyBasicFieldsToComplexContentWOP

func (complexcontentDB *ComplexContentDB) CopyBasicFieldsToComplexContentWOP(complexcontent *ComplexContentWOP)

CopyBasicFieldsToComplexContentWOP

func (*ComplexContentDB) CopyBasicFieldsToComplexContent_WOP

func (complexcontentDB *ComplexContentDB) CopyBasicFieldsToComplexContent_WOP(complexcontent *models.ComplexContent_WOP)

CopyBasicFieldsToComplexContent_WOP

func (*ComplexContentDB) DecodePointers

func (complexcontentDB *ComplexContentDB) DecodePointers(backRepo *BackRepoStruct, complexcontent *models.ComplexContent)

type ComplexContentDBResponse

type ComplexContentDBResponse struct {
	ComplexContentDB
}

ComplexContentDBResponse provides response swagger:response complexcontentDBResponse

type ComplexContentDBs

type ComplexContentDBs []ComplexContentDB

ComplexContentDBs arrays complexcontentDBs swagger:response complexcontentDBsResponse

type ComplexContentPointersEncoding

type ComplexContentPointersEncoding struct {
}

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

type ComplexContentWOP

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

	Name string `xlsx:"1"`
}

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

type ComplexTypeAPI

type ComplexTypeAPI struct {
	gorm.Model

	models.ComplexType_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	ComplexTypePointersEncoding ComplexTypePointersEncoding
}

ComplexTypeAPI 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 complextypeAPI

type ComplexTypeDB

type ComplexTypeDB struct {
	gorm.Model

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

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	ComplexTypePointersEncoding
}

ComplexTypeDB describes a complextype 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 complextypeDB

func (*ComplexTypeDB) CopyBasicFieldsFromComplexType

func (complextypeDB *ComplexTypeDB) CopyBasicFieldsFromComplexType(complextype *models.ComplexType)

CopyBasicFieldsFromComplexType

func (*ComplexTypeDB) CopyBasicFieldsFromComplexTypeWOP

func (complextypeDB *ComplexTypeDB) CopyBasicFieldsFromComplexTypeWOP(complextype *ComplexTypeWOP)

CopyBasicFieldsFromComplexTypeWOP

func (*ComplexTypeDB) CopyBasicFieldsFromComplexType_WOP

func (complextypeDB *ComplexTypeDB) CopyBasicFieldsFromComplexType_WOP(complextype *models.ComplexType_WOP)

CopyBasicFieldsFromComplexType_WOP

func (*ComplexTypeDB) CopyBasicFieldsToComplexType

func (complextypeDB *ComplexTypeDB) CopyBasicFieldsToComplexType(complextype *models.ComplexType)

CopyBasicFieldsToComplexType

func (*ComplexTypeDB) CopyBasicFieldsToComplexTypeWOP

func (complextypeDB *ComplexTypeDB) CopyBasicFieldsToComplexTypeWOP(complextype *ComplexTypeWOP)

CopyBasicFieldsToComplexTypeWOP

func (*ComplexTypeDB) CopyBasicFieldsToComplexType_WOP

func (complextypeDB *ComplexTypeDB) CopyBasicFieldsToComplexType_WOP(complextype *models.ComplexType_WOP)

CopyBasicFieldsToComplexType_WOP

func (*ComplexTypeDB) DecodePointers

func (complextypeDB *ComplexTypeDB) DecodePointers(backRepo *BackRepoStruct, complextype *models.ComplexType)

type ComplexTypeDBResponse

type ComplexTypeDBResponse struct {
	ComplexTypeDB
}

ComplexTypeDBResponse provides response swagger:response complextypeDBResponse

type ComplexTypeDBs

type ComplexTypeDBs []ComplexTypeDB

ComplexTypeDBs arrays complextypeDBs swagger:response complextypeDBsResponse

type ComplexTypePointersEncoding

type ComplexTypePointersEncoding struct {
}

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

type ComplexTypeWOP

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

	Name string `xlsx:"1"`
}

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

type DocumentationAPI

type DocumentationAPI struct {
	gorm.Model

	models.Documentation_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	DocumentationPointersEncoding DocumentationPointersEncoding
}

DocumentationAPI 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 documentationAPI

type DocumentationDB

type DocumentationDB struct {
	gorm.Model

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

	// Declation for basic field documentationDB.Text
	Text_Data sql.NullString

	// Declation for basic field documentationDB.Source
	Source_Data sql.NullString

	// Declation for basic field documentationDB.Lang
	Lang_Data sql.NullString

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	DocumentationPointersEncoding
}

DocumentationDB describes a documentation 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 documentationDB

func (*DocumentationDB) CopyBasicFieldsFromDocumentation

func (documentationDB *DocumentationDB) CopyBasicFieldsFromDocumentation(documentation *models.Documentation)

CopyBasicFieldsFromDocumentation

func (*DocumentationDB) CopyBasicFieldsFromDocumentationWOP

func (documentationDB *DocumentationDB) CopyBasicFieldsFromDocumentationWOP(documentation *DocumentationWOP)

CopyBasicFieldsFromDocumentationWOP

func (*DocumentationDB) CopyBasicFieldsFromDocumentation_WOP

func (documentationDB *DocumentationDB) CopyBasicFieldsFromDocumentation_WOP(documentation *models.Documentation_WOP)

CopyBasicFieldsFromDocumentation_WOP

func (*DocumentationDB) CopyBasicFieldsToDocumentation

func (documentationDB *DocumentationDB) CopyBasicFieldsToDocumentation(documentation *models.Documentation)

CopyBasicFieldsToDocumentation

func (*DocumentationDB) CopyBasicFieldsToDocumentationWOP

func (documentationDB *DocumentationDB) CopyBasicFieldsToDocumentationWOP(documentation *DocumentationWOP)

CopyBasicFieldsToDocumentationWOP

func (*DocumentationDB) CopyBasicFieldsToDocumentation_WOP

func (documentationDB *DocumentationDB) CopyBasicFieldsToDocumentation_WOP(documentation *models.Documentation_WOP)

CopyBasicFieldsToDocumentation_WOP

func (*DocumentationDB) DecodePointers

func (documentationDB *DocumentationDB) DecodePointers(backRepo *BackRepoStruct, documentation *models.Documentation)

type DocumentationDBResponse

type DocumentationDBResponse struct {
	DocumentationDB
}

DocumentationDBResponse provides response swagger:response documentationDBResponse

type DocumentationDBs

type DocumentationDBs []DocumentationDB

DocumentationDBs arrays documentationDBs swagger:response documentationDBsResponse

type DocumentationPointersEncoding

type DocumentationPointersEncoding struct {
}

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

type DocumentationWOP

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

	Name string `xlsx:"1"`

	Text string `xlsx:"2"`

	Source string `xlsx:"3"`

	Lang string `xlsx:"4"`
}

DocumentationWOP is a Documentation 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

func (*IntSlice) Scan

func (s *IntSlice) Scan(value interface{}) error

Scan makes IntSlice implement the sql.Scanner interface.

func (IntSlice) Value

func (s IntSlice) Value() (driver.Value, error)

Value makes IntSlice implement the driver.Valuer interface.

type SchemaAPI

type SchemaAPI struct {
	gorm.Model

	models.Schema_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	SchemaPointersEncoding SchemaPointersEncoding
}

SchemaAPI 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 schemaAPI

type SchemaDB

type SchemaDB struct {
	gorm.Model

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

	// Declation for basic field schemaDB.Xs
	Xs_Data sql.NullString

	// Declation for basic field schemaDB.Schema_A_ComplexType_A_ComplexContentDummy
	Schema_A_ComplexType_A_ComplexContentDummy_Data sql.NullInt64

	// Declation for basic field schemaDB.Schema_A_ComplexType_A_ComplexContent_A_Extension_SequenceDummy
	Schema_A_ComplexType_A_ComplexContent_A_Extension_SequenceDummy_Data sql.NullInt64

	// Declation for basic field schemaDB.Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence1Dummy
	Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence1Dummy_Data sql.NullInt64

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	SchemaPointersEncoding
}

SchemaDB describes a schema 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 schemaDB

func (*SchemaDB) CopyBasicFieldsFromSchema

func (schemaDB *SchemaDB) CopyBasicFieldsFromSchema(schema *models.Schema)

CopyBasicFieldsFromSchema

func (*SchemaDB) CopyBasicFieldsFromSchemaWOP

func (schemaDB *SchemaDB) CopyBasicFieldsFromSchemaWOP(schema *SchemaWOP)

CopyBasicFieldsFromSchemaWOP

func (*SchemaDB) CopyBasicFieldsFromSchema_WOP

func (schemaDB *SchemaDB) CopyBasicFieldsFromSchema_WOP(schema *models.Schema_WOP)

CopyBasicFieldsFromSchema_WOP

func (*SchemaDB) CopyBasicFieldsToSchema

func (schemaDB *SchemaDB) CopyBasicFieldsToSchema(schema *models.Schema)

CopyBasicFieldsToSchema

func (*SchemaDB) CopyBasicFieldsToSchemaWOP

func (schemaDB *SchemaDB) CopyBasicFieldsToSchemaWOP(schema *SchemaWOP)

CopyBasicFieldsToSchemaWOP

func (*SchemaDB) CopyBasicFieldsToSchema_WOP

func (schemaDB *SchemaDB) CopyBasicFieldsToSchema_WOP(schema *models.Schema_WOP)

CopyBasicFieldsToSchema_WOP

func (*SchemaDB) DecodePointers

func (schemaDB *SchemaDB) DecodePointers(backRepo *BackRepoStruct, schema *models.Schema)

type SchemaDBResponse

type SchemaDBResponse struct {
	SchemaDB
}

SchemaDBResponse provides response swagger:response schemaDBResponse

type SchemaDBs

type SchemaDBs []SchemaDB

SchemaDBs arrays schemaDBs swagger:response schemaDBsResponse

type SchemaPointersEncoding

type SchemaPointersEncoding struct {

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

	Sequence2 struct {

		// field ComplexType is a pointer to another Struct (optional or 0..1)
		// This field is generated into another field to enable AS ONE association
		ComplexTypeID sql.NullInt64
	} `gorm:"embedded"`
}

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

type SchemaWOP

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

	Name string `xlsx:"1"`

	Xs string `xlsx:"2"`

	Schema_A_ComplexType_A_ComplexContentDummy int `xlsx:"3"`

	Schema_A_ComplexType_A_ComplexContent_A_Extension_SequenceDummy int `xlsx:"4"`

	Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence1Dummy int `xlsx:"5"`
}

SchemaWOP is a Schema 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