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
- Variables
- 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 GetAssociationName[Type Gongstruct]() *Type
- 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 SerializeExcelizePointerToGongstruct[Type PointerToGongstruct](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 AEnumType
- func (aenumtype AEnumType) CodeValues() (res []string)
- func (aenumtype AEnumType) Codes() (res []string)
- func (aenumtype *AEnumType) FromCodeString(input string) (err error)
- func (aenumtype *AEnumType) FromString(input string) (err error)
- func (aenumtype *AEnumType) ToCodeString() (res string)
- func (aenumtype AEnumType) ToString() (res string)
- type AllModelsStructCreateInterface
- type AllModelsStructDeleteInterface
- type Astruct
- func (astruct *Astruct) Checkout(stage *StageStruct) *Astruct
- func (astruct *Astruct) Commit(stage *StageStruct) *Astruct
- func (astruct *Astruct) CommitVoid(stage *StageStruct)
- func (from *Astruct) CopyBasicFields(to *Astruct)
- func (astruct *Astruct) GetName() (res string)
- func (astruct *Astruct) OnAfterUpdate(stage *StageStruct, stagedInstance, frontInstance *Astruct)
- func (astruct *Astruct) Stage(stage *StageStruct) *Astruct
- func (astruct *Astruct) Unstage(stage *StageStruct) *Astruct
- func (astruct *Astruct) UnstageVoid(stage *StageStruct)
- type AstructBstruct2Use
- func (astructbstruct2use *AstructBstruct2Use) Checkout(stage *StageStruct) *AstructBstruct2Use
- func (astructbstruct2use *AstructBstruct2Use) Commit(stage *StageStruct) *AstructBstruct2Use
- func (astructbstruct2use *AstructBstruct2Use) CommitVoid(stage *StageStruct)
- func (from *AstructBstruct2Use) CopyBasicFields(to *AstructBstruct2Use)
- func (astructbstruct2use *AstructBstruct2Use) GetName() (res string)
- func (astructbstruct2use *AstructBstruct2Use) Stage(stage *StageStruct) *AstructBstruct2Use
- func (astructbstruct2use *AstructBstruct2Use) Unstage(stage *StageStruct) *AstructBstruct2Use
- func (astructbstruct2use *AstructBstruct2Use) UnstageVoid(stage *StageStruct)
- type AstructBstruct2Use_WOP
- type AstructBstructUse
- func (astructbstructuse *AstructBstructUse) Checkout(stage *StageStruct) *AstructBstructUse
- func (astructbstructuse *AstructBstructUse) Commit(stage *StageStruct) *AstructBstructUse
- func (astructbstructuse *AstructBstructUse) CommitVoid(stage *StageStruct)
- func (from *AstructBstructUse) CopyBasicFields(to *AstructBstructUse)
- func (astructbstructuse *AstructBstructUse) GetName() (res string)
- func (astructbstructuse *AstructBstructUse) Stage(stage *StageStruct) *AstructBstructUse
- func (astructbstructuse *AstructBstructUse) Unstage(stage *StageStruct) *AstructBstructUse
- func (astructbstructuse *AstructBstructUse) UnstageVoid(stage *StageStruct)
- type AstructBstructUse_WOP
- type AstructOrchestrator
- type Astruct_WOP
- type BEnumType
- func (benumtype BEnumType) CodeValues() (res []string)
- func (benumtype BEnumType) Codes() (res []string)
- func (benumtype *BEnumType) FromCodeString(input string) (err error)
- func (benumtype *BEnumType) FromString(input string) (err error)
- func (benumtype *BEnumType) ToCodeString() (res string)
- func (benumtype BEnumType) ToString() (res string)
- type BackRepoInterface
- type Bstruct
- func (bstruct *Bstruct) Checkout(stage *StageStruct) *Bstruct
- func (bstruct *Bstruct) Commit(stage *StageStruct) *Bstruct
- func (bstruct *Bstruct) CommitVoid(stage *StageStruct)
- func (from *Bstruct) CopyBasicFields(to *Bstruct)
- func (bstruct *Bstruct) GetName() (res string)
- func (bstruct *Bstruct) OnAfterUpdate(stage *StageStruct, stagedInstance, frontInstance *Bstruct)
- func (bstruct *Bstruct) Stage(stage *StageStruct) *Bstruct
- func (bstruct *Bstruct) Unstage(stage *StageStruct) *Bstruct
- func (bstruct *Bstruct) UnstageVoid(stage *StageStruct)
- type BstructMap
- type BstructOrchestrator
- type Bstruct_WOP
- type CEnumTypeInt
- func (cenumtypeint CEnumTypeInt) CodeValues() (res []int)
- func (cenumtypeint CEnumTypeInt) Codes() (res []string)
- func (cenumtypeint *CEnumTypeInt) FromCodeString(input string) (err error)
- func (cenumtypeint *CEnumTypeInt) FromInt(input int) (err error)
- func (cenumtypeint *CEnumTypeInt) ToCodeString() (res string)
- func (cenumtypeint CEnumTypeInt) ToInt() (res int)
- type Cstruct
- type Dstruct
- func (dstruct *Dstruct) Checkout(stage *StageStruct) *Dstruct
- func (dstruct *Dstruct) Commit(stage *StageStruct) *Dstruct
- func (dstruct *Dstruct) CommitVoid(stage *StageStruct)
- func (from *Dstruct) CopyBasicFields(to *Dstruct)
- func (dstruct *Dstruct) GetName() (res string)
- func (dstruct *Dstruct) Stage(stage *StageStruct) *Dstruct
- func (dstruct *Dstruct) Unstage(stage *StageStruct) *Dstruct
- func (dstruct *Dstruct) UnstageVoid(stage *StageStruct)
- type Dstruct_WOP
- type Estruct
- type ExcelizeTabulator
- type Fstruct
- func (fstruct *Fstruct) Checkout(stage *StageStruct) *Fstruct
- func (fstruct *Fstruct) Commit(stage *StageStruct) *Fstruct
- func (fstruct *Fstruct) CommitVoid(stage *StageStruct)
- func (from *Fstruct) CopyBasicFields(to *Fstruct)
- func (fstruct *Fstruct) GetName() (res string)
- func (fstruct *Fstruct) Stage(stage *StageStruct) *Fstruct
- func (fstruct *Fstruct) Unstage(stage *StageStruct) *Fstruct
- func (fstruct *Fstruct) UnstageVoid(stage *StageStruct)
- type Fstruct_WOP
- type GONG__ExpressionType
- type GONG__Identifier
- type GongFieldValue
- type GongFieldValueType
- type GongStructInterface
- type Gongstruct
- type GongstructEnumIntField
- type GongstructEnumStringField
- type GongstructMapString
- type GongstructSet
- type GongtructBasicField
- type Gstruct
- func (gstruct *Gstruct) Checkout(stage *StageStruct) *Gstruct
- func (gstruct *Gstruct) Commit(stage *StageStruct) *Gstruct
- func (gstruct *Gstruct) CommitVoid(stage *StageStruct)
- func (from *Gstruct) CopyBasicFields(to *Gstruct)
- func (gstruct *Gstruct) GetName() (res string)
- func (gstruct *Gstruct) Stage(stage *StageStruct) *Gstruct
- func (gstruct *Gstruct) Unstage(stage *StageStruct) *Gstruct
- func (gstruct *Gstruct) UnstageVoid(stage *StageStruct)
- type Gstruct_WOP
- type Meta
- type OnAfterCreateInterface
- type OnAfterDeleteInterface
- type OnAfterReadInterface
- type OnAfterUpdateInterface
- type OnInitCommitInterface
- type PointerToGongstruct
- type PointerToGongstructEnumIntField
- type PointerToGongstructEnumStringField
- type ReverseField
- type StacksNames
- func (stacksnames StacksNames) CodeValues() (res []string)
- func (stacksnames StacksNames) Codes() (res []string)
- func (stacksnames *StacksNames) FromCodeString(input string) (err error)
- func (stacksnames *StacksNames) FromString(input string) (err error)
- func (stacksnames *StacksNames) ToCodeString() (res string)
- func (stacksnames StacksNames) ToString() (res string)
- 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) IsStagedAstruct(astruct *Astruct) (ok bool)
- func (stage *StageStruct) IsStagedAstructBstruct2Use(astructbstruct2use *AstructBstruct2Use) (ok bool)
- func (stage *StageStruct) IsStagedAstructBstructUse(astructbstructuse *AstructBstructUse) (ok bool)
- func (stage *StageStruct) IsStagedBstruct(bstruct *Bstruct) (ok bool)
- func (stage *StageStruct) IsStagedDstruct(dstruct *Dstruct) (ok bool)
- func (stage *StageStruct) IsStagedFstruct(fstruct *Fstruct) (ok bool)
- func (stage *StageStruct) IsStagedGstruct(gstruct *Gstruct) (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) StageBranchAstruct(astruct *Astruct)
- func (stage *StageStruct) StageBranchAstructBstruct2Use(astructbstruct2use *AstructBstruct2Use)
- func (stage *StageStruct) StageBranchAstructBstructUse(astructbstructuse *AstructBstructUse)
- func (stage *StageStruct) StageBranchBstruct(bstruct *Bstruct)
- func (stage *StageStruct) StageBranchDstruct(dstruct *Dstruct)
- func (stage *StageStruct) StageBranchFstruct(fstruct *Fstruct)
- func (stage *StageStruct) StageBranchGstruct(gstruct *Gstruct)
- func (stage *StageStruct) Unstage()
- func (stage *StageStruct) UnstageBranchAstruct(astruct *Astruct)
- func (stage *StageStruct) UnstageBranchAstructBstruct2Use(astructbstruct2use *AstructBstruct2Use)
- func (stage *StageStruct) UnstageBranchAstructBstructUse(astructbstructuse *AstructBstructUse)
- func (stage *StageStruct) UnstageBranchBstruct(bstruct *Bstruct)
- func (stage *StageStruct) UnstageBranchDstruct(dstruct *Dstruct)
- func (stage *StageStruct) UnstageBranchFstruct(fstruct *Fstruct)
- func (stage *StageStruct) UnstageBranchGstruct(gstruct *Gstruct)
- type Tabulator
Constants ¶
const CONST_OUTSIDE_GONG = time.Minute * 80
const IdentifiersDecls = `
{{Identifier}} := (&models.{{GeneratedStructName}}{}).Stage(stage)`
const NoteOnOrganisation = ""
GONGDOC(NoteOnOrganisation): and models.Bstruct, and models.Astruct, and models.Astruct.Associationtob, having the following const exported identifier allows for referencing the note from the UML note and allows for renaming
This is heading 1 ¶
## This is heading 1.1
-
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 ¶
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 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 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 SerializeExcelizePointerToGongstruct ¶
func SerializeExcelizePointerToGongstruct[Type PointerToGongstruct](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 AEnumType ¶
type AEnumType string
swagger:enum AEnumType
values for EnumType
func (AEnumType) CodeValues ¶
func (*AEnumType) FromCodeString ¶
func (*AEnumType) FromString ¶
func (*AEnumType) ToCodeString ¶
type AllModelsStructCreateInterface ¶
type AllModelsStructCreateInterface interface { CreateORMAstruct(Astruct *Astruct) CreateORMAstructBstruct2Use(AstructBstruct2Use *AstructBstruct2Use) CreateORMAstructBstructUse(AstructBstructUse *AstructBstructUse) CreateORMBstruct(Bstruct *Bstruct) CreateORMDstruct(Dstruct *Dstruct) CreateORMFstruct(Fstruct *Fstruct) CreateORMGstruct(Gstruct *Gstruct) }
swagger:ignore
type AllModelsStructDeleteInterface ¶
type AllModelsStructDeleteInterface interface { DeleteORMAstruct(Astruct *Astruct) DeleteORMAstructBstruct2Use(AstructBstruct2Use *AstructBstruct2Use) DeleteORMAstructBstructUse(AstructBstructUse *AstructBstructUse) DeleteORMBstruct(Bstruct *Bstruct) DeleteORMDstruct(Dstruct *Dstruct) DeleteORMFstruct(Fstruct *Fstruct) DeleteORMGstruct(Gstruct *Gstruct) }
type Astruct ¶
type Astruct struct { // a "Name" field is necessary to generate a GongStruct Name string // ONE-ZERO/ONE association is a supported type of gong Associationtob *Bstruct // ONE-MANY association is a supported type of gong // not that that in go, this is a MANY-MANY association. In gong, the association // is implemented in the destination of the association, therefore, a Bclass instance // is related to ZERO/ONE Aclass instance by Arrayofb field Anarrayofb []*Bstruct //gong:type this magic node means that the object points to a type // This means that when a branch is copied, the duplicate meachanism // will stop here and only duplicate the pointer, not the type Anotherassociationtob_2 *Bstruct // time.Time is a supported type of gong Date time.Time // gong:bespoketimeserializeformat "2006-01-02" Date2 time.Time // bool is a supported type of gong Booleanfield bool // enums is a supported type of gong (if they are string) Aenum AEnumType Aenum_2 AEnumType Benum BEnumType CEnum CEnumTypeInt // an embedded struct is supported (without field name) Cstruct // another embedded struct Estruct // float64 is a supported type of gong Floatfield float64 // int is a supported type of gong Intfield int Anotherbooleanfield bool Duration1 time.Duration // gong supports different fields with the same destination struct, even itself Anarrayofa []*Astruct Anotherarrayofb []*Bstruct // MANY-MANY association, (because AclassBclassUse ends with "Use") AnarrayofbUse []*AstructBstructUse Anarrayofb2Use []*AstructBstruct2Use // pointer to itself AnAstruct *Astruct // FieldRef for a field ref [pkg.Name1] //gong:ident StructRef string // FieldRef for a field ref [pkg.Name1.Name2] //gong:ident FieldRef string // docLinkRemapping "pkg.IntEnum(0)" //gong:ident [pkg.Name1] EnumIntRef string // docLinkRemapping "pkg.StringEnum("")" //gong:ident [pkg.Name1] EnumStringRef string // docLinkRemapping "pkg.Name1" //gong:ident [pkg.Name1] EnumValue string // docLinkRemapping "pkg.Name1" //gong:ident [pkg.Name1] ConstIdentifierValue string // TextFieldBespokeSize is a field with a larger form field //gong:width 600 gong:height 300 TextFieldBespokeSize string //gong:text, magic code to have the form editor have a text area instead of an input TextArea string }
Astruct demonstrate basic gong features
func CopyBranchAstruct ¶
insertion point for stage branch per struct
func (*Astruct) Checkout ¶
func (astruct *Astruct) Checkout(stage *StageStruct) *Astruct
Checkout astruct to the back repo (if it is already staged)
func (*Astruct) Commit ¶
func (astruct *Astruct) Commit(stage *StageStruct) *Astruct
commit astruct to the back repo (if it is already staged)
func (*Astruct) CommitVoid ¶
func (astruct *Astruct) CommitVoid(stage *StageStruct)
func (*Astruct) CopyBasicFields ¶
func (*Astruct) OnAfterUpdate ¶
func (astruct *Astruct) OnAfterUpdate(stage *StageStruct, stagedInstance, frontInstance *Astruct)
presence of this function will let gong generates orchestrator code
func (*Astruct) Stage ¶
func (astruct *Astruct) Stage(stage *StageStruct) *Astruct
insertion point for cumulative sub template with model space calls Stage puts astruct to the model stage
func (*Astruct) Unstage ¶
func (astruct *Astruct) Unstage(stage *StageStruct) *Astruct
Unstage removes astruct off the model stage
func (*Astruct) UnstageVoid ¶
func (astruct *Astruct) UnstageVoid(stage *StageStruct)
UnstageVoid removes astruct off the model stage
type AstructBstruct2Use ¶
type AstructBstruct2Use struct { Name string // the field of a MANY-MANY association must be the name of the destination struct Bstrcut2 *Bstruct }
func CopyBranchAstructBstruct2Use ¶
func CopyBranchAstructBstruct2Use(mapOrigCopy map[any]any, astructbstruct2useFrom *AstructBstruct2Use) (astructbstruct2useTo *AstructBstruct2Use)
func (*AstructBstruct2Use) Checkout ¶
func (astructbstruct2use *AstructBstruct2Use) Checkout(stage *StageStruct) *AstructBstruct2Use
Checkout astructbstruct2use to the back repo (if it is already staged)
func (*AstructBstruct2Use) Commit ¶
func (astructbstruct2use *AstructBstruct2Use) Commit(stage *StageStruct) *AstructBstruct2Use
commit astructbstruct2use to the back repo (if it is already staged)
func (*AstructBstruct2Use) CommitVoid ¶
func (astructbstruct2use *AstructBstruct2Use) CommitVoid(stage *StageStruct)
func (*AstructBstruct2Use) CopyBasicFields ¶
func (from *AstructBstruct2Use) CopyBasicFields(to *AstructBstruct2Use)
func (*AstructBstruct2Use) GetName ¶
func (astructbstruct2use *AstructBstruct2Use) GetName() (res string)
for satisfaction of GongStruct interface
func (*AstructBstruct2Use) Stage ¶
func (astructbstruct2use *AstructBstruct2Use) Stage(stage *StageStruct) *AstructBstruct2Use
Stage puts astructbstruct2use to the model stage
func (*AstructBstruct2Use) Unstage ¶
func (astructbstruct2use *AstructBstruct2Use) Unstage(stage *StageStruct) *AstructBstruct2Use
Unstage removes astructbstruct2use off the model stage
func (*AstructBstruct2Use) UnstageVoid ¶
func (astructbstruct2use *AstructBstruct2Use) UnstageVoid(stage *StageStruct)
UnstageVoid removes astructbstruct2use off the model stage
type AstructBstruct2Use_WOP ¶
type AstructBstruct2Use_WOP struct { // insertion point Name string }
type AstructBstructUse ¶
type AstructBstructUse struct { Name string // the field of a MANY-MANY association must be the name of the destination struct Bstruct2 *Bstruct }
AstructBstructUse is the gong way of defining a MANY-MANY association
The go generated code is the same as for any struct. The "Use" at the end of the struct name will generate something different in the front
func CopyBranchAstructBstructUse ¶
func CopyBranchAstructBstructUse(mapOrigCopy map[any]any, astructbstructuseFrom *AstructBstructUse) (astructbstructuseTo *AstructBstructUse)
func (*AstructBstructUse) Checkout ¶
func (astructbstructuse *AstructBstructUse) Checkout(stage *StageStruct) *AstructBstructUse
Checkout astructbstructuse to the back repo (if it is already staged)
func (*AstructBstructUse) Commit ¶
func (astructbstructuse *AstructBstructUse) Commit(stage *StageStruct) *AstructBstructUse
commit astructbstructuse to the back repo (if it is already staged)
func (*AstructBstructUse) CommitVoid ¶
func (astructbstructuse *AstructBstructUse) CommitVoid(stage *StageStruct)
func (*AstructBstructUse) CopyBasicFields ¶
func (from *AstructBstructUse) CopyBasicFields(to *AstructBstructUse)
func (*AstructBstructUse) GetName ¶
func (astructbstructuse *AstructBstructUse) GetName() (res string)
for satisfaction of GongStruct interface
func (*AstructBstructUse) Stage ¶
func (astructbstructuse *AstructBstructUse) Stage(stage *StageStruct) *AstructBstructUse
Stage puts astructbstructuse to the model stage
func (*AstructBstructUse) Unstage ¶
func (astructbstructuse *AstructBstructUse) Unstage(stage *StageStruct) *AstructBstructUse
Unstage removes astructbstructuse off the model stage
func (*AstructBstructUse) UnstageVoid ¶
func (astructbstructuse *AstructBstructUse) UnstageVoid(stage *StageStruct)
UnstageVoid removes astructbstructuse off the model stage
type AstructBstructUse_WOP ¶
type AstructBstructUse_WOP struct { // insertion point Name string }
type AstructOrchestrator ¶
type AstructOrchestrator struct { }
insertion point AstructOrchestrator
func (*AstructOrchestrator) OnAfterUpdate ¶
func (orchestrator *AstructOrchestrator) OnAfterUpdate( gongsvgStage *StageStruct, stagedAstruct, backRepoAstruct *Astruct)
type Astruct_WOP ¶
type Astruct_WOP struct { // insertion point Name string Date time.Time Date2 time.Time Booleanfield bool Aenum AEnumType Aenum_2 AEnumType Benum BEnumType CEnum CEnumTypeInt CName string CFloatfield float64 Floatfield float64 Intfield int Anotherbooleanfield bool Duration1 time.Duration StructRef string FieldRef string EnumIntRef string EnumStringRef string EnumValue string ConstIdentifierValue string TextFieldBespokeSize string TextArea string }
insertion point
type BEnumType ¶
type BEnumType string
swagger:enum BEnumType
values for EnumType
func (BEnumType) CodeValues ¶
func (*BEnumType) FromCodeString ¶
func (*BEnumType) FromString ¶
func (*BEnumType) ToCodeString ¶
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 CommitAstruct(astruct *Astruct) CheckoutAstruct(astruct *Astruct) CommitAstructBstruct2Use(astructbstruct2use *AstructBstruct2Use) CheckoutAstructBstruct2Use(astructbstruct2use *AstructBstruct2Use) CommitAstructBstructUse(astructbstructuse *AstructBstructUse) CheckoutAstructBstructUse(astructbstructuse *AstructBstructUse) CommitBstruct(bstruct *Bstruct) CheckoutBstruct(bstruct *Bstruct) CommitDstruct(dstruct *Dstruct) CheckoutDstruct(dstruct *Dstruct) CommitFstruct(fstruct *Fstruct) CheckoutFstruct(fstruct *Fstruct) CommitGstruct(gstruct *Gstruct) CheckoutGstruct(gstruct *Gstruct) GetLastCommitFromBackNb() uint GetLastPushFromFrontNb() uint }
type Bstruct ¶
type Bstruct struct { Name string Floatfield, Floatfield2 float64 Intfield int // swagger:ignore this field is ignored by gongc Struct interface{} `gorm:"-"` // instruction for gorm ORM // swagger:ignore // gong:ignore ToBeIgnored int }
Bstruct demonstrate basic metabaron
swagger:model Bstruct
func CopyBranchBstruct ¶
func (*Bstruct) Checkout ¶
func (bstruct *Bstruct) Checkout(stage *StageStruct) *Bstruct
Checkout bstruct to the back repo (if it is already staged)
func (*Bstruct) Commit ¶
func (bstruct *Bstruct) Commit(stage *StageStruct) *Bstruct
commit bstruct to the back repo (if it is already staged)
func (*Bstruct) CommitVoid ¶
func (bstruct *Bstruct) CommitVoid(stage *StageStruct)
func (*Bstruct) CopyBasicFields ¶
func (*Bstruct) OnAfterUpdate ¶
func (bstruct *Bstruct) OnAfterUpdate(stage *StageStruct, stagedInstance, frontInstance *Bstruct)
presence of this function will let gong generates orchestrator code
func (*Bstruct) Stage ¶
func (bstruct *Bstruct) Stage(stage *StageStruct) *Bstruct
Stage puts bstruct to the model stage
func (*Bstruct) Unstage ¶
func (bstruct *Bstruct) Unstage(stage *StageStruct) *Bstruct
Unstage removes bstruct off the model stage
func (*Bstruct) UnstageVoid ¶
func (bstruct *Bstruct) UnstageVoid(stage *StageStruct)
UnstageVoid removes bstruct off the model stage
type BstructMap ¶
BstructMap is a Map of all Bstruct via their Name
var BstructStore BstructMap = make(map[string]*Bstruct, 0)
type BstructOrchestrator ¶
type BstructOrchestrator struct { }
BstructOrchestrator
func (*BstructOrchestrator) OnAfterUpdate ¶
func (orchestrator *BstructOrchestrator) OnAfterUpdate( gongsvgStage *StageStruct, stagedBstruct, backRepoBstruct *Bstruct)
type Bstruct_WOP ¶
type CEnumTypeInt ¶
type CEnumTypeInt int
swagger:enum CEnumTypeInt
const ( CENUM_VAL1 CEnumTypeInt = iota CENUM_VAL2 )
values for EnumType
func (CEnumTypeInt) CodeValues ¶
func (cenumtypeint CEnumTypeInt) CodeValues() (res []int)
func (CEnumTypeInt) Codes ¶
func (cenumtypeint CEnumTypeInt) Codes() (res []string)
func (*CEnumTypeInt) FromCodeString ¶
func (cenumtypeint *CEnumTypeInt) FromCodeString(input string) (err error)
func (*CEnumTypeInt) FromInt ¶
func (cenumtypeint *CEnumTypeInt) FromInt(input int) (err error)
func (*CEnumTypeInt) ToCodeString ¶
func (cenumtypeint *CEnumTypeInt) ToCodeString() (res string)
func (CEnumTypeInt) ToInt ¶
func (cenumtypeint CEnumTypeInt) ToInt() (res int)
Utility function for CEnumTypeInt if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value
type Cstruct ¶
type Cstruct struct { CName string CFloatfield float64 Bstruct *Bstruct Bstruct2 *Bstruct Dstruct *Dstruct Dstruct2 *Dstruct }
Cstruct demonstrates embedded structs
type Dstruct ¶
func CopyBranchDstruct ¶
func (*Dstruct) Checkout ¶
func (dstruct *Dstruct) Checkout(stage *StageStruct) *Dstruct
Checkout dstruct to the back repo (if it is already staged)
func (*Dstruct) Commit ¶
func (dstruct *Dstruct) Commit(stage *StageStruct) *Dstruct
commit dstruct to the back repo (if it is already staged)
func (*Dstruct) CommitVoid ¶
func (dstruct *Dstruct) CommitVoid(stage *StageStruct)
func (*Dstruct) CopyBasicFields ¶
func (*Dstruct) Stage ¶
func (dstruct *Dstruct) Stage(stage *StageStruct) *Dstruct
Stage puts dstruct to the model stage
func (*Dstruct) Unstage ¶
func (dstruct *Dstruct) Unstage(stage *StageStruct) *Dstruct
Unstage removes dstruct off the model stage
func (*Dstruct) UnstageVoid ¶
func (dstruct *Dstruct) UnstageVoid(stage *StageStruct)
UnstageVoid removes dstruct off the model stage
type Dstruct_WOP ¶
type Dstruct_WOP struct { // insertion point Name string }
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 Fstruct ¶
func CopyBranchFstruct ¶
func (*Fstruct) Checkout ¶
func (fstruct *Fstruct) Checkout(stage *StageStruct) *Fstruct
Checkout fstruct to the back repo (if it is already staged)
func (*Fstruct) Commit ¶
func (fstruct *Fstruct) Commit(stage *StageStruct) *Fstruct
commit fstruct to the back repo (if it is already staged)
func (*Fstruct) CommitVoid ¶
func (fstruct *Fstruct) CommitVoid(stage *StageStruct)
func (*Fstruct) CopyBasicFields ¶
func (*Fstruct) Stage ¶
func (fstruct *Fstruct) Stage(stage *StageStruct) *Fstruct
Stage puts fstruct to the model stage
func (*Fstruct) Unstage ¶
func (fstruct *Fstruct) Unstage(stage *StageStruct) *Fstruct
Unstage removes fstruct off the model stage
func (*Fstruct) UnstageVoid ¶
func (fstruct *Fstruct) UnstageVoid(stage *StageStruct)
UnstageVoid removes fstruct off the model stage
type Fstruct_WOP ¶
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 GongFieldValue ¶
type GongFieldValue struct { GongFieldValueType // contains filtered or unexported fields }
func GetFieldStringValue ¶
func GetFieldStringValue(instance any, fieldName string) (res GongFieldValue)
func GetFieldStringValueFromPointer ¶
func GetFieldStringValueFromPointer(instance any, fieldName string) (res GongFieldValue)
func (*GongFieldValue) GetValueBool ¶
func (gongValueField *GongFieldValue) GetValueBool() bool
func (*GongFieldValue) GetValueFloat ¶
func (gongValueField *GongFieldValue) GetValueFloat() float64
func (*GongFieldValue) GetValueInt ¶
func (gongValueField *GongFieldValue) GetValueInt() int
func (*GongFieldValue) GetValueString ¶
func (gongValueField *GongFieldValue) GetValueString() string
type GongFieldValueType ¶
type GongFieldValueType string
const ( GongFieldValueTypeInt GongFieldValueType = "GongFieldValueTypeInt" GongFieldValueTypeFloat GongFieldValueType = "GongFieldValueTypeFloat" GongFieldValueTypeBool GongFieldValueType = "GongFieldValueTypeBool" GongFieldValueTypeOthers GongFieldValueType = "GongFieldValueTypeOthers" )
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 GongstructEnumIntField interface { int | CEnumTypeInt Codes() []string CodeValues() []int }
type GongstructMapString ¶
type GongstructSet ¶
type GongtructBasicField ¶
type Gstruct ¶
type Gstruct struct {
Bstruct
}
func CopyBranchGstruct ¶
func (*Gstruct) Checkout ¶
func (gstruct *Gstruct) Checkout(stage *StageStruct) *Gstruct
Checkout gstruct to the back repo (if it is already staged)
func (*Gstruct) Commit ¶
func (gstruct *Gstruct) Commit(stage *StageStruct) *Gstruct
commit gstruct to the back repo (if it is already staged)
func (*Gstruct) CommitVoid ¶
func (gstruct *Gstruct) CommitVoid(stage *StageStruct)
func (*Gstruct) CopyBasicFields ¶
func (*Gstruct) Stage ¶
func (gstruct *Gstruct) Stage(stage *StageStruct) *Gstruct
Stage puts gstruct to the model stage
func (*Gstruct) Unstage ¶
func (gstruct *Gstruct) Unstage(stage *StageStruct) *Gstruct
Unstage removes gstruct off the model stage
func (*Gstruct) UnstageVoid ¶
func (gstruct *Gstruct) UnstageVoid(stage *StageStruct)
UnstageVoid removes gstruct off the model stage
type Gstruct_WOP ¶
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 PointerToGongstructEnumIntField ¶
type PointerToGongstructEnumIntField interface { *CEnumTypeInt FromCodeString(input string) (err error) }
type ReverseField ¶
func GetReverseFields ¶
func GetReverseFields[Type Gongstruct]() (res []ReverseField)
type StacksNames ¶
type StacksNames string
const (
Test StacksNames = "test"
)
func (StacksNames) CodeValues ¶
func (stacksnames StacksNames) CodeValues() (res []string)
func (StacksNames) Codes ¶
func (stacksnames StacksNames) Codes() (res []string)
func (*StacksNames) FromCodeString ¶
func (stacksnames *StacksNames) FromCodeString(input string) (err error)
func (*StacksNames) FromString ¶
func (stacksnames *StacksNames) FromString(input string) (err error)
func (*StacksNames) ToCodeString ¶
func (stacksnames *StacksNames) ToCodeString() (res string)
func (StacksNames) ToString ¶
func (stacksnames StacksNames) ToString() (res string)
Utility function for StacksNames if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value
type StageStruct ¶
type StageStruct struct { // insertion point for definition of arrays registering instances Astructs map[*Astruct]any Astructs_mapString map[string]*Astruct // insertion point for slice of pointers maps Astruct_Anarrayofb_reverseMap map[*Bstruct]*Astruct Astruct_Dstruct4s_reverseMap map[*Dstruct]*Astruct Astruct_Anarrayofa_reverseMap map[*Astruct]*Astruct Astruct_Anotherarrayofb_reverseMap map[*Bstruct]*Astruct Astruct_AnarrayofbUse_reverseMap map[*AstructBstructUse]*Astruct Astruct_Anarrayofb2Use_reverseMap map[*AstructBstruct2Use]*Astruct OnAfterAstructCreateCallback OnAfterCreateInterface[Astruct] OnAfterAstructUpdateCallback OnAfterUpdateInterface[Astruct] OnAfterAstructDeleteCallback OnAfterDeleteInterface[Astruct] OnAfterAstructReadCallback OnAfterReadInterface[Astruct] AstructBstruct2Uses map[*AstructBstruct2Use]any AstructBstruct2Uses_mapString map[string]*AstructBstruct2Use // insertion point for slice of pointers maps OnAfterAstructBstruct2UseCreateCallback OnAfterCreateInterface[AstructBstruct2Use] OnAfterAstructBstruct2UseUpdateCallback OnAfterUpdateInterface[AstructBstruct2Use] OnAfterAstructBstruct2UseDeleteCallback OnAfterDeleteInterface[AstructBstruct2Use] OnAfterAstructBstruct2UseReadCallback OnAfterReadInterface[AstructBstruct2Use] AstructBstructUses map[*AstructBstructUse]any AstructBstructUses_mapString map[string]*AstructBstructUse // insertion point for slice of pointers maps OnAfterAstructBstructUseCreateCallback OnAfterCreateInterface[AstructBstructUse] OnAfterAstructBstructUseUpdateCallback OnAfterUpdateInterface[AstructBstructUse] OnAfterAstructBstructUseDeleteCallback OnAfterDeleteInterface[AstructBstructUse] OnAfterAstructBstructUseReadCallback OnAfterReadInterface[AstructBstructUse] Bstructs map[*Bstruct]any Bstructs_mapString map[string]*Bstruct // insertion point for slice of pointers maps OnAfterBstructCreateCallback OnAfterCreateInterface[Bstruct] OnAfterBstructUpdateCallback OnAfterUpdateInterface[Bstruct] OnAfterBstructDeleteCallback OnAfterDeleteInterface[Bstruct] OnAfterBstructReadCallback OnAfterReadInterface[Bstruct] Dstructs map[*Dstruct]any Dstructs_mapString map[string]*Dstruct // insertion point for slice of pointers maps Dstruct_Anarrayofb_reverseMap map[*Bstruct]*Dstruct Dstruct_Gstructs_reverseMap map[*Gstruct]*Dstruct OnAfterDstructCreateCallback OnAfterCreateInterface[Dstruct] OnAfterDstructUpdateCallback OnAfterUpdateInterface[Dstruct] OnAfterDstructDeleteCallback OnAfterDeleteInterface[Dstruct] OnAfterDstructReadCallback OnAfterReadInterface[Dstruct] Fstructs map[*Fstruct]any Fstructs_mapString map[string]*Fstruct // insertion point for slice of pointers maps OnAfterFstructCreateCallback OnAfterCreateInterface[Fstruct] OnAfterFstructUpdateCallback OnAfterUpdateInterface[Fstruct] OnAfterFstructDeleteCallback OnAfterDeleteInterface[Fstruct] OnAfterFstructReadCallback OnAfterReadInterface[Fstruct] Gstructs map[*Gstruct]any Gstructs_mapString map[string]*Gstruct // insertion point for slice of pointers maps OnAfterGstructCreateCallback OnAfterCreateInterface[Gstruct] OnAfterGstructUpdateCallback OnAfterUpdateInterface[Gstruct] OnAfterGstructDeleteCallback OnAfterDeleteInterface[Gstruct] OnAfterGstructReadCallback OnAfterReadInterface[Gstruct] 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) IsStagedAstruct ¶
func (stage *StageStruct) IsStagedAstruct(astruct *Astruct) (ok bool)
insertion point for stage per struct
func (*StageStruct) IsStagedAstructBstruct2Use ¶
func (stage *StageStruct) IsStagedAstructBstruct2Use(astructbstruct2use *AstructBstruct2Use) (ok bool)
func (*StageStruct) IsStagedAstructBstructUse ¶
func (stage *StageStruct) IsStagedAstructBstructUse(astructbstructuse *AstructBstructUse) (ok bool)
func (*StageStruct) IsStagedBstruct ¶
func (stage *StageStruct) IsStagedBstruct(bstruct *Bstruct) (ok bool)
func (*StageStruct) IsStagedDstruct ¶
func (stage *StageStruct) IsStagedDstruct(dstruct *Dstruct) (ok bool)
func (*StageStruct) IsStagedFstruct ¶
func (stage *StageStruct) IsStagedFstruct(fstruct *Fstruct) (ok bool)
func (*StageStruct) IsStagedGstruct ¶
func (stage *StageStruct) IsStagedGstruct(gstruct *Gstruct) (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) StageBranchAstruct ¶
func (stage *StageStruct) StageBranchAstruct(astruct *Astruct)
insertion point for stage branch per struct
func (*StageStruct) StageBranchAstructBstruct2Use ¶
func (stage *StageStruct) StageBranchAstructBstruct2Use(astructbstruct2use *AstructBstruct2Use)
func (*StageStruct) StageBranchAstructBstructUse ¶
func (stage *StageStruct) StageBranchAstructBstructUse(astructbstructuse *AstructBstructUse)
func (*StageStruct) StageBranchBstruct ¶
func (stage *StageStruct) StageBranchBstruct(bstruct *Bstruct)
func (*StageStruct) StageBranchDstruct ¶
func (stage *StageStruct) StageBranchDstruct(dstruct *Dstruct)
func (*StageStruct) StageBranchFstruct ¶
func (stage *StageStruct) StageBranchFstruct(fstruct *Fstruct)
func (*StageStruct) StageBranchGstruct ¶
func (stage *StageStruct) StageBranchGstruct(gstruct *Gstruct)
func (*StageStruct) Unstage ¶
func (stage *StageStruct) Unstage()
func (*StageStruct) UnstageBranchAstruct ¶
func (stage *StageStruct) UnstageBranchAstruct(astruct *Astruct)
insertion point for unstage branch per struct
func (*StageStruct) UnstageBranchAstructBstruct2Use ¶
func (stage *StageStruct) UnstageBranchAstructBstruct2Use(astructbstruct2use *AstructBstruct2Use)
func (*StageStruct) UnstageBranchAstructBstructUse ¶
func (stage *StageStruct) UnstageBranchAstructBstructUse(astructbstructuse *AstructBstructUse)
func (*StageStruct) UnstageBranchBstruct ¶
func (stage *StageStruct) UnstageBranchBstruct(bstruct *Bstruct)
func (*StageStruct) UnstageBranchDstruct ¶
func (stage *StageStruct) UnstageBranchDstruct(dstruct *Dstruct)
func (*StageStruct) UnstageBranchFstruct ¶
func (stage *StageStruct) UnstageBranchFstruct(fstruct *Fstruct)
func (*StageStruct) UnstageBranchGstruct ¶
func (stage *StageStruct) UnstageBranchGstruct(gstruct *Gstruct)
Source Files
¶
- aenum.go
- astruct.go
- astruct_bstruct2_use.go
- astruct_bstruct_use.go
- benum.go
- bstruct.go
- cenum_int.go
- cstruct.go
- docs.go
- dstruct.go
- estruct.go
- fstruct.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
- gstruct.go
- meta.go
- note.go
- stack_names_enum.go