Documentation ¶
Overview ¶
Default generated models package docs (at least one file is necessary in a models package)
generated code - do not edit
generated code - do not edit
generated code - do not edit
generated code - do not edit
generated code - do not edit
generated code - do not edit
generated code - do not edit
generated code - do not edit
generated code - do not edit
generated code - do not edit
Index ¶
- Constants
- func AfterCreateFromFront[Type Gongstruct](stage *StageStruct, instance *Type)
- func AfterDeleteFromFront[Type Gongstruct](stage *StageStruct, staged, front *Type)
- func AfterReadFromFront[Type Gongstruct](stage *StageStruct, instance *Type)
- func AfterUpdateFromFront[Type Gongstruct](stage *StageStruct, old, new *Type)
- func CompareGongstructByName[T PointerToGongstruct](a, b T) int
- func CopyBranch[Type Gongstruct](from *Type) (to *Type)
- func EvictInOtherSlices[OwningType PointerToGongstruct, FieldType PointerToGongstruct](stage *StageStruct, owningInstance OwningType, sliceField []FieldType, ...)
- func GetAssociationName[Type Gongstruct]() *Type
- func GetFieldStringValue[Type Gongstruct](instance Type, fieldName string) (res string)
- func GetFieldStringValueFromPointer[Type PointerToGongstruct](instance Type, fieldName string) (res string)
- func GetFields[Type Gongstruct]() (res []string)
- func GetFieldsFromPointer[Type PointerToGongstruct]() (res []string)
- func GetGongstrucsSorted[T PointerToGongstruct](stage *StageStruct) (sortedSlice []T)
- func GetGongstructInstancesMap[Type Gongstruct](stage *StageStruct) *map[string]*Type
- func GetGongstructInstancesSet[Type Gongstruct](stage *StageStruct) *map[*Type]any
- func GetGongstructInstancesSetFromPointerType[Type PointerToGongstruct](stage *StageStruct) *map[Type]any
- func GetGongstructName[Type Gongstruct]() (res string)
- func GetPointerReverseMap[Start, End Gongstruct](fieldname string, stage *StageStruct) map[*End][]*Start
- func GetPointerToGongstructName[Type PointerToGongstruct]() (res string)
- func GetSliceOfPointersReverseMap[Start, End Gongstruct](fieldname string, stage *StageStruct) map[*End]*Start
- func GongGetMap[Type GongstructMapString](stage *StageStruct) *Type
- func GongGetSet[Type GongstructSet](stage *StageStruct) *Type
- func IntToLetters(number int32) (letters string)
- func IsStaged[Type Gongstruct](stage *StageStruct, instance *Type) (ok bool)
- func ParseAstFile(stage *StageStruct, pathToFile string) error
- func ParseAstFileFromAst(stage *StageStruct, inFile *ast.File, fset *token.FileSet) error
- func ReplaceOldDeclarationsInFile(pathToFile string) error
- func Serialize[Type Gongstruct](stage *StageStruct, tab Tabulator)
- func SerializeExcelize[Type Gongstruct](stage *StageStruct, f *excelize.File)
- func SerializeStage(stage *StageStruct, filename string)
- func SetCallbackAfterCreateFromFront[Type Gongstruct](stage *StageStruct, callback OnAfterCreateInterface[Type])
- func SetCallbackAfterDeleteFromFront[Type Gongstruct](stage *StageStruct, callback OnAfterDeleteInterface[Type])
- func SetCallbackAfterReadFromFront[Type Gongstruct](stage *StageStruct, callback OnAfterReadInterface[Type])
- func SetCallbackAfterUpdateFromFront[Type Gongstruct](stage *StageStruct, callback OnAfterUpdateInterface[Type])
- func SetOrchestratorOnAfterUpdate[Type Gongstruct](stage *StageStruct)
- func SortGongstructSetByName[T PointerToGongstruct](set map[T]any) (sortedSlice []T)
- func StageBranch[Type Gongstruct](stage *StageStruct, instance *Type)
- func UnmarshallGongstructStaging(stage *StageStruct, cmap *ast.CommentMap, assignStmt *ast.AssignStmt, ...) (instance any, identifier string, gongstructName string, fieldName string)
- func UnstageBranch[Type Gongstruct](stage *StageStruct, instance *Type)
- type AllModelsStructCreateInterface
- type AllModelsStructDeleteInterface
- type Annotated
- type Annotation
- func (annotation *Annotation) Checkout(stage *StageStruct) *Annotation
- func (annotation *Annotation) Commit(stage *StageStruct) *Annotation
- func (annotation *Annotation) CommitVoid(stage *StageStruct)
- func (from *Annotation) CopyBasicFields(to *Annotation)
- func (annotation *Annotation) GetName() (res string)
- func (annotation *Annotation) Stage(stage *StageStruct) *Annotation
- func (annotation *Annotation) Unstage(stage *StageStruct) *Annotation
- func (annotation *Annotation) UnstageVoid(stage *StageStruct)
- type Annotation_WOP
- type BackRepoInterface
- type ComplexContent
- func (complexcontent *ComplexContent) Checkout(stage *StageStruct) *ComplexContent
- func (complexcontent *ComplexContent) Commit(stage *StageStruct) *ComplexContent
- func (complexcontent *ComplexContent) CommitVoid(stage *StageStruct)
- func (from *ComplexContent) CopyBasicFields(to *ComplexContent)
- func (complexcontent *ComplexContent) GetName() (res string)
- func (complexcontent *ComplexContent) Stage(stage *StageStruct) *ComplexContent
- func (complexcontent *ComplexContent) Unstage(stage *StageStruct) *ComplexContent
- func (complexcontent *ComplexContent) UnstageVoid(stage *StageStruct)
- type ComplexContent_WOP
- type ComplexType
- func (complextype *ComplexType) Checkout(stage *StageStruct) *ComplexType
- func (complextype *ComplexType) Commit(stage *StageStruct) *ComplexType
- func (complextype *ComplexType) CommitVoid(stage *StageStruct)
- func (from *ComplexType) CopyBasicFields(to *ComplexType)
- func (complextype *ComplexType) GetName() (res string)
- func (ct *ComplexType) Setup()
- func (complextype *ComplexType) Stage(stage *StageStruct) *ComplexType
- func (complextype *ComplexType) Unstage(stage *StageStruct) *ComplexType
- func (complextype *ComplexType) UnstageVoid(stage *StageStruct)
- type ComplexTypeModel
- type ComplexType_WOP
- type DefaultOpenContent
- type DefaultOpenContent_A_ComplexType
- type DefaultOpenContent_A_ComplexType_A_Sequence
- type Documentation
- func (documentation *Documentation) Checkout(stage *StageStruct) *Documentation
- func (documentation *Documentation) Commit(stage *StageStruct) *Documentation
- func (documentation *Documentation) CommitVoid(stage *StageStruct)
- func (from *Documentation) CopyBasicFields(to *Documentation)
- func (documentation *Documentation) GetName() (res string)
- func (documentation *Documentation) Stage(stage *StageStruct) *Documentation
- func (documentation *Documentation) Unstage(stage *StageStruct) *Documentation
- func (documentation *Documentation) UnstageVoid(stage *StageStruct)
- type Documentation_WOP
- type ExcelizeTabulator
- type Foo
- type GONG__ExpressionType
- type GONG__Identifier
- type GongStructInterface
- type Gongstruct
- type GongstructEnumIntField
- type GongstructEnumStringField
- type GongstructMapString
- type GongstructSet
- type GongtructBasicField
- type OnAfterCreateInterface
- type OnAfterDeleteInterface
- type OnAfterReadInterface
- type OnAfterUpdateInterface
- type OnInitCommitInterface
- type PointerToGongstruct
- type PointerToGongstructEnumIntField
- type PointerToGongstructEnumStringField
- type Redefinable
- type ReverseField
- type Schema
- func (schema *Schema) Checkout(stage *StageStruct) *Schema
- func (schema *Schema) Commit(stage *StageStruct) *Schema
- func (schema *Schema) CommitVoid(stage *StageStruct)
- func (from *Schema) CopyBasicFields(to *Schema)
- func (schema *Schema) GetName() (res string)
- func (schema *Schema) Setup()
- func (schema *Schema) Stage(stage *StageStruct) *Schema
- func (schema *Schema) Unstage(stage *StageStruct) *Schema
- func (schema *Schema) UnstageVoid(stage *StageStruct)
- type SchemaTop
- type SchemaTop_Choice
- type Schema_A_ComplexType
- type Schema_A_ComplexType_A_ComplexContent
- type Schema_A_ComplexType_A_ComplexContent_A_Extension
- type Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence
- type Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence1
- type Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence2
- type Schema_WOP
- type StageStruct
- func (stage *StageStruct) Backup(dirPath string)
- func (stage *StageStruct) BackupXL(dirPath string)
- func (stage *StageStruct) Checkout()
- func (stage *StageStruct) Commit()
- func (stage *StageStruct) CommitWithSuspendedCallbacks()
- func (stage *StageStruct) ComputeReverseMaps()
- func (stage *StageStruct) GetPath() string
- func (stage *StageStruct) GetType() string
- func (stage *StageStruct) IsStagedAnnotation(annotation *Annotation) (ok bool)
- func (stage *StageStruct) IsStagedComplexContent(complexcontent *ComplexContent) (ok bool)
- func (stage *StageStruct) IsStagedComplexType(complextype *ComplexType) (ok bool)
- func (stage *StageStruct) IsStagedDocumentation(documentation *Documentation) (ok bool)
- func (stage *StageStruct) IsStagedSchema(schema *Schema) (ok bool)
- func (stage *StageStruct) Marshall(file *os.File, modelsPackageName, packageName string)
- func (stage *StageStruct) Nil()
- func (stage *StageStruct) Reset()
- func (stage *StageStruct) Restore(dirPath string)
- func (stage *StageStruct) RestoreXL(dirPath string)
- func (stage *StageStruct) StageBranchAnnotation(annotation *Annotation)
- func (stage *StageStruct) StageBranchComplexContent(complexcontent *ComplexContent)
- func (stage *StageStruct) StageBranchComplexType(complextype *ComplexType)
- func (stage *StageStruct) StageBranchDocumentation(documentation *Documentation)
- func (stage *StageStruct) StageBranchSchema(schema *Schema)
- func (stage *StageStruct) Unstage()
- func (stage *StageStruct) UnstageBranchAnnotation(annotation *Annotation)
- func (stage *StageStruct) UnstageBranchComplexContent(complexcontent *ComplexContent)
- func (stage *StageStruct) UnstageBranchComplexType(complextype *ComplexType)
- func (stage *StageStruct) UnstageBranchDocumentation(documentation *Documentation)
- func (stage *StageStruct) UnstageBranchSchema(schema *Schema)
- type Tabulator
Constants ¶
const IdentifiersDecls = `
{{Identifier}} := (&models.{{GeneratedStructName}}{Name: ` + "`" + `{{GeneratedFieldNameValue}}` + "`" + `}).Stage(stage)`
const NumberInitStatement = `
{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
const PointerFieldInitStatement = `
{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
const SliceOfPointersFieldInitStatement = `
{{Identifier}}.{{GeneratedFieldName}} = append({{Identifier}}.{{GeneratedFieldName}}, {{GeneratedFieldNameValue}})`
const StringEnumInitStatement = `
{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
const StringInitStatement = `
{{Identifier}}.{{GeneratedFieldName}} = ` + "`" + `{{GeneratedFieldNameValue}}` + "`"
const TimeInitStatement = `` /* 129-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func AfterCreateFromFront ¶
func AfterCreateFromFront[Type Gongstruct](stage *StageStruct, instance *Type)
AfterCreateFromFront is called after a create from front
func AfterDeleteFromFront ¶
func AfterDeleteFromFront[Type Gongstruct](stage *StageStruct, staged, front *Type)
AfterDeleteFromFront is called after a delete from front
func AfterReadFromFront ¶
func AfterReadFromFront[Type Gongstruct](stage *StageStruct, instance *Type)
AfterReadFromFront is called after a Read from front
func AfterUpdateFromFront ¶
func AfterUpdateFromFront[Type Gongstruct](stage *StageStruct, old, new *Type)
AfterUpdateFromFront is called after a update from front
func CompareGongstructByName ¶
func CompareGongstructByName[T PointerToGongstruct](a, b T) int
func CopyBranch ¶
func CopyBranch[Type Gongstruct](from *Type) (to *Type)
CopyBranch stages instance and apply CopyBranch on all gongstruct instances that are referenced by pointers or slices of pointers of the instance
the algorithm stops along the course of graph if a vertex is already staged
func EvictInOtherSlices ¶
func EvictInOtherSlices[OwningType PointerToGongstruct, FieldType PointerToGongstruct]( stage *StageStruct, owningInstance OwningType, sliceField []FieldType, fieldName string)
EvictInOtherSlices allows for adherance between the gong association model and go.
Says you have a Astruct struct with a slice field "anarrayofb []*Bstruct"
go allows many Astruct instance to have the anarrayofb field that have the same pointers. go slices are MANY-MANY association.
With gong it is only ZERO-ONE-MANY associations, a Bstruct can be pointed only once by an Astruct instance through a given field. This follows the requirement that gong is suited for full stack programming and therefore the association is encoded as a reverse pointer (not as a joint table). In gong, a named struct is translated in a table and each table is a named struct.
EvictInOtherSlices removes the fields instances from other fields of other instance
Note : algo is in O(N)log(N) of nb of Astruct and Bstruct instances
func GetAssociationName ¶
func GetAssociationName[Type Gongstruct]() *Type
GetAssociationName is a generic function that returns an instance of Type where each association is filled with an instance whose name is the name of the association
This function can be handy for generating navigation function that are refactorable
func GetFieldStringValue ¶
func GetFieldStringValue[Type Gongstruct](instance Type, fieldName string) (res string)
func GetFieldStringValueFromPointer ¶
func GetFieldStringValueFromPointer[Type PointerToGongstruct](instance Type, fieldName string) (res string)
func GetFields ¶
func GetFields[Type Gongstruct]() (res []string)
GetFields return the array of the fields
func GetFieldsFromPointer ¶
func GetFieldsFromPointer[Type PointerToGongstruct]() (res []string)
GetFieldsFromPointer return the array of the fields
func GetGongstrucsSorted ¶
func GetGongstrucsSorted[T PointerToGongstruct](stage *StageStruct) (sortedSlice []T)
func GetGongstructInstancesMap ¶
func GetGongstructInstancesMap[Type Gongstruct](stage *StageStruct) *map[string]*Type
GetGongstructInstancesMap returns the map of staged GongstructType instances it is usefull because it allows refactoring of gong struct identifier
func GetGongstructInstancesSet ¶
func GetGongstructInstancesSet[Type Gongstruct](stage *StageStruct) *map[*Type]any
GetGongstructInstancesSet returns the set staged GongstructType instances it is usefull because it allows refactoring of gongstruct identifier
func GetGongstructInstancesSetFromPointerType ¶
func GetGongstructInstancesSetFromPointerType[Type PointerToGongstruct](stage *StageStruct) *map[Type]any
GetGongstructInstancesSetFromPointerType returns the set staged GongstructType instances it is usefull because it allows refactoring of gongstruct identifier
func GetGongstructName ¶
func GetGongstructName[Type Gongstruct]() (res string)
GetGongstructName returns the name of the Gongstruct this can be usefull if one want program robust to refactoring
func GetPointerReverseMap ¶
func GetPointerReverseMap[Start, End Gongstruct](fieldname string, stage *StageStruct) map[*End][]*Start
GetPointerReverseMap allows backtrack navigation of any Start.Fieldname associations (0..1) that is a pointer from one staged Gongstruct (type Start) instances to another (type End)
The function provides a map with keys as instances of End and values to arrays of *Start the map is construed by iterating over all Start instances and populationg keys with End instances and values with slice of Start instances
func GetPointerToGongstructName ¶
func GetPointerToGongstructName[Type PointerToGongstruct]() (res string)
GetPointerToGongstructName returns the name of the Gongstruct this can be usefull if one want program robust to refactoring
func GetSliceOfPointersReverseMap ¶
func GetSliceOfPointersReverseMap[Start, End Gongstruct](fieldname string, stage *StageStruct) map[*End]*Start
GetSliceOfPointersReverseMap allows backtrack navigation of any Start.Fieldname associations (0..N) between one staged Gongstruct instances and many others
The function provides a map with keys as instances of End and values to *Start instances the map is construed by iterating over all Start instances and populating keys with End instances and values with the Start instances
func GongGetMap ¶
func GongGetMap[Type GongstructMapString](stage *StageStruct) *Type
GongGetMap returns the map of staged GongstructType instances it is usefull because it allows refactoring of gong struct identifier
func GongGetSet ¶
func GongGetSet[Type GongstructSet](stage *StageStruct) *Type
GongGetSet returns the set staged GongstructType instances it is usefull because it allows refactoring of gong struct identifier
func IntToLetters ¶
func IsStaged ¶
func IsStaged[Type Gongstruct](stage *StageStruct, instance *Type) (ok bool)
func ParseAstFile ¶
func ParseAstFile(stage *StageStruct, pathToFile string) error
ParseAstFile Parse pathToFile and stages all instances declared in the file
func ParseAstFileFromAst ¶
ParseAstFile Parse pathToFile and stages all instances declared in the file
func ReplaceOldDeclarationsInFile ¶
ReplaceOldDeclarationsInFile replaces specific text in a file at the given path.
func Serialize ¶
func Serialize[Type Gongstruct](stage *StageStruct, tab Tabulator)
func SerializeExcelize ¶
func SerializeExcelize[Type Gongstruct](stage *StageStruct, f *excelize.File)
func SerializeStage ¶
func SerializeStage(stage *StageStruct, filename string)
func SetCallbackAfterCreateFromFront ¶
func SetCallbackAfterCreateFromFront[Type Gongstruct](stage *StageStruct, callback OnAfterCreateInterface[Type])
func SetCallbackAfterDeleteFromFront ¶
func SetCallbackAfterDeleteFromFront[Type Gongstruct](stage *StageStruct, callback OnAfterDeleteInterface[Type])
func SetCallbackAfterReadFromFront ¶
func SetCallbackAfterReadFromFront[Type Gongstruct](stage *StageStruct, callback OnAfterReadInterface[Type])
func SetCallbackAfterUpdateFromFront ¶
func SetCallbackAfterUpdateFromFront[Type Gongstruct](stage *StageStruct, callback OnAfterUpdateInterface[Type])
SetCallbackAfterUpdateFromFront is a function to set up callback that is robust to refactoring
func SetOrchestratorOnAfterUpdate ¶
func SetOrchestratorOnAfterUpdate[Type Gongstruct](stage *StageStruct)
func SortGongstructSetByName ¶
func SortGongstructSetByName[T PointerToGongstruct](set map[T]any) (sortedSlice []T)
func StageBranch ¶
func StageBranch[Type Gongstruct](stage *StageStruct, instance *Type)
StageBranch stages instance and apply StageBranch on all gongstruct instances that are referenced by pointers or slices of pointers of the instance
the algorithm stops along the course of graph if a vertex is already staged
func UnmarshallGongstructStaging ¶
func UnmarshallGongstructStaging(stage *StageStruct, cmap *ast.CommentMap, assignStmt *ast.AssignStmt, astCoordinate_ string) ( instance any, identifier string, gongstructName string, fieldName string)
UnmarshallGoStaging unmarshall a go assign statement
func UnstageBranch ¶
func UnstageBranch[Type Gongstruct](stage *StageStruct, instance *Type)
UnstageBranch stages instance and apply UnstageBranch on all gongstruct instances that are referenced by pointers or slices of pointers of the insance
the algorithm stops along the course of graph if a vertex is already staged
Types ¶
type AllModelsStructCreateInterface ¶
type AllModelsStructCreateInterface interface { CreateORMAnnotation(Annotation *Annotation) CreateORMComplexContent(ComplexContent *ComplexContent) CreateORMComplexType(ComplexType *ComplexType) CreateORMDocumentation(Documentation *Documentation) CreateORMSchema(Schema *Schema) }
swagger:ignore
type AllModelsStructDeleteInterface ¶
type AllModelsStructDeleteInterface interface { DeleteORMAnnotation(Annotation *Annotation) DeleteORMComplexContent(ComplexContent *ComplexContent) DeleteORMComplexType(ComplexType *ComplexType) DeleteORMDocumentation(Documentation *Documentation) DeleteORMSchema(Schema *Schema) }
type Annotated ¶
type Annotated struct {
Annotation *Annotation `xml:"annotation"`
}
type Annotation ¶
type Annotation struct { Name string Documentations []*Documentation `xml:"documentation"` }
func CopyBranchAnnotation ¶
func CopyBranchAnnotation(mapOrigCopy map[any]any, annotationFrom *Annotation) (annotationTo *Annotation)
insertion point for stage branch per struct
func (*Annotation) Checkout ¶
func (annotation *Annotation) Checkout(stage *StageStruct) *Annotation
Checkout annotation to the back repo (if it is already staged)
func (*Annotation) Commit ¶
func (annotation *Annotation) Commit(stage *StageStruct) *Annotation
commit annotation to the back repo (if it is already staged)
func (*Annotation) CommitVoid ¶
func (annotation *Annotation) CommitVoid(stage *StageStruct)
func (*Annotation) CopyBasicFields ¶
func (from *Annotation) CopyBasicFields(to *Annotation)
func (*Annotation) GetName ¶
func (annotation *Annotation) GetName() (res string)
for satisfaction of GongStruct interface
func (*Annotation) Stage ¶
func (annotation *Annotation) Stage(stage *StageStruct) *Annotation
insertion point for cumulative sub template with model space calls Stage puts annotation to the model stage
func (*Annotation) Unstage ¶
func (annotation *Annotation) Unstage(stage *StageStruct) *Annotation
Unstage removes annotation off the model stage
func (*Annotation) UnstageVoid ¶
func (annotation *Annotation) UnstageVoid(stage *StageStruct)
UnstageVoid removes annotation off the model stage
type BackRepoInterface ¶
type BackRepoInterface interface { Commit(stage *StageStruct) Checkout(stage *StageStruct) Backup(stage *StageStruct, dirPath string) Restore(stage *StageStruct, dirPath string) BackupXL(stage *StageStruct, dirPath string) RestoreXL(stage *StageStruct, dirPath string) // insertion point for Commit and Checkout signatures CommitAnnotation(annotation *Annotation) CheckoutAnnotation(annotation *Annotation) CommitComplexContent(complexcontent *ComplexContent) CheckoutComplexContent(complexcontent *ComplexContent) CommitComplexType(complextype *ComplexType) CheckoutComplexType(complextype *ComplexType) CommitDocumentation(documentation *Documentation) CheckoutDocumentation(documentation *Documentation) CommitSchema(schema *Schema) CheckoutSchema(schema *Schema) GetLastCommitFromBackNb() uint GetLastPushFromFrontNb() uint }
type ComplexContent ¶
type ComplexContent struct {
Name string
}
func CopyBranchComplexContent ¶
func CopyBranchComplexContent(mapOrigCopy map[any]any, complexcontentFrom *ComplexContent) (complexcontentTo *ComplexContent)
func (*ComplexContent) Checkout ¶
func (complexcontent *ComplexContent) Checkout(stage *StageStruct) *ComplexContent
Checkout complexcontent to the back repo (if it is already staged)
func (*ComplexContent) Commit ¶
func (complexcontent *ComplexContent) Commit(stage *StageStruct) *ComplexContent
commit complexcontent to the back repo (if it is already staged)
func (*ComplexContent) CommitVoid ¶
func (complexcontent *ComplexContent) CommitVoid(stage *StageStruct)
func (*ComplexContent) CopyBasicFields ¶
func (from *ComplexContent) CopyBasicFields(to *ComplexContent)
func (*ComplexContent) GetName ¶
func (complexcontent *ComplexContent) GetName() (res string)
for satisfaction of GongStruct interface
func (*ComplexContent) Stage ¶
func (complexcontent *ComplexContent) Stage(stage *StageStruct) *ComplexContent
Stage puts complexcontent to the model stage
func (*ComplexContent) Unstage ¶
func (complexcontent *ComplexContent) Unstage(stage *StageStruct) *ComplexContent
Unstage removes complexcontent off the model stage
func (*ComplexContent) UnstageVoid ¶
func (complexcontent *ComplexContent) UnstageVoid(stage *StageStruct)
UnstageVoid removes complexcontent off the model stage
type ComplexContent_WOP ¶
type ComplexContent_WOP struct { // insertion point Name string }
type ComplexType ¶
type ComplexType struct {
Name string
}
func CopyBranchComplexType ¶
func CopyBranchComplexType(mapOrigCopy map[any]any, complextypeFrom *ComplexType) (complextypeTo *ComplexType)
func (*ComplexType) Checkout ¶
func (complextype *ComplexType) Checkout(stage *StageStruct) *ComplexType
Checkout complextype to the back repo (if it is already staged)
func (*ComplexType) Commit ¶
func (complextype *ComplexType) Commit(stage *StageStruct) *ComplexType
commit complextype to the back repo (if it is already staged)
func (*ComplexType) CommitVoid ¶
func (complextype *ComplexType) CommitVoid(stage *StageStruct)
func (*ComplexType) CopyBasicFields ¶
func (from *ComplexType) CopyBasicFields(to *ComplexType)
func (*ComplexType) GetName ¶
func (complextype *ComplexType) GetName() (res string)
for satisfaction of GongStruct interface
func (*ComplexType) Setup ¶
func (ct *ComplexType) Setup()
func (*ComplexType) Stage ¶
func (complextype *ComplexType) Stage(stage *StageStruct) *ComplexType
Stage puts complextype to the model stage
func (*ComplexType) Unstage ¶
func (complextype *ComplexType) Unstage(stage *StageStruct) *ComplexType
Unstage removes complextype off the model stage
func (*ComplexType) UnstageVoid ¶
func (complextype *ComplexType) UnstageVoid(stage *StageStruct)
UnstageVoid removes complextype off the model stage
type ComplexTypeModel ¶
type ComplexTypeModel struct { }
type ComplexType_WOP ¶
type ComplexType_WOP struct { // insertion point Name string }
type DefaultOpenContent ¶
type DefaultOpenContent struct {
DefaultOpenContent_A_ComplexType
}
this is for any attributes
type DefaultOpenContent_A_ComplexType ¶
type DefaultOpenContent_A_ComplexType struct { }
type DefaultOpenContent_A_ComplexType_A_Sequence ¶
type DefaultOpenContent_A_ComplexType_A_Sequence struct { }
<xs:complexType name="wildcard">
<xs:complexContent> <xs:extension base="xs:annotated"> <xs:attributeGroup ref="xs:anyAttrGroup" /> </xs:extension> </xs:complexContent>
</xs:complexType>
type Documentation ¶
type Documentation struct { Name string Text string `xml:",chardata"` Source string `xml:"source,attr"` Lang string `xml:"lang,attr"` }
func CopyBranchDocumentation ¶
func CopyBranchDocumentation(mapOrigCopy map[any]any, documentationFrom *Documentation) (documentationTo *Documentation)
func (*Documentation) Checkout ¶
func (documentation *Documentation) Checkout(stage *StageStruct) *Documentation
Checkout documentation to the back repo (if it is already staged)
func (*Documentation) Commit ¶
func (documentation *Documentation) Commit(stage *StageStruct) *Documentation
commit documentation to the back repo (if it is already staged)
func (*Documentation) CommitVoid ¶
func (documentation *Documentation) CommitVoid(stage *StageStruct)
func (*Documentation) CopyBasicFields ¶
func (from *Documentation) CopyBasicFields(to *Documentation)
func (*Documentation) GetName ¶
func (documentation *Documentation) GetName() (res string)
for satisfaction of GongStruct interface
func (*Documentation) Stage ¶
func (documentation *Documentation) Stage(stage *StageStruct) *Documentation
Stage puts documentation to the model stage
func (*Documentation) Unstage ¶
func (documentation *Documentation) Unstage(stage *StageStruct) *Documentation
Unstage removes documentation off the model stage
func (*Documentation) UnstageVoid ¶
func (documentation *Documentation) UnstageVoid(stage *StageStruct)
UnstageVoid removes documentation off the model stage
type Documentation_WOP ¶
type ExcelizeTabulator ¶
type ExcelizeTabulator struct {
// contains filtered or unexported fields
}
func (*ExcelizeTabulator) AddCell ¶
func (tab *ExcelizeTabulator) AddCell(sheetName string, rowId, columnIndex int, value string)
func (*ExcelizeTabulator) AddRow ¶
func (tab *ExcelizeTabulator) AddRow(sheetName string) (rowId int)
func (*ExcelizeTabulator) AddSheet ¶
func (tab *ExcelizeTabulator) AddSheet(sheetName string)
func (*ExcelizeTabulator) SetExcelizeFile ¶
func (tab *ExcelizeTabulator) SetExcelizeFile(f *excelize.File)
type GONG__ExpressionType ¶
type GONG__ExpressionType string
swagger:ignore
const ( GONG__STRUCT_INSTANCE GONG__ExpressionType = "STRUCT_INSTANCE" GONG__FIELD_OR_CONST_VALUE GONG__ExpressionType = "FIELD_OR_CONST_VALUE" GONG__FIELD_VALUE GONG__ExpressionType = "FIELD_VALUE" GONG__ENUM_CAST_INT GONG__ExpressionType = "ENUM_CAST_INT" GONG__ENUM_CAST_STRING GONG__ExpressionType = "ENUM_CAST_STRING" GONG__IDENTIFIER_CONST GONG__ExpressionType = "IDENTIFIER_CONST" )
type GONG__Identifier ¶
type GONG__Identifier struct { Ident string Type GONG__ExpressionType }
type GongStructInterface ¶
type GongStructInterface interface {
GetName() (res string)
}
GongStructInterface is the interface met by GongStructs It allows runtime reflexion of instances (without the hassle of the "reflect" package)
type Gongstruct ¶
type Gongstruct interface { }
Gongstruct is the type parameter for generated generic function that allows - access to staged instances - navigation between staged instances by going backward association links between gongstruct - full refactoring of Gongstruct identifiers / fields
type GongstructEnumIntField ¶
type GongstructMapString ¶
type GongstructSet ¶
type GongtructBasicField ¶
type OnAfterCreateInterface ¶
type OnAfterCreateInterface[Type Gongstruct] interface { OnAfterCreate(stage *StageStruct, instance *Type) }
OnAfterCreateInterface callback when an instance is updated from the front
type OnAfterDeleteInterface ¶
type OnAfterDeleteInterface[Type Gongstruct] interface { OnAfterDelete(stage *StageStruct, staged, front *Type) }
OnAfterDeleteInterface callback when an instance is updated from the front
type OnAfterReadInterface ¶
type OnAfterReadInterface[Type Gongstruct] interface { OnAfterRead(stage *StageStruct, instance *Type) }
OnAfterReadInterface callback when an instance is updated from the front
type OnAfterUpdateInterface ¶
type OnAfterUpdateInterface[Type Gongstruct] interface { OnAfterUpdate(stage *StageStruct, old, new *Type) }
OnAfterUpdateInterface callback when an instance is updated from the front
type OnInitCommitInterface ¶
type OnInitCommitInterface interface {
BeforeCommit(stage *StageStruct)
}
type PointerToGongstruct ¶
type PointerToGongstruct interface { GetName() string CommitVoid(*StageStruct) UnstageVoid(stage *StageStruct) comparable }
Gongstruct is the type parameter for generated generic function that allows - access to staged instances - navigation between staged instances by going backward association links between gongstruct - full refactoring of Gongstruct identifiers / fields
type Redefinable ¶
type Redefinable struct {
ComplexType *ComplexType `xml:"complexType"`
}
<xs:group name="redefinable">
<xs:annotation> <xs:documentation> This group is for the elements which can self-redefine (see redefine below). </xs:documentation> </xs:annotation> <xs:choice> <xs:element ref="xs:simpleType" /> <xs:element ref="xs:complexType" /> <xs:element ref="xs:group" /> <xs:element ref="xs:attributeGroup" /> </xs:choice>
</xs:group>
type ReverseField ¶
func GetReverseFields ¶
func GetReverseFields[Type Gongstruct]() (res []ReverseField)
type Schema ¶
type Schema struct { Name string Xs string `xml:"xs,attr"` Annotated Schema_A_ComplexType }
<xs:element name="schema" id="schema"> <xs:annotation>
<xs:documentation source="../structures/structures.html#element-schema" />
</xs:annotation> <xs:complexType>
<xs:complexContent> <xs:extension base="xs:openAttrs"> <xs:sequence> <xs:group ref="xs:composition" minOccurs="0" maxOccurs="unbounded" /> <xs:sequence minOccurs="0"> <xs:element ref="xs:defaultOpenContent" /> <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:group ref="xs:schemaTop" /> <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:sequence> <xs:attribute name="targetNamespace" type="xs:anyURI" /> <xs:attribute name="version" type="xs:token" /> <xs:attribute name="finalDefault" type="xs:fullDerivationSet" default="" use="optional" /> <xs:attribute name="blockDefault" type="xs:blockSet" default="" use="optional" /> <xs:attribute name="attributeFormDefault" type="xs:formChoice" default="unqualified" use="optional" /> <xs:attribute name="elementFormDefault" type="xs:formChoice" default="unqualified" use="optional" /> <xs:attribute name="defaultAttributes" type="xs:QName" /> <xs:attribute name="xpathDefaultNamespace" type="xs:xpathDefaultNamespace" default="##local" use="optional" /> <xs:attribute name="id" type="xs:ID" /> <xs:attribute ref="xml:lang" /> </xs:extension> </xs:complexContent>
</xs:complexType> .. </xs:element>
func CopyBranchSchema ¶
func (*Schema) Checkout ¶
func (schema *Schema) Checkout(stage *StageStruct) *Schema
Checkout schema to the back repo (if it is already staged)
func (*Schema) Commit ¶
func (schema *Schema) Commit(stage *StageStruct) *Schema
commit schema to the back repo (if it is already staged)
func (*Schema) CommitVoid ¶
func (schema *Schema) CommitVoid(stage *StageStruct)
func (*Schema) CopyBasicFields ¶
func (*Schema) Stage ¶
func (schema *Schema) Stage(stage *StageStruct) *Schema
Stage puts schema to the model stage
func (*Schema) Unstage ¶
func (schema *Schema) Unstage(stage *StageStruct) *Schema
Unstage removes schema off the model stage
func (*Schema) UnstageVoid ¶
func (schema *Schema) UnstageVoid(stage *StageStruct)
UnstageVoid removes schema off the model stage
type SchemaTop ¶
type SchemaTop struct {
SchemaTop_Choice
}
<xs:group name="schemaTop">
<xs:annotation> <xs:documentation> This group is for the elements which occur freely at the top level of schemas. All of their types are based on the "annotated" type by extension. </xs:documentation> </xs:annotation> <xs:choice> <xs:group ref="xs:redefinable" /> <xs:element ref="xs:element" /> <xs:element ref="xs:attribute" /> <xs:element ref="xs:notation" /> </xs:choice>
</xs:group>
type SchemaTop_Choice ¶
type SchemaTop_Choice struct {
Redefinable
}
type Schema_A_ComplexType ¶
type Schema_A_ComplexType struct { Schema_A_ComplexType_A_ComplexContentDummy int Schema_A_ComplexType_A_ComplexContent }
type Schema_A_ComplexType_A_ComplexContent ¶
type Schema_A_ComplexType_A_ComplexContent struct {
Schema_A_ComplexType_A_ComplexContent_A_Extension
}
type Schema_A_ComplexType_A_ComplexContent_A_Extension ¶
type Schema_A_ComplexType_A_ComplexContent_A_Extension struct { Schema_A_ComplexType_A_ComplexContent_A_Extension_SequenceDummy int Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence }
type Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence ¶
type Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence struct { Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence1 Sequence2 struct { ComplexType *ComplexType `xml:"complexType"` } `xml:",inline"` }
type Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence1 ¶
type Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence1 struct { Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence1Dummy int // shall i have a pointer or just a composition to reflect // that minOccurs // A pointer would help to have a Annotation at each level // composition is easier to understand DefaultOpenContent }
type Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence2 ¶
type Schema_A_ComplexType_A_ComplexContent_A_Extension_Sequence_Sequence2 struct {
SchemaTop
}
type Schema_WOP ¶
type StageStruct ¶
type StageStruct struct { // insertion point for definition of arrays registering instances Annotations map[*Annotation]any Annotations_mapString map[string]*Annotation // insertion point for slice of pointers maps Annotation_Documentations_reverseMap map[*Documentation]*Annotation OnAfterAnnotationCreateCallback OnAfterCreateInterface[Annotation] OnAfterAnnotationUpdateCallback OnAfterUpdateInterface[Annotation] OnAfterAnnotationDeleteCallback OnAfterDeleteInterface[Annotation] OnAfterAnnotationReadCallback OnAfterReadInterface[Annotation] ComplexContents map[*ComplexContent]any ComplexContents_mapString map[string]*ComplexContent // insertion point for slice of pointers maps OnAfterComplexContentCreateCallback OnAfterCreateInterface[ComplexContent] OnAfterComplexContentUpdateCallback OnAfterUpdateInterface[ComplexContent] OnAfterComplexContentDeleteCallback OnAfterDeleteInterface[ComplexContent] OnAfterComplexContentReadCallback OnAfterReadInterface[ComplexContent] ComplexTypes map[*ComplexType]any ComplexTypes_mapString map[string]*ComplexType // insertion point for slice of pointers maps OnAfterComplexTypeCreateCallback OnAfterCreateInterface[ComplexType] OnAfterComplexTypeUpdateCallback OnAfterUpdateInterface[ComplexType] OnAfterComplexTypeDeleteCallback OnAfterDeleteInterface[ComplexType] OnAfterComplexTypeReadCallback OnAfterReadInterface[ComplexType] Documentations map[*Documentation]any Documentations_mapString map[string]*Documentation // insertion point for slice of pointers maps OnAfterDocumentationCreateCallback OnAfterCreateInterface[Documentation] OnAfterDocumentationUpdateCallback OnAfterUpdateInterface[Documentation] OnAfterDocumentationDeleteCallback OnAfterDeleteInterface[Documentation] OnAfterDocumentationReadCallback OnAfterReadInterface[Documentation] Schemas map[*Schema]any Schemas_mapString map[string]*Schema // insertion point for slice of pointers maps OnAfterSchemaCreateCallback OnAfterCreateInterface[Schema] OnAfterSchemaUpdateCallback OnAfterUpdateInterface[Schema] OnAfterSchemaDeleteCallback OnAfterDeleteInterface[Schema] OnAfterSchemaReadCallback OnAfterReadInterface[Schema] AllModelsStructCreateCallback AllModelsStructCreateInterface AllModelsStructDeleteCallback AllModelsStructDeleteInterface BackRepo BackRepoInterface // if set will be called before each commit to the back repo OnInitCommitCallback OnInitCommitInterface OnInitCommitFromFrontCallback OnInitCommitInterface OnInitCommitFromBackCallback OnInitCommitInterface // store the number of instance per gongstruct Map_GongStructName_InstancesNb map[string]int // store meta package import MetaPackageImportPath string MetaPackageImportAlias string // to be removed after fix of [issue](https://github.com/golang/go/issues/57559) // map to enable docLink renaming when an identifier is renamed Map_DocLink_Renaming map[string]GONG__Identifier // contains filtered or unexported fields }
StageStruct enables storage of staged instances swagger:ignore
func NewStage ¶
func NewStage(path string) (stage *StageStruct)
func (*StageStruct) Backup ¶
func (stage *StageStruct) Backup(dirPath string)
backup generates backup files in the dirPath
func (*StageStruct) BackupXL ¶
func (stage *StageStruct) BackupXL(dirPath string)
backup generates backup files in the dirPath
func (*StageStruct) Checkout ¶
func (stage *StageStruct) Checkout()
func (*StageStruct) Commit ¶
func (stage *StageStruct) Commit()
func (*StageStruct) CommitWithSuspendedCallbacks ¶
func (stage *StageStruct) CommitWithSuspendedCallbacks()
func (*StageStruct) ComputeReverseMaps ¶
func (stage *StageStruct) ComputeReverseMaps()
ComputeReverseMaps computes the reverse map, for all intances, for all slice to pointers field Its complexity is in O(n)O(p) where p is the number of pointers
func (*StageStruct) GetPath ¶
func (stage *StageStruct) GetPath() string
func (*StageStruct) GetType ¶
func (stage *StageStruct) GetType() string
func (*StageStruct) IsStagedAnnotation ¶
func (stage *StageStruct) IsStagedAnnotation(annotation *Annotation) (ok bool)
insertion point for stage per struct
func (*StageStruct) IsStagedComplexContent ¶
func (stage *StageStruct) IsStagedComplexContent(complexcontent *ComplexContent) (ok bool)
func (*StageStruct) IsStagedComplexType ¶
func (stage *StageStruct) IsStagedComplexType(complextype *ComplexType) (ok bool)
func (*StageStruct) IsStagedDocumentation ¶
func (stage *StageStruct) IsStagedDocumentation(documentation *Documentation) (ok bool)
func (*StageStruct) IsStagedSchema ¶
func (stage *StageStruct) IsStagedSchema(schema *Schema) (ok bool)
func (*StageStruct) Marshall ¶
func (stage *StageStruct) Marshall(file *os.File, modelsPackageName, packageName string)
Marshall marshall the stage content into the file as an instanciation into a stage
func (*StageStruct) Nil ¶
func (stage *StageStruct) Nil()
func (*StageStruct) Reset ¶
func (stage *StageStruct) Reset()
func (*StageStruct) Restore ¶
func (stage *StageStruct) Restore(dirPath string)
Restore resets Stage & BackRepo and restores their content from the restore files in dirPath
func (*StageStruct) RestoreXL ¶
func (stage *StageStruct) RestoreXL(dirPath string)
Restore resets Stage & BackRepo and restores their content from the restore files in dirPath
func (*StageStruct) StageBranchAnnotation ¶
func (stage *StageStruct) StageBranchAnnotation(annotation *Annotation)
insertion point for stage branch per struct
func (*StageStruct) StageBranchComplexContent ¶
func (stage *StageStruct) StageBranchComplexContent(complexcontent *ComplexContent)
func (*StageStruct) StageBranchComplexType ¶
func (stage *StageStruct) StageBranchComplexType(complextype *ComplexType)
func (*StageStruct) StageBranchDocumentation ¶
func (stage *StageStruct) StageBranchDocumentation(documentation *Documentation)
func (*StageStruct) StageBranchSchema ¶
func (stage *StageStruct) StageBranchSchema(schema *Schema)
func (*StageStruct) Unstage ¶
func (stage *StageStruct) Unstage()
func (*StageStruct) UnstageBranchAnnotation ¶
func (stage *StageStruct) UnstageBranchAnnotation(annotation *Annotation)
insertion point for unstage branch per struct
func (*StageStruct) UnstageBranchComplexContent ¶
func (stage *StageStruct) UnstageBranchComplexContent(complexcontent *ComplexContent)
func (*StageStruct) UnstageBranchComplexType ¶
func (stage *StageStruct) UnstageBranchComplexType(complextype *ComplexType)
func (*StageStruct) UnstageBranchDocumentation ¶
func (stage *StageStruct) UnstageBranchDocumentation(documentation *Documentation)
func (*StageStruct) UnstageBranchSchema ¶
func (stage *StageStruct) UnstageBranchSchema(schema *Schema)
Source Files ¶
- annotated.go
- complex_content.go
- complex_type.go
- complex_type_model.go
- default_open_content.go
- docs.go
- documentation.go
- gong.go
- gong_ast.go
- gong_callbacks.go
- gong_enum.go
- gong_graph.go
- gong_marshall.go
- gong_orchestrator.go
- gong_serialize.go
- gong_slices.go
- gong_wop.go
- redefinable.go
- schema.go
- schema_top.go