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 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 AllModelsStructCreateInterface
- type AllModelsStructDeleteInterface
- type BackRepoInterface
- type Checkbox
- func (checkbox *Checkbox) Checkout(stage *StageStruct) *Checkbox
- func (checkbox *Checkbox) Commit(stage *StageStruct) *Checkbox
- func (checkbox *Checkbox) CommitVoid(stage *StageStruct)
- func (from *Checkbox) CopyBasicFields(to *Checkbox)
- func (checkbox *Checkbox) GetName() (res string)
- func (checkbox *Checkbox) OnAfterUpdate(stage *StageStruct, stageCheckbox, frontCheckbox *Checkbox)
- func (checkbox *Checkbox) Stage(stage *StageStruct) *Checkbox
- func (checkbox *Checkbox) Unstage(stage *StageStruct) *Checkbox
- func (checkbox *Checkbox) UnstageVoid(stage *StageStruct)
- type CheckboxOrchestrator
- type CheckboxProxy
- type CheckboxProxyInterface
- type Checkbox_WOP
- type ExcelizeTabulator
- 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 Group
- func (group *Group) Checkout(stage *StageStruct) *Group
- func (group *Group) Commit(stage *StageStruct) *Group
- func (group *Group) CommitVoid(stage *StageStruct)
- func (from *Group) CopyBasicFields(to *Group)
- func (group *Group) GetName() (res string)
- func (group *Group) Stage(stage *StageStruct) *Group
- func (group *Group) Unstage(stage *StageStruct) *Group
- func (group *Group) UnstageVoid(stage *StageStruct)
- type Group_WOP
- type Layout
- func (layout *Layout) Checkout(stage *StageStruct) *Layout
- func (layout *Layout) Commit(stage *StageStruct) *Layout
- func (layout *Layout) CommitVoid(stage *StageStruct)
- func (from *Layout) CopyBasicFields(to *Layout)
- func (layout *Layout) GetName() (res string)
- func (layout *Layout) Stage(stage *StageStruct) *Layout
- func (layout *Layout) Unstage(stage *StageStruct) *Layout
- func (layout *Layout) UnstageVoid(stage *StageStruct)
- type Layout_WOP
- type Number
- type OnAfterCreateInterface
- type OnAfterDeleteInterface
- type OnAfterReadInterface
- type OnAfterUpdateInterface
- type OnInitCommitInterface
- type PointerToGongstruct
- type PointerToGongstructEnumIntField
- type PointerToGongstructEnumStringField
- type ReverseField
- type Slider
- func (slider *Slider) Checkout(stage *StageStruct) *Slider
- func (slider *Slider) Commit(stage *StageStruct) *Slider
- func (slider *Slider) CommitVoid(stage *StageStruct)
- func (from *Slider) CopyBasicFields(to *Slider)
- func (slider *Slider) GetName() (res string)
- func (slider *Slider) OnAfterUpdate(stage *StageStruct, stageSlider, frontSlider *Slider)
- func (slider *Slider) Stage(stage *StageStruct) *Slider
- func (slider *Slider) Unstage(stage *StageStruct) *Slider
- func (slider *Slider) UnstageVoid(stage *StageStruct)
- type SliderOrchestrator
- type SliderProxy
- type SliderProxyInterface
- type Slider_WOP
- 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) IsStagedCheckbox(checkbox *Checkbox) (ok bool)
- func (stage *StageStruct) IsStagedGroup(group *Group) (ok bool)
- func (stage *StageStruct) IsStagedLayout(layout *Layout) (ok bool)
- func (stage *StageStruct) IsStagedSlider(slider *Slider) (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) StageBranchCheckbox(checkbox *Checkbox)
- func (stage *StageStruct) StageBranchGroup(group *Group)
- func (stage *StageStruct) StageBranchLayout(layout *Layout)
- func (stage *StageStruct) StageBranchSlider(slider *Slider)
- func (stage *StageStruct) Unstage()
- func (stage *StageStruct) UnstageBranchCheckbox(checkbox *Checkbox)
- func (stage *StageStruct) UnstageBranchGroup(group *Group)
- func (stage *StageStruct) UnstageBranchLayout(layout *Layout)
- func (stage *StageStruct) UnstageBranchSlider(slider *Slider)
- type Tabulator
- type Target
Constants ¶
const IdentifiersDecls = `
{{Identifier}} := (&models.{{GeneratedStructName}}{}).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 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 AllModelsStructCreateInterface ¶
type AllModelsStructCreateInterface interface { CreateORMCheckbox(Checkbox *Checkbox) CreateORMGroup(Group *Group) CreateORMLayout(Layout *Layout) CreateORMSlider(Slider *Slider) }
swagger:ignore
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 CommitCheckbox(checkbox *Checkbox) CheckoutCheckbox(checkbox *Checkbox) CommitGroup(group *Group) CheckoutGroup(group *Group) CommitLayout(layout *Layout) CheckoutLayout(layout *Layout) CommitSlider(slider *Slider) CheckoutSlider(slider *Slider) GetLastCommitFromBackNb() uint GetLastPushFromFrontNb() uint }
type Checkbox ¶
type Checkbox struct { Name string ValueBool bool LabelForTrue string LabelForFalse string Proxy CheckboxProxyInterface }
for instance is minor / is major
func CopyBranchCheckbox ¶
insertion point for stage branch per struct
func NewCheckbox ¶
func NewCheckbox( target Target, name string, labelForTrue string, labelForFalse string, valueRef *bool, ) *Checkbox
Generic checkbox creation function
func (*Checkbox) Checkout ¶
func (checkbox *Checkbox) Checkout(stage *StageStruct) *Checkbox
Checkout checkbox to the back repo (if it is already staged)
func (*Checkbox) Commit ¶
func (checkbox *Checkbox) Commit(stage *StageStruct) *Checkbox
commit checkbox to the back repo (if it is already staged)
func (*Checkbox) CommitVoid ¶
func (checkbox *Checkbox) CommitVoid(stage *StageStruct)
func (*Checkbox) CopyBasicFields ¶
func (*Checkbox) OnAfterUpdate ¶
func (checkbox *Checkbox) OnAfterUpdate( stage *StageStruct, stageCheckbox, frontCheckbox *Checkbox)
func (*Checkbox) Stage ¶
func (checkbox *Checkbox) Stage(stage *StageStruct) *Checkbox
insertion point for cumulative sub template with model space calls Stage puts checkbox to the model stage
func (*Checkbox) Unstage ¶
func (checkbox *Checkbox) Unstage(stage *StageStruct) *Checkbox
Unstage removes checkbox off the model stage
func (*Checkbox) UnstageVoid ¶
func (checkbox *Checkbox) UnstageVoid(stage *StageStruct)
UnstageVoid removes checkbox off the model stage
type CheckboxOrchestrator ¶
type CheckboxOrchestrator struct { }
insertion point CheckboxOrchestrator
func (*CheckboxOrchestrator) OnAfterUpdate ¶
func (orchestrator *CheckboxOrchestrator) OnAfterUpdate( gongsvgStage *StageStruct, stagedCheckbox, backRepoCheckbox *Checkbox)
type CheckboxProxy ¶
type CheckboxProxy struct { Value *bool // contains filtered or unexported fields }
CheckboxProxy is a generic proxy for both int and float64
func NewCheckboxProxy ¶
func NewCheckboxProxy( checkbox *Checkbox, value *bool, target Target, ) *CheckboxProxy
NewCheckboxProxy creates a new proxy for a checkbox
func (*CheckboxProxy) Updated ¶
func (proxy *CheckboxProxy) Updated()
Updated handles updating values when the checkbox changes
type CheckboxProxyInterface ¶
type CheckboxProxyInterface interface {
Updated()
}
type Checkbox_WOP ¶
type Checkbox_WOP struct { // insertion point Name string ValueBool bool LabelForTrue string LabelForFalse string }
insertion point
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 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 GongstructMapString ¶
type GongstructSet ¶
type GongtructBasicField ¶
type Group ¶
func CopyBranchGroup ¶
func (*Group) Checkout ¶
func (group *Group) Checkout(stage *StageStruct) *Group
Checkout group to the back repo (if it is already staged)
func (*Group) Commit ¶
func (group *Group) Commit(stage *StageStruct) *Group
commit group to the back repo (if it is already staged)
func (*Group) CommitVoid ¶
func (group *Group) CommitVoid(stage *StageStruct)
func (*Group) CopyBasicFields ¶
func (*Group) Stage ¶
func (group *Group) Stage(stage *StageStruct) *Group
Stage puts group to the model stage
func (*Group) Unstage ¶
func (group *Group) Unstage(stage *StageStruct) *Group
Unstage removes group off the model stage
func (*Group) UnstageVoid ¶
func (group *Group) UnstageVoid(stage *StageStruct)
UnstageVoid removes group off the model stage
type Layout ¶
func CopyBranchLayout ¶
func (*Layout) Checkout ¶
func (layout *Layout) Checkout(stage *StageStruct) *Layout
Checkout layout to the back repo (if it is already staged)
func (*Layout) Commit ¶
func (layout *Layout) Commit(stage *StageStruct) *Layout
commit layout to the back repo (if it is already staged)
func (*Layout) CommitVoid ¶
func (layout *Layout) CommitVoid(stage *StageStruct)
func (*Layout) CopyBasicFields ¶
func (*Layout) Stage ¶
func (layout *Layout) Stage(stage *StageStruct) *Layout
Stage puts layout to the model stage
func (*Layout) Unstage ¶
func (layout *Layout) Unstage(stage *StageStruct) *Layout
Unstage removes layout off the model stage
func (*Layout) UnstageVoid ¶
func (layout *Layout) UnstageVoid(stage *StageStruct)
UnstageVoid removes layout off the model stage
type Layout_WOP ¶
type Layout_WOP struct { // insertion point Name string }
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 ReverseField ¶
func GetReverseFields ¶
func GetReverseFields[Type Gongstruct]() (res []ReverseField)
type Slider ¶
type Slider struct { Name string IsFloat64 bool IsInt bool MinInt int MaxInt int StepInt int ValueInt int MinFloat64 float64 MaxFloat64 float64 StepFloat64 float64 ValueFloat64 float64 Proxy SliderProxyInterface }
func CopyBranchSlider ¶
func (*Slider) Checkout ¶
func (slider *Slider) Checkout(stage *StageStruct) *Slider
Checkout slider to the back repo (if it is already staged)
func (*Slider) Commit ¶
func (slider *Slider) Commit(stage *StageStruct) *Slider
commit slider to the back repo (if it is already staged)
func (*Slider) CommitVoid ¶
func (slider *Slider) CommitVoid(stage *StageStruct)
func (*Slider) CopyBasicFields ¶
func (*Slider) OnAfterUpdate ¶
func (slider *Slider) OnAfterUpdate( stage *StageStruct, stageSlider, frontSlider *Slider)
func (*Slider) Stage ¶
func (slider *Slider) Stage(stage *StageStruct) *Slider
Stage puts slider to the model stage
func (*Slider) Unstage ¶
func (slider *Slider) Unstage(stage *StageStruct) *Slider
Unstage removes slider off the model stage
func (*Slider) UnstageVoid ¶
func (slider *Slider) UnstageVoid(stage *StageStruct)
UnstageVoid removes slider off the model stage
type SliderOrchestrator ¶
type SliderOrchestrator struct { }
SliderOrchestrator
func (*SliderOrchestrator) OnAfterUpdate ¶
func (orchestrator *SliderOrchestrator) OnAfterUpdate( gongsvgStage *StageStruct, stagedSlider, backRepoSlider *Slider)
type SliderProxy ¶
type SliderProxy[T Number] struct { Value *T // contains filtered or unexported fields }
SliderProxy is a generic proxy for both int and float64
func NewSliderProxy ¶
func NewSliderProxy[T Number]( slider *Slider, value *T, target Target, ) *SliderProxy[T]
NewSliderProxy creates a new proxy for a slider
func (*SliderProxy[T]) Updated ¶
func (proxy *SliderProxy[T]) Updated()
Updated handles updating values when the slider changes
type SliderProxyInterface ¶
type SliderProxyInterface interface {
Updated()
}
type Slider_WOP ¶
type StacksNames ¶
type StacksNames string
const (
SliderStackName StacksNames = "slider"
)
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)
insertion point of enum utility functions 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 Checkboxs map[*Checkbox]any Checkboxs_mapString map[string]*Checkbox // insertion point for slice of pointers maps OnAfterCheckboxCreateCallback OnAfterCreateInterface[Checkbox] OnAfterCheckboxUpdateCallback OnAfterUpdateInterface[Checkbox] OnAfterCheckboxDeleteCallback OnAfterDeleteInterface[Checkbox] OnAfterCheckboxReadCallback OnAfterReadInterface[Checkbox] Groups map[*Group]any Groups_mapString map[string]*Group // insertion point for slice of pointers maps Group_Sliders_reverseMap map[*Slider]*Group Group_Checkboxes_reverseMap map[*Checkbox]*Group OnAfterGroupCreateCallback OnAfterCreateInterface[Group] OnAfterGroupUpdateCallback OnAfterUpdateInterface[Group] OnAfterGroupDeleteCallback OnAfterDeleteInterface[Group] OnAfterGroupReadCallback OnAfterReadInterface[Group] Layouts map[*Layout]any Layouts_mapString map[string]*Layout // insertion point for slice of pointers maps Layout_Groups_reverseMap map[*Group]*Layout OnAfterLayoutCreateCallback OnAfterCreateInterface[Layout] OnAfterLayoutUpdateCallback OnAfterUpdateInterface[Layout] OnAfterLayoutDeleteCallback OnAfterDeleteInterface[Layout] OnAfterLayoutReadCallback OnAfterReadInterface[Layout] Sliders map[*Slider]any Sliders_mapString map[string]*Slider // insertion point for slice of pointers maps OnAfterSliderCreateCallback OnAfterCreateInterface[Slider] OnAfterSliderUpdateCallback OnAfterUpdateInterface[Slider] OnAfterSliderDeleteCallback OnAfterDeleteInterface[Slider] OnAfterSliderReadCallback OnAfterReadInterface[Slider] 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 // store the stage order of each instance in order to // preserve this order when serializing them Order uint Map_Staged_Order map[any]uint // 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) IsStagedCheckbox ¶
func (stage *StageStruct) IsStagedCheckbox(checkbox *Checkbox) (ok bool)
insertion point for stage per struct
func (*StageStruct) IsStagedGroup ¶
func (stage *StageStruct) IsStagedGroup(group *Group) (ok bool)
func (*StageStruct) IsStagedLayout ¶
func (stage *StageStruct) IsStagedLayout(layout *Layout) (ok bool)
func (*StageStruct) IsStagedSlider ¶
func (stage *StageStruct) IsStagedSlider(slider *Slider) (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) StageBranchCheckbox ¶
func (stage *StageStruct) StageBranchCheckbox(checkbox *Checkbox)
insertion point for stage branch per struct
func (*StageStruct) StageBranchGroup ¶
func (stage *StageStruct) StageBranchGroup(group *Group)
func (*StageStruct) StageBranchLayout ¶
func (stage *StageStruct) StageBranchLayout(layout *Layout)
func (*StageStruct) StageBranchSlider ¶
func (stage *StageStruct) StageBranchSlider(slider *Slider)
func (*StageStruct) Unstage ¶
func (stage *StageStruct) Unstage()
func (*StageStruct) UnstageBranchCheckbox ¶
func (stage *StageStruct) UnstageBranchCheckbox(checkbox *Checkbox)
insertion point for unstage branch per struct
func (*StageStruct) UnstageBranchGroup ¶
func (stage *StageStruct) UnstageBranchGroup(group *Group)
func (*StageStruct) UnstageBranchLayout ¶
func (stage *StageStruct) UnstageBranchLayout(layout *Layout)
func (*StageStruct) UnstageBranchSlider ¶
func (stage *StageStruct) UnstageBranchSlider(slider *Slider)
type Tabulator ¶
type Tabulator interface { AddSheet(sheetName string) AddRow(sheetName string) int AddCell(sheetName string, rowId, columnIndex int, value string) }
Tabulator is an interface for writing to a table strings
type Target ¶
type Target interface { OnAfterUpdateSliderElement() GetSliderStage() *StageStruct }