models

package
v0.0.0-...-64443f4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 24 Imported by: 0

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

generated code - do not edit

generated code - do not edit

generated code - do not edit

Index

Constants

View Source
const IdentifiersDecls = `
	{{Identifier}} := (&models.{{GeneratedStructName}}{}).Stage(stage)`
View Source
const MetaFieldStructInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = ` + `{{GeneratedFieldNameValue}}`
View Source
const NumberInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
View Source
const PointerFieldInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
View Source
const ProbeFormSuffix = ":form of the probe"
View Source
const ProbeSplitSuffix = ":probe of the probe"
View Source
const ProbeTableSuffix = ":table of the probe"
View Source
const ProbeTreeSidebarSuffix = ":sidebar of the probe"
View Source
const SliceOfPointersFieldInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = append({{Identifier}}.{{GeneratedFieldName}}, {{GeneratedFieldNameValue}})`
View Source
const StringEnumInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
View Source
const StringInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = ` + "`" + `{{GeneratedFieldNameValue}}` + "`"
View Source
const TimeInitStatement = `` /* 129-byte string literal not displayed */

Variables

This section is empty.

Functions

func AfterCreateFromFront

func AfterCreateFromFront[Type Gongstruct](stage *Stage, instance *Type)

AfterCreateFromFront is called after a create from front

func AfterDeleteFromFront

func AfterDeleteFromFront[Type Gongstruct](stage *Stage, staged, front *Type)

AfterDeleteFromFront is called after a delete from front

func AfterReadFromFront

func AfterReadFromFront[Type Gongstruct](stage *Stage, instance *Type)

AfterReadFromFront is called after a Read from front

func ApplyDiff

func ApplyDiff(b, c string) (string, error)

ApplyDiff applies a git-style unified diff c to string b to reconstruct string a

func CompareGongstructByName

func CompareGongstructByName[T PointerToGongstruct](a, b T) int

func ComputeDiff

func ComputeDiff(a, b string) string

ComputeDiff generates a git-style unified diff from string a to string b

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 *Stage) (sortedSlice []T)

func GetGongstructInstancesMap

func GetGongstructInstancesMap[Type Gongstruct](stage *Stage) *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 *Stage) *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 *Stage) *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 GetNamedStructInstances

func GetNamedStructInstances[T PointerToGongstruct](set map[T]any, order map[T]uint) (res []string)

func GetOrder

func GetOrder[Type Gongstruct](stage *Stage, instance *Type) uint

func GetOrderPointerGongstruct

func GetOrderPointerGongstruct[Type PointerToGongstruct](stage *Stage, instance Type) uint

func GetPointerReverseMap

func GetPointerReverseMap[Start, End Gongstruct](fieldname string, stage *Stage) 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 GetReverseFieldOwner

func GetReverseFieldOwner[T Gongstruct](
	stage *Stage,
	instance *T,
	reverseField *ReverseField) (res any)

func GetReverseFieldOwnerName

func GetReverseFieldOwnerName(
	stage *Stage,
	instance any,
	reverseField *ReverseField) (res string)

func GetSliceOfPointersReverseMap

func GetSliceOfPointersReverseMap[Start, End Gongstruct](fieldname string, stage *Stage) 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 GetStructInstancesByOrder

func GetStructInstancesByOrder[T PointerToGongstruct](set map[T]any, order map[T]uint) (res []T)

func GetStructInstancesByOrderAuto

func GetStructInstancesByOrderAuto[T PointerToGongstruct](stage *Stage) (res []T)

func GongGetMap

func GongGetMap[Type GongstructMapString](stage *Stage) *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 *Stage) *Type

GongGetSet returns the set staged GongstructType instances it is usefull because it allows refactoring of gong struct identifier

func IntToLetters

func IntToLetters(number int32) (letters string)

func IsStaged

func IsStaged[Type Gongstruct](stage *Stage, instance *Type) (ok bool)

func OnAfterUpdateFromFront

func OnAfterUpdateFromFront[Type Gongstruct](stage *Stage, old, new *Type, mouseEvent *Gong__MouseEvent)

OnAfterUpdateFromFront is called after a update from front

func ParseAstEmbeddedFile

func ParseAstEmbeddedFile(stage *Stage, directory embed.FS, pathToFile string) error

ParseAstEmbeddedFile parses the Go source code from an embedded file specified by pathToFile within the provided embed.FS directory and stages instances declared in the file using the provided Stage.

Parameters:

stage:      The staging area to populate.
directory:  The embedded filesystem containing the file.
pathToFile: The path to the Go source file within the embedded filesystem.

Returns:

An error if reading or parsing the file fails, or if ParseAstFileFromAst fails.

func ParseAstFile

func ParseAstFile(stage *Stage, pathToFile string) error

ParseAstFile Parse pathToFile and stages all instances declared in the file

func ParseAstFileFromAst

func ParseAstFileFromAst(stage *Stage, inFile *ast.File, fset *token.FileSet) error

ParseAstFile Parse pathToFile and stages all instances declared in the file

func ReplaceOldDeclarationsInFile

func ReplaceOldDeclarationsInFile(pathToFile string) error

ReplaceOldDeclarationsInFile replaces specific text in a file at the given path.

func Serialize

func Serialize[Type Gongstruct](stage *Stage, tab Tabulator)

func SerializeExcelize

func SerializeExcelize[Type Gongstruct](stage *Stage, f *excelize.File)

func SerializeExcelizePointerToGongstruct

func SerializeExcelizePointerToGongstruct[Type PointerToGongstruct](stage *Stage, f *excelize.File)

func SerializeStage

func SerializeStage(stage *Stage, filename string)

func SetCallbackAfterCreateFromFront

func SetCallbackAfterCreateFromFront[Type Gongstruct](stage *Stage, callback OnAfterCreateInterface[Type])

func SetCallbackAfterDeleteFromFront

func SetCallbackAfterDeleteFromFront[Type Gongstruct](stage *Stage, callback OnAfterDeleteInterface[Type])

func SetCallbackAfterReadFromFront

func SetCallbackAfterReadFromFront[Type Gongstruct](stage *Stage, callback OnAfterReadInterface[Type])

func SetCallbackAfterUpdateFromFront

func SetCallbackAfterUpdateFromFront[Type Gongstruct](stage *Stage, callback OnAfterUpdateInterface[Type])

SetCallbackAfterUpdateFromFront is a function to set up callback that is robust to refactoring

func SetOrchestratorOnAfterUpdate

func SetOrchestratorOnAfterUpdate[Type Gongstruct](stage *Stage)

func SetOrchestratorOnAfterUpdateWithMouseEvent

func SetOrchestratorOnAfterUpdateWithMouseEvent[Type Gongstruct](stage *Stage)

func SortGongstructSetByName

func SortGongstructSetByName[T PointerToGongstruct](set map[T]any) (sortedSlice []T)

func StageBranch

func StageBranch[Type Gongstruct](stage *Stage, 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 *Stage, 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 *Stage, 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 {
	CreateORMDisplaySelection(DisplaySelection *DisplaySelection)
	CreateORMXLCell(XLCell *XLCell)
	CreateORMXLFile(XLFile *XLFile)
	CreateORMXLRow(XLRow *XLRow)
	CreateORMXLSheet(XLSheet *XLSheet)
}

swagger:ignore

type AllModelsStructDeleteInterface

type AllModelsStructDeleteInterface interface {
	DeleteORMDisplaySelection(DisplaySelection *DisplaySelection)
	DeleteORMXLCell(XLCell *XLCell)
	DeleteORMXLFile(XLFile *XLFile)
	DeleteORMXLRow(XLRow *XLRow)
	DeleteORMXLSheet(XLSheet *XLSheet)
}

type BackRepoInterface

type BackRepoInterface interface {
	Commit(stage *Stage)
	Checkout(stage *Stage)
	Backup(stage *Stage, dirPath string)
	Restore(stage *Stage, dirPath string)
	BackupXL(stage *Stage, dirPath string)
	RestoreXL(stage *Stage, dirPath string)
	// insertion point for Commit and Checkout signatures
	CommitDisplaySelection(displayselection *DisplaySelection)
	CheckoutDisplaySelection(displayselection *DisplaySelection)
	CommitXLCell(xlcell *XLCell)
	CheckoutXLCell(xlcell *XLCell)
	CommitXLFile(xlfile *XLFile)
	CheckoutXLFile(xlfile *XLFile)
	CommitXLRow(xlrow *XLRow)
	CheckoutXLRow(xlrow *XLRow)
	CommitXLSheet(xlsheet *XLSheet)
	CheckoutXLSheet(xlsheet *XLSheet)
	GetLastCommitFromBackNb() uint
	GetLastPushFromFrontNb() uint
}

type DiffHunk

type DiffHunk struct {
	OldStart int
	OldLines int
	NewStart int
	NewLines int
	Lines    []string
}

DiffHunk represents a single hunk in a unified diff

type DiffOp

type DiffOp struct {
	Type string // "context", "delete", "add"
	Text string
}

DiffLine represents a line in a diff with its operation

type DisplaySelection

type DisplaySelection struct {
	Name    string
	XLFile  *XLFile
	XLSheet *XLSheet
}

func CopyBranchDisplaySelection

func CopyBranchDisplaySelection(mapOrigCopy map[any]any, displayselectionFrom *DisplaySelection) (displayselectionTo *DisplaySelection)

insertion point for stage branch per struct

func (*DisplaySelection) Checkout

func (displayselection *DisplaySelection) Checkout(stage *Stage) *DisplaySelection

Checkout displayselection to the back repo (if it is already staged)

func (*DisplaySelection) Commit

func (displayselection *DisplaySelection) Commit(stage *Stage) *DisplaySelection

commit displayselection to the back repo (if it is already staged)

func (*DisplaySelection) CommitVoid

func (displayselection *DisplaySelection) CommitVoid(stage *Stage)

func (*DisplaySelection) CopyBasicFields

func (from *DisplaySelection) CopyBasicFields(to *DisplaySelection)

func (*DisplaySelection) GetName

func (displayselection *DisplaySelection) GetName() (res string)

for satisfaction of GongStruct interface

func (*DisplaySelection) Stage

func (displayselection *DisplaySelection) Stage(stage *Stage) *DisplaySelection

insertion point for cumulative sub template with model space calls Stage puts displayselection to the model stage

func (*DisplaySelection) Unstage

func (displayselection *DisplaySelection) Unstage(stage *Stage) *DisplaySelection

Unstage removes displayselection off the model stage

func (*DisplaySelection) UnstageVoid

func (displayselection *DisplaySelection) UnstageVoid(stage *Stage)

UnstageVoid removes displayselection off the model stage

type DisplaySelection_WOP

type DisplaySelection_WOP struct {
	Name 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 Gong__MouseEvent

type Gong__MouseEvent struct {
	ShiftKey bool
}

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
	Codes() []string
	CodeValues() []int
}

type GongstructEnumStringField

type GongstructEnumStringField interface {
	Codes() []string
	CodeValues() []string
	ToString() string
}

type GongstructMapString

type GongstructMapString interface {
	map[any]any
}

type GongstructSet

type GongstructSet interface {
	map[any]any
}

type GongtructBasicField

type GongtructBasicField interface {
	int | float64 | bool | string | time.Time | time.Duration
}

type NamedStruct

type NamedStruct struct {
	// contains filtered or unexported fields
}

func (*NamedStruct) GetName

func (namedStruct *NamedStruct) GetName() string

type OnAfterCreateInterface

type OnAfterCreateInterface[Type Gongstruct] interface {
	OnAfterCreate(stage *Stage,
		instance *Type)
}

OnAfterCreateInterface callback when an instance is updated from the front

type OnAfterDeleteInterface

type OnAfterDeleteInterface[Type Gongstruct] interface {
	OnAfterDelete(stage *Stage,
		staged, front *Type)
}

OnAfterDeleteInterface callback when an instance is updated from the front

type OnAfterReadInterface

type OnAfterReadInterface[Type Gongstruct] interface {
	OnAfterRead(stage *Stage,
		instance *Type)
}

OnAfterReadInterface callback when an instance is updated from the front

type OnAfterUpdateInterface

type OnAfterUpdateInterface[Type Gongstruct] interface {
	OnAfterUpdate(stage *Stage, old, new *Type)
}

OnAfterUpdateInterface callback when an instance is updated from the front

type OnAfterUpdateWithMouseEventInterface

type OnAfterUpdateWithMouseEventInterface[Type Gongstruct] interface {
	OnAfterUpdateWithMouseEvent(stage *Stage, old, new *Type, mouseEvent *Gong__MouseEvent)
}

OnAfterUpdateWithMouseEventInterface callback when an instance is updated from the front

type OnInitCommitInterface

type OnInitCommitInterface interface {
	BeforeCommit(stage *Stage)
}

type PointerToGongstruct

type PointerToGongstruct interface {
	GetName() string
	CommitVoid(*Stage)
	UnstageVoid(stage *Stage)
	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 {
	FromCodeString(input string) (err error)
}

type PointerToGongstructEnumStringField

type PointerToGongstructEnumStringField interface {
	FromCodeString(input string) (err error)
}

type ReverseField

type ReverseField struct {
	GongstructName string
	Fieldname      string
}

func GetReverseFields

func GetReverseFields[Type Gongstruct]() (res []ReverseField)

type Stage

type Stage struct {

	// insertion point for definition of arrays registering instances
	DisplaySelections           map[*DisplaySelection]any
	DisplaySelections_mapString map[string]*DisplaySelection

	// insertion point for slice of pointers maps
	OnAfterDisplaySelectionCreateCallback               OnAfterCreateInterface[DisplaySelection]
	OnAfterDisplaySelectionUpdateCallback               OnAfterUpdateInterface[DisplaySelection]
	OnAfterDisplaySelectionUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[DisplaySelection]
	OnAfterDisplaySelectionDeleteCallback               OnAfterDeleteInterface[DisplaySelection]
	OnAfterDisplaySelectionReadCallback                 OnAfterReadInterface[DisplaySelection]

	XLCells           map[*XLCell]any
	XLCells_mapString map[string]*XLCell

	// insertion point for slice of pointers maps
	OnAfterXLCellCreateCallback               OnAfterCreateInterface[XLCell]
	OnAfterXLCellUpdateCallback               OnAfterUpdateInterface[XLCell]
	OnAfterXLCellUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[XLCell]
	OnAfterXLCellDeleteCallback               OnAfterDeleteInterface[XLCell]
	OnAfterXLCellReadCallback                 OnAfterReadInterface[XLCell]

	XLFiles           map[*XLFile]any
	XLFiles_mapString map[string]*XLFile

	// insertion point for slice of pointers maps
	XLFile_Sheets_reverseMap map[*XLSheet]*XLFile

	OnAfterXLFileCreateCallback               OnAfterCreateInterface[XLFile]
	OnAfterXLFileUpdateCallback               OnAfterUpdateInterface[XLFile]
	OnAfterXLFileUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[XLFile]
	OnAfterXLFileDeleteCallback               OnAfterDeleteInterface[XLFile]
	OnAfterXLFileReadCallback                 OnAfterReadInterface[XLFile]

	XLRows           map[*XLRow]any
	XLRows_mapString map[string]*XLRow

	// insertion point for slice of pointers maps
	XLRow_Cells_reverseMap map[*XLCell]*XLRow

	OnAfterXLRowCreateCallback               OnAfterCreateInterface[XLRow]
	OnAfterXLRowUpdateCallback               OnAfterUpdateInterface[XLRow]
	OnAfterXLRowUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[XLRow]
	OnAfterXLRowDeleteCallback               OnAfterDeleteInterface[XLRow]
	OnAfterXLRowReadCallback                 OnAfterReadInterface[XLRow]

	XLSheets           map[*XLSheet]any
	XLSheets_mapString map[string]*XLSheet

	// insertion point for slice of pointers maps
	XLSheet_Rows_reverseMap map[*XLRow]*XLSheet

	XLSheet_SheetCells_reverseMap map[*XLCell]*XLSheet

	OnAfterXLSheetCreateCallback               OnAfterCreateInterface[XLSheet]
	OnAfterXLSheetUpdateCallback               OnAfterUpdateInterface[XLSheet]
	OnAfterXLSheetUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[XLSheet]
	OnAfterXLSheetDeleteCallback               OnAfterDeleteInterface[XLSheet]
	OnAfterXLSheetReadCallback                 OnAfterReadInterface[XLSheet]

	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
	// insertion point for order fields declaration
	DisplaySelectionOrder            uint
	DisplaySelectionMap_Staged_Order map[*DisplaySelection]uint

	XLCellOrder            uint
	XLCellMap_Staged_Order map[*XLCell]uint

	XLFileOrder            uint
	XLFileMap_Staged_Order map[*XLFile]uint

	XLRowOrder            uint
	XLRowMap_Staged_Order map[*XLRow]uint

	XLSheetOrder            uint
	XLSheetMap_Staged_Order map[*XLSheet]uint

	NamedStructs []*NamedStruct
	// contains filtered or unexported fields
}

Stage enables storage of staged instances swagger:ignore

func NewStage

func NewStage(name string) (stage *Stage)

func (*Stage) Backup

func (stage *Stage) Backup(dirPath string)

backup generates backup files in the dirPath

func (*Stage) BackupXL

func (stage *Stage) BackupXL(dirPath string)

backup generates backup files in the dirPath

func (*Stage) Checkout

func (stage *Stage) Checkout()

func (*Stage) Commit

func (stage *Stage) Commit()

func (*Stage) CommitWithSuspendedCallbacks

func (stage *Stage) CommitWithSuspendedCallbacks()

func (*Stage) ComputeReverseMaps

func (stage *Stage) 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 (*Stage) GetCommitId

func (stage *Stage) GetCommitId() uint

func (*Stage) GetCommitTS

func (stage *Stage) GetCommitTS() time.Time

func (*Stage) GetDigramsEmbededDir

func (stage *Stage) GetDigramsEmbededDir() embed.FS

func (*Stage) GetMap_GongStructName_InstancesNb

func (stage *Stage) GetMap_GongStructName_InstancesNb() map[string]int

func (*Stage) GetModelsEmbededDir

func (stage *Stage) GetModelsEmbededDir() embed.FS

func (*Stage) GetName

func (stage *Stage) GetName() string

func (*Stage) GetNamedStructNamesByOrder

func (stage *Stage) GetNamedStructNamesByOrder(namedStructName string) (res []string)

func (*Stage) GetNamedStructsNames

func (stage *Stage) GetNamedStructsNames() (res []string)

GetNamedStructs implements models.ProbebStage.

func (*Stage) GetProbeFormStageName

func (stage *Stage) GetProbeFormStageName() string

func (*Stage) GetProbeSplitStageName

func (stage *Stage) GetProbeSplitStageName() string

func (*Stage) GetProbeTableStageName

func (stage *Stage) GetProbeTableStageName() string

func (*Stage) GetProbeTreeSidebarStageName

func (stage *Stage) GetProbeTreeSidebarStageName() string

func (*Stage) GetType

func (stage *Stage) GetType() string

func (*Stage) IsStagedDisplaySelection

func (stage *Stage) IsStagedDisplaySelection(displayselection *DisplaySelection) (ok bool)

insertion point for stage per struct

func (*Stage) IsStagedXLCell

func (stage *Stage) IsStagedXLCell(xlcell *XLCell) (ok bool)

func (*Stage) IsStagedXLFile

func (stage *Stage) IsStagedXLFile(xlfile *XLFile) (ok bool)

func (*Stage) IsStagedXLRow

func (stage *Stage) IsStagedXLRow(xlrow *XLRow) (ok bool)

func (*Stage) IsStagedXLSheet

func (stage *Stage) IsStagedXLSheet(xlsheet *XLSheet) (ok bool)

func (*Stage) Marshall

func (stage *Stage) Marshall(file *os.File, modelsPackageName, packageName string)

Marshall marshall the stage content into the file as an instanciation into a stage

func (*Stage) Nil

func (stage *Stage) Nil()

func (*Stage) Reset

func (stage *Stage) Reset()

func (*Stage) Restore

func (stage *Stage) Restore(dirPath string)

Restore resets Stage & BackRepo and restores their content from the restore files in dirPath

func (*Stage) RestoreXL

func (stage *Stage) RestoreXL(dirPath string)

Restore resets Stage & BackRepo and restores their content from the restore files in dirPath

func (*Stage) SetGeneratesDiff

func (stage *Stage) SetGeneratesDiff(generatesDiff bool)

func (*Stage) StageBranchDisplaySelection

func (stage *Stage) StageBranchDisplaySelection(displayselection *DisplaySelection)

insertion point for stage branch per struct

func (*Stage) StageBranchXLCell

func (stage *Stage) StageBranchXLCell(xlcell *XLCell)

func (*Stage) StageBranchXLFile

func (stage *Stage) StageBranchXLFile(xlfile *XLFile)

func (*Stage) StageBranchXLRow

func (stage *Stage) StageBranchXLRow(xlrow *XLRow)

func (*Stage) StageBranchXLSheet

func (stage *Stage) StageBranchXLSheet(xlsheet *XLSheet)

func (*Stage) Unstage

func (stage *Stage) Unstage()

func (*Stage) UnstageBranchDisplaySelection

func (stage *Stage) UnstageBranchDisplaySelection(displayselection *DisplaySelection)

insertion point for unstage branch per struct

func (*Stage) UnstageBranchXLCell

func (stage *Stage) UnstageBranchXLCell(xlcell *XLCell)

func (*Stage) UnstageBranchXLFile

func (stage *Stage) UnstageBranchXLFile(xlfile *XLFile)

func (*Stage) UnstageBranchXLRow

func (stage *Stage) UnstageBranchXLRow(xlrow *XLRow)

func (*Stage) UnstageBranchXLSheet

func (stage *Stage) UnstageBranchXLSheet(xlsheet *XLSheet)

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 XLCell

type XLCell struct {
	Name string

	X, Y int
	// contains filtered or unexported fields
}

func CopyBranchXLCell

func CopyBranchXLCell(mapOrigCopy map[any]any, xlcellFrom *XLCell) (xlcellTo *XLCell)

func (*XLCell) Checkout

func (xlcell *XLCell) Checkout(stage *Stage) *XLCell

Checkout xlcell to the back repo (if it is already staged)

func (*XLCell) Commit

func (xlcell *XLCell) Commit(stage *Stage) *XLCell

commit xlcell to the back repo (if it is already staged)

func (*XLCell) CommitVoid

func (xlcell *XLCell) CommitVoid(stage *Stage)

func (*XLCell) CopyBasicFields

func (from *XLCell) CopyBasicFields(to *XLCell)

func (*XLCell) GetName

func (xlcell *XLCell) GetName() (res string)

for satisfaction of GongStruct interface

func (*XLCell) Stage

func (xlcell *XLCell) Stage(stage *Stage) *XLCell

Stage puts xlcell to the model stage

func (*XLCell) Unstage

func (xlcell *XLCell) Unstage(stage *Stage) *XLCell

Unstage removes xlcell off the model stage

func (*XLCell) UnstageVoid

func (xlcell *XLCell) UnstageVoid(stage *Stage)

UnstageVoid removes xlcell off the model stage

type XLCell_WOP

type XLCell_WOP struct {
	Name string

	X int

	Y int
}

type XLFile

type XLFile struct {
	Name string

	NbSheets int
	Sheets   []*XLSheet
	// contains filtered or unexported fields
}

func CopyBranchXLFile

func CopyBranchXLFile(mapOrigCopy map[any]any, xlfileFrom *XLFile) (xlfileTo *XLFile)

func (*XLFile) Checkout

func (xlfile *XLFile) Checkout(stage *Stage) *XLFile

Checkout xlfile to the back repo (if it is already staged)

func (*XLFile) Commit

func (xlfile *XLFile) Commit(stage *Stage) *XLFile

commit xlfile to the back repo (if it is already staged)

func (*XLFile) CommitVoid

func (xlfile *XLFile) CommitVoid(stage *Stage)

func (*XLFile) CopyBasicFields

func (from *XLFile) CopyBasicFields(to *XLFile)

func (*XLFile) GetName

func (xlfile *XLFile) GetName() (res string)

for satisfaction of GongStruct interface

func (*XLFile) Open

func (xlfile *XLFile) Open(stage *Stage, path string)

func (*XLFile) Stage

func (xlfile *XLFile) Stage(stage *Stage) *XLFile

Stage puts xlfile to the model stage

func (*XLFile) Unstage

func (xlfile *XLFile) Unstage(stage *Stage) *XLFile

Unstage removes xlfile off the model stage

func (*XLFile) UnstageVoid

func (xlfile *XLFile) UnstageVoid(stage *Stage)

UnstageVoid removes xlfile off the model stage

type XLFile_WOP

type XLFile_WOP struct {
	Name string

	NbSheets int
}

type XLRow

type XLRow struct {
	Name     string
	RowIndex int

	Cells []*XLCell
	// contains filtered or unexported fields
}

func CopyBranchXLRow

func CopyBranchXLRow(mapOrigCopy map[any]any, xlrowFrom *XLRow) (xlrowTo *XLRow)

func (*XLRow) Checkout

func (xlrow *XLRow) Checkout(stage *Stage) *XLRow

Checkout xlrow to the back repo (if it is already staged)

func (*XLRow) Commit

func (xlrow *XLRow) Commit(stage *Stage) *XLRow

commit xlrow to the back repo (if it is already staged)

func (*XLRow) CommitVoid

func (xlrow *XLRow) CommitVoid(stage *Stage)

func (*XLRow) CopyBasicFields

func (from *XLRow) CopyBasicFields(to *XLRow)

func (*XLRow) GetName

func (xlrow *XLRow) GetName() (res string)

for satisfaction of GongStruct interface

func (*XLRow) Stage

func (xlrow *XLRow) Stage(stage *Stage) *XLRow

Stage puts xlrow to the model stage

func (*XLRow) Unstage

func (xlrow *XLRow) Unstage(stage *Stage) *XLRow

Unstage removes xlrow off the model stage

func (*XLRow) UnstageVoid

func (xlrow *XLRow) UnstageVoid(stage *Stage)

UnstageVoid removes xlrow off the model stage

type XLRow_WOP

type XLRow_WOP struct {
	Name string

	RowIndex int
}

type XLSheet

type XLSheet struct {
	Name   string
	MaxRow int
	MaxCol int

	NbRows int

	Rows       []*XLRow
	SheetCells []*XLCell
	// contains filtered or unexported fields
}

func CopyBranchXLSheet

func CopyBranchXLSheet(mapOrigCopy map[any]any, xlsheetFrom *XLSheet) (xlsheetTo *XLSheet)

func (*XLSheet) Checkout

func (xlsheet *XLSheet) Checkout(stage *Stage) *XLSheet

Checkout xlsheet to the back repo (if it is already staged)

func (*XLSheet) Commit

func (xlsheet *XLSheet) Commit(stage *Stage) *XLSheet

commit xlsheet to the back repo (if it is already staged)

func (*XLSheet) CommitVoid

func (xlsheet *XLSheet) CommitVoid(stage *Stage)

func (*XLSheet) CopyBasicFields

func (from *XLSheet) CopyBasicFields(to *XLSheet)

func (*XLSheet) FillUpArrayOfString2S

func (xLSheet *XLSheet) FillUpArrayOfString2S()

func (*XLSheet) GetArrayOfString2S

func (xLSheet *XLSheet) GetArrayOfString2S() (arrayOfString2D *[][]string)

func (*XLSheet) GetName

func (xlsheet *XLSheet) GetName() (res string)

for satisfaction of GongStruct interface

func (*XLSheet) Stage

func (xlsheet *XLSheet) Stage(stage *Stage) *XLSheet

Stage puts xlsheet to the model stage

func (*XLSheet) Unstage

func (xlsheet *XLSheet) Unstage(stage *Stage) *XLSheet

Unstage removes xlsheet off the model stage

func (*XLSheet) UnstageVoid

func (xlsheet *XLSheet) UnstageVoid(stage *Stage)

UnstageVoid removes xlsheet off the model stage

type XLSheet_WOP

type XLSheet_WOP struct {
	Name string

	MaxRow int

	MaxCol int

	NbRows int
}

Jump to

Keyboard shortcuts

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