models

package
v0.0.0-...-589f0e7 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 33 Imported by: 4

Documentation

Overview

Default generated models package docs (at least one file is necessary in a models package)

generated boilerplate code edit the file for adding other stages

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 ClassBoxStrokeWidth = 3
View Source
const GongEnumShapeDefaultHeight = 48.0
View Source
const GongEnumShapeDefaultWidth = 240.0
View Source
const GongStructShapeDefaultHeight = 48.0
View Source
const GongStructShapeDefaultWidth = 240.0
View Source
const HeightBetween2AttributeShapes = 20
View Source
const IdentifiersDecls = `
	{{Identifier}} := (&models.{{GeneratedStructName}}{}).Stage(stage)`
View Source
const LegacyDiagramUmarshalling = false
View Source
const MetaFieldStructInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = ` + `{{GeneratedFieldNameValue}}`
View Source
const NoteOnGongdoc = ""

GONGNOTE(NoteOnGongdoc): Note Example

This note can refers to models.GongNoteShape or to models.Classdiagram.GongNoteShapes or to models.OrientationType

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 RefPackagePlusPeriod = "models."
View Source
const RefPrefixReferencedPackage = "ref_"
View Source
const SVGName string = `SVG`
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 GongEnumIdentifierMetaToGongEnumName

func GongEnumIdentifierMetaToGongEnumName(gongEnumIdentifierMeta any) (gongStructName string)

turns new(ref_models.AEnumType2) into ref_models.AEnumType2

func GongEnumValueShapeIdentifierMetaToValueName

func GongEnumValueShapeIdentifierMetaToValueName(identifierMeta any) (valueName string)

IdentifierToFieldName take an ident in the forms ref_models.Foo{}.Name and returns "Name"

func GongEnumValueToIdentifierMeta

func GongEnumValueToIdentifierMeta(gongEnumValue string) (res string)

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 GongNoteNameToIdentifier

func GongNoteNameToIdentifier(gongNoteName string) (identifier string)

func GongStructNameToIdentifier

func GongStructNameToIdentifier(structName string) (identifier string)

func GongstructAndFieldnameToFieldIdentifier

func GongstructAndFieldnameToFieldIdentifier(structName string, fieldName string) (fieldIdentifier string)

GongstructAndFieldnameToFieldIdentifier takes "Foo" "Name" and returns "ref_models.Foo.Name"

func IdentifierMetaToFieldName

func IdentifierMetaToFieldName(fieldMetaIdentifier any) (fieldName string)

IdentifierMetaToFieldName take an ident in the forms "ref_models.Foo{}.Name" and returns "Name"

func IdentifierMetaToGongStructName

func IdentifierMetaToGongStructName(structIdentifierMeta any) (structName string)

IdentifierMetaToGongStructName take an ident in the forms "ref_models.Foo" and returns "Foo"

func IdentifierToFieldName

func IdentifierToFieldName(fieldIdentifier string) (fieldName string)

IdentifierToFieldName take an ident in the forms "ref_models.Foo.Name" and returns "Name"

func IdentifierToGongStructName

func IdentifierToGongStructName(structIdentifier string) (structName string)

IdentifierToGongStructName take an ident in the forms "ref_models.Foo" and returns "Foo"

func IdentifierToReceiverAndFieldName

func IdentifierToReceiverAndFieldName(fieldIdentifier string) (receiver, fieldName string)

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 SetupMapDocLinkRenaming

func SetupMapDocLinkRenaming(gongStage *gong_models.Stage, gongdocStage *Stage)

to be removed after fix of [issue](https://github.com/golang/go/issues/57559)

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 {
	CreateORMAttributeShape(AttributeShape *AttributeShape)
	CreateORMClassdiagram(Classdiagram *Classdiagram)
	CreateORMDiagramPackage(DiagramPackage *DiagramPackage)
	CreateORMGongEnumShape(GongEnumShape *GongEnumShape)
	CreateORMGongEnumValueShape(GongEnumValueShape *GongEnumValueShape)
	CreateORMGongNoteLinkShape(GongNoteLinkShape *GongNoteLinkShape)
	CreateORMGongNoteShape(GongNoteShape *GongNoteShape)
	CreateORMGongStructShape(GongStructShape *GongStructShape)
	CreateORMLinkShape(LinkShape *LinkShape)
}

swagger:ignore

type AllModelsStructDeleteInterface

type AllModelsStructDeleteInterface interface {
	DeleteORMAttributeShape(AttributeShape *AttributeShape)
	DeleteORMClassdiagram(Classdiagram *Classdiagram)
	DeleteORMDiagramPackage(DiagramPackage *DiagramPackage)
	DeleteORMGongEnumShape(GongEnumShape *GongEnumShape)
	DeleteORMGongEnumValueShape(GongEnumValueShape *GongEnumValueShape)
	DeleteORMGongNoteLinkShape(GongNoteLinkShape *GongNoteLinkShape)
	DeleteORMGongNoteShape(GongNoteShape *GongNoteShape)
	DeleteORMGongStructShape(GongStructShape *GongStructShape)
	DeleteORMLinkShape(LinkShape *LinkShape)
}

type AnchoredTextImplLinkFieldName

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

AnchoredTextImplLinkFieldName it meets the interface of AnchoredTextImplInterface and updates the link field name position

func NewAnchoredTextImplLinkFieldName

func NewAnchoredTextImplLinkFieldName(
	anchoredtext *LinkShape,
	gongdocStage *Stage) (anchoredtextImplAnchoredText *AnchoredTextImplLinkFieldName)

func (*AnchoredTextImplLinkFieldName) AnchoredTextUpdated

func (anchoredtextImplAnchoredText *AnchoredTextImplLinkFieldName) AnchoredTextUpdated(
	updatedAnchoredText *svg.LinkAnchoredText)

type AnchoredTextImplLinkSourceMultiplicity

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

AnchoredTextImplLinkSourceMultiplicity it meets the interface of AnchoredTextImplInterface and updates the link field name position

func NewAnchoredTextImplLinkSourceMultiplicity

func NewAnchoredTextImplLinkSourceMultiplicity(
	anchoredtext *LinkShape,
	gongdocStage *Stage) (anchoredtextImplAnchoredText *AnchoredTextImplLinkSourceMultiplicity)

func (*AnchoredTextImplLinkSourceMultiplicity) AnchoredTextUpdated

func (anchoredtextImplAnchoredText *AnchoredTextImplLinkSourceMultiplicity) AnchoredTextUpdated(
	updatedAnchoredText *gongsvg_models.LinkAnchoredText)

type AnchoredTextImplLinkTargetMultiplicity

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

AnchoredTextImplLinkTargetMultiplicity it meets the interface of AnchoredTextImplInterface and updates the link field name position

func NewAnchoredTextImplLinkTargetMultiplicity

func NewAnchoredTextImplLinkTargetMultiplicity(
	anchoredtext *LinkShape,
	gongdocStage *Stage) (anchoredtextImplAnchoredText *AnchoredTextImplLinkTargetMultiplicity)

func (*AnchoredTextImplLinkTargetMultiplicity) AnchoredTextUpdated

func (anchoredtextImplAnchoredText *AnchoredTextImplLinkTargetMultiplicity) AnchoredTextUpdated(
	updatedAnchoredText *gongsvg_models.LinkAnchoredText)

type AttributeFieldNodeProxy

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

func (*AttributeFieldNodeProxy) OnAfterUpdate

func (proxy *AttributeFieldNodeProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)

type AttributeShape

type AttributeShape struct {
	Name string

	// for storing the reference as a renaming target for gopls
	// for instance 'ref_models.Astruct.IntField'
	//gong:meta
	IdentifierMeta any

	FieldTypeAsString string
	Structname        string
	Fieldtypename     string
}

AttributeShape

func CopyBranchAttributeShape

func CopyBranchAttributeShape(mapOrigCopy map[any]any, attributeshapeFrom *AttributeShape) (attributeshapeTo *AttributeShape)

insertion point for stage branch per struct

func (*AttributeShape) Checkout

func (attributeshape *AttributeShape) Checkout(stage *Stage) *AttributeShape

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

func (*AttributeShape) Commit

func (attributeshape *AttributeShape) Commit(stage *Stage) *AttributeShape

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

func (*AttributeShape) CommitVoid

func (attributeshape *AttributeShape) CommitVoid(stage *Stage)

func (*AttributeShape) CopyBasicFields

func (from *AttributeShape) CopyBasicFields(to *AttributeShape)

func (*AttributeShape) GetName

func (attributeshape *AttributeShape) GetName() (res string)

for satisfaction of GongStruct interface

func (*AttributeShape) Stage

func (attributeshape *AttributeShape) Stage(stage *Stage) *AttributeShape

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

func (*AttributeShape) Unstage

func (attributeshape *AttributeShape) Unstage(stage *Stage) *AttributeShape

Unstage removes attributeshape off the model stage

func (*AttributeShape) UnstageVoid

func (attributeshape *AttributeShape) UnstageVoid(stage *Stage)

UnstageVoid removes attributeshape off the model stage

type AttributeShape_WOP

type AttributeShape_WOP struct {
	Name string

	IdentifierMeta any

	FieldTypeAsString string

	Structname string

	Fieldtypename string
}

insertion point

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
	CommitAttributeShape(attributeshape *AttributeShape)
	CheckoutAttributeShape(attributeshape *AttributeShape)
	CommitClassdiagram(classdiagram *Classdiagram)
	CheckoutClassdiagram(classdiagram *Classdiagram)
	CommitDiagramPackage(diagrampackage *DiagramPackage)
	CheckoutDiagramPackage(diagrampackage *DiagramPackage)
	CommitGongEnumShape(gongenumshape *GongEnumShape)
	CheckoutGongEnumShape(gongenumshape *GongEnumShape)
	CommitGongEnumValueShape(gongenumvalueshape *GongEnumValueShape)
	CheckoutGongEnumValueShape(gongenumvalueshape *GongEnumValueShape)
	CommitGongNoteLinkShape(gongnotelinkshape *GongNoteLinkShape)
	CheckoutGongNoteLinkShape(gongnotelinkshape *GongNoteLinkShape)
	CommitGongNoteShape(gongnoteshape *GongNoteShape)
	CheckoutGongNoteShape(gongnoteshape *GongNoteShape)
	CommitGongStructShape(gongstructshape *GongStructShape)
	CheckoutGongStructShape(gongstructshape *GongStructShape)
	CommitLinkShape(linkshape *LinkShape)
	CheckoutLinkShape(linkshape *LinkShape)
	GetLastCommitFromBackNb() uint
	GetLastPushFromFrontNb() uint
}

type ButtonGeneratesStaticWebSiteProxy

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

func (*ButtonGeneratesStaticWebSiteProxy) ButtonUpdated

func (proxy *ButtonGeneratesStaticWebSiteProxy) ButtonUpdated(
	treeStage *tree.Stage,
	staged, front *tree.Button)

type ButtonNewClassdiagramProxy

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

func (*ButtonNewClassdiagramProxy) ButtonUpdated

func (proxy *ButtonNewClassdiagramProxy) ButtonUpdated(
	treeStage *tree.Stage,
	staged, front *tree.Button)

type ButtonToggleShowNbInstancesProxy

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

func (*ButtonToggleShowNbInstancesProxy) ButtonUpdated

func (proxy *ButtonToggleShowNbInstancesProxy) ButtonUpdated(
	treeStage *tree.Stage,
	staged, front *tree.Button)

type ButtonType

type ButtonType int
const (
	DUPLICATE ButtonType = iota
	EDIT_CANCEL
	EDIT
	REMOVE
	RENAME_CANCEL
	RENAME
	SAVE
)

func (ButtonType) CodeValues

func (buttontype ButtonType) CodeValues() (res []int)

func (ButtonType) Codes

func (buttontype ButtonType) Codes() (res []string)

func (*ButtonType) FromCodeString

func (buttontype *ButtonType) FromCodeString(input string) (err error)

func (*ButtonType) FromInt

func (buttontype *ButtonType) FromInt(input int) (err error)

func (*ButtonType) ToCodeString

func (buttontype *ButtonType) ToCodeString() (res string)

func (ButtonType) ToInt

func (buttontype ButtonType) ToInt() (res int)

insertion point of enum utility functions Utility function for ButtonType 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 ClassDiagramButtonProxy

type ClassDiagramButtonProxy struct {
	ButtonType
	// contains filtered or unexported fields
}

func NewClassDiagramButtonProxy

func NewClassDiagramButtonProxy(
	stager *Stager,
	classdiagram *Classdiagram,
	node *tree.Node,
	buttonType ButtonType,
) (proxy *ClassDiagramButtonProxy)

func (*ClassDiagramButtonProxy) ButtonUpdated

func (proxy *ClassDiagramButtonProxy) ButtonUpdated(
	treeStage *tree.Stage,
	stageButton, front *tree.Button)

type ClassDiagramFormCallback

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

func (*ClassDiagramFormCallback) OnSave

func (classdiagramFormCallback *ClassDiagramFormCallback) OnSave()

type ClassDiagramGongEnumsNodeProxy

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

func (*ClassDiagramGongEnumsNodeProxy) OnAfterUpdate

func (proxy *ClassDiagramGongEnumsNodeProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)

type ClassDiagramGongNotesNodeProxy

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

func (*ClassDiagramGongNotesNodeProxy) OnAfterUpdate

func (proxy *ClassDiagramGongNotesNodeProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)

type ClassDiagramGongStructsNodeProxy

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

func (*ClassDiagramGongStructsNodeProxy) OnAfterUpdate

func (proxy *ClassDiagramGongStructsNodeProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)

type ClassDiagramNodeProxy

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

func (*ClassDiagramNodeProxy) OnAfterUpdate

func (proxy *ClassDiagramNodeProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)

OnAfterUpdate is called when a node is checked/unchecked by the user

type Classdiagram

type Classdiagram struct {
	Name string

	// gong:text width:400 height:400
	Description string

	// IsIncludedInStaticWebSite is true if the diagram
	// is present in the generated static web site documenting
	// the package
	IsIncludedInStaticWebSite bool

	// list of gongstructshapes in the diagram
	GongStructShapes []*GongStructShape

	GongEnumShapes []*GongEnumShape

	// list of notes in the diagram
	GongNoteShapes []*GongNoteShape

	// IsInRenameMode means the user can edit the node
	IsInRenameMode bool

	// IsExpanded is true if the corresponding Classdiagram node itself is expanded in a tree.
	IsExpanded bool

	// NodeGongStructsIsExpanded stores the expansion state of the "GongStructs" category node.
	NodeGongStructsIsExpanded bool

	// NodeGongStructNodeExpansion stores the expanded status per individual named struct node
	// within the "GongStructs" category, as a JSON string (e.g., "[true, false, true]").
	NodeGongStructNodeExpansion string // Refactored from NodeGongStructNodeExpansionBinaryEncoding int

	// NodeGongEnumsIsExpanded stores the expansion state of the "GongEnums" category node.
	NodeGongEnumsIsExpanded bool

	// NodeGongEnumNodeExpansion stores the expanded status per individual enum node
	// within the "GongEnums" category, as a JSON string.
	NodeGongEnumNodeExpansion string // Refactored from NodeGongEnumNodeExpansionBinaryEncoding int

	// NodeGongNotesIsExpanded stores the expansion state of the "GongNotes" category node.
	NodeGongNotesIsExpanded bool

	// NodeGongNoteNodeExpansion stores the expanded status per individual note node
	// within the "GongNotes" category, as a JSON string.
	NodeGongNoteNodeExpansion string // Refactored from NodeGongNoteNodeExpansionBinaryEncoding int
}

Classdiagram diagram struct store a class diagram swagger:model Classdiagram

func CopyBranchClassdiagram

func CopyBranchClassdiagram(mapOrigCopy map[any]any, classdiagramFrom *Classdiagram) (classdiagramTo *Classdiagram)

func (*Classdiagram) AddAttributeFieldShape

func (classdiagram *Classdiagram) AddAttributeFieldShape(
	stage *Stage,
	gongStage *gong.Stage,
	gongStruct *gong.GongStruct,
	field gong.FieldInterface,
	gongStructShape *GongStructShape)

AddToDiagram implements diagrammer.ElementNode.

func (*Classdiagram) AddGongEnumShape

func (classdiagram *Classdiagram) AddGongEnumShape(stage *Stage, diagramPackage *DiagramPackage, enumshapeName string)

func (*Classdiagram) AddGongEnumValueShapeToDiagram

func (classdiagram *Classdiagram) AddGongEnumValueShapeToDiagram(
	stage *Stage,
	gongEnumShape *GongEnumShape,
	gongEnum *gong.GongEnum,
	gongEnumValue *gong.GongEnumValue,
)

AddToDiagram implements diagrammer.ElementNode.

func (*Classdiagram) AddGongNoteShape

func (classdiagram *Classdiagram) AddGongNoteShape(stage *Stage, gongNote *gong.GongNote, diagramPackage *DiagramPackage, gongNoteShapeName string)

func (*Classdiagram) AddGongStructShape

func (classdiagram *Classdiagram) AddGongStructShape(stage *Stage, diagramPackage *DiagramPackage, gongStructShapeName string)

func (*Classdiagram) AddLinkShape

func (classdiagram *Classdiagram) AddLinkShape(
	stage *Stage,
	gongStage *gong.Stage,
	gongStruct *gong.GongStruct,
	field gong.FieldInterface,
	gongStructShape *GongStructShape)

func (*Classdiagram) Checkout

func (classdiagram *Classdiagram) Checkout(stage *Stage) *Classdiagram

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

func (*Classdiagram) Commit

func (classdiagram *Classdiagram) Commit(stage *Stage) *Classdiagram

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

func (*Classdiagram) CommitVoid

func (classdiagram *Classdiagram) CommitVoid(stage *Stage)

func (*Classdiagram) CopyBasicFields

func (from *Classdiagram) CopyBasicFields(to *Classdiagram)

func (*Classdiagram) DuplicateDiagram

func (classdiagram *Classdiagram) DuplicateDiagram() (newClassdiagram *Classdiagram)

DuplicateDiagram generates a new diagram with duplicated shapes

func (*Classdiagram) GetName

func (classdiagram *Classdiagram) GetName() (res string)

for satisfaction of GongStruct interface

func (*Classdiagram) HasGongNoteShape

func (classdiagram *Classdiagram) HasGongNoteShape(gongstructName string) (foundGongNoteShape bool, gongNoteShape *GongNoteShape)

func (*Classdiagram) HasGongStructShape

func (classdiagram *Classdiagram) HasGongStructShape(gongstructName string) (foundGongStructShape bool, gongstructshape *GongStructShape)

func (*Classdiagram) RemoveAttributeFieldShape

func (classdiagram *Classdiagram) RemoveAttributeFieldShape(
	stage *Stage,
	attributeShape *AttributeShape,
	gongStructShape *GongStructShape)

RemoveAttributeFieldShape implements diagrammer.ModelElementNode.

func (*Classdiagram) RemoveGongEnumShape

func (classdiagram *Classdiagram) RemoveGongEnumShape(stage *Stage, gongenumshapeName string)

func (*Classdiagram) RemoveGongEnumValueShapeFromDiagram

func (classdiagram *Classdiagram) RemoveGongEnumValueShapeFromDiagram(
	stage *Stage,
	gongEnumShape *GongEnumShape,
	gongEnumValue *gong.GongEnumValue,
)

RemoveFromDiagram implements diagrammer.ModelElementNode.

func (*Classdiagram) RemoveGongNoteShape

func (classdiagram *Classdiagram) RemoveGongNoteShape(stage *Stage, gongNoteName string)

func (*Classdiagram) RemoveGongStructShape

func (classdiagram *Classdiagram) RemoveGongStructShape(stage *Stage, gongstructName string)

func (*Classdiagram) RemoveLinkFieldShape

func (classdiagram *Classdiagram) RemoveLinkFieldShape(
	stage *Stage,
	linkShape *LinkShape,
	gongStructShape *GongStructShape)

RemoveLinkFieldShape implements diagrammer.ModelElementNode.

func (*Classdiagram) Stage

func (classdiagram *Classdiagram) Stage(stage *Stage) *Classdiagram

Stage puts classdiagram to the model stage

func (*Classdiagram) Unstage

func (classdiagram *Classdiagram) Unstage(stage *Stage) *Classdiagram

Unstage removes classdiagram off the model stage

func (*Classdiagram) UnstageVoid

func (classdiagram *Classdiagram) UnstageVoid(stage *Stage)

UnstageVoid removes classdiagram off the model stage

type Classdiagram_WOP

type Classdiagram_WOP struct {
	Name string

	Description string

	IsIncludedInStaticWebSite bool

	IsInRenameMode bool

	IsExpanded bool

	NodeGongStructsIsExpanded bool

	NodeGongStructNodeExpansion string

	NodeGongEnumsIsExpanded bool

	NodeGongEnumNodeExpansion string

	NodeGongNotesIsExpanded bool

	NodeGongNoteNodeExpansion string
}

type DiagramPackage

type DiagramPackage struct {
	Name string

	// Path to the "diagrams" directory
	Path string

	// GongModelPath is the package path, e.g. "fullstack-lang/gongxlsx/go/models"
	GongModelPath string

	// Classdiagrams store UML Classdiagrams
	Classdiagrams []*Classdiagram

	// SelectedClassdiagram is the diagram of interest
	SelectedClassdiagram *Classdiagram

	// pointer to the model package
	ModelPkg                     *gong_models.ModelPkg
	AbsolutePathToDiagramPackage string

	// swagger:ignore
	Map_Identifier_NbInstances map[string]int
}

DiagramPackage stores all diagrams related to a gong package swagger:model DiagramPackage

func CopyBranchDiagramPackage

func CopyBranchDiagramPackage(mapOrigCopy map[any]any, diagrampackageFrom *DiagramPackage) (diagrampackageTo *DiagramPackage)

func (*DiagramPackage) Checkout

func (diagrampackage *DiagramPackage) Checkout(stage *Stage) *DiagramPackage

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

func (*DiagramPackage) Commit

func (diagrampackage *DiagramPackage) Commit(stage *Stage) *DiagramPackage

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

func (*DiagramPackage) CommitVoid

func (diagrampackage *DiagramPackage) CommitVoid(stage *Stage)

func (*DiagramPackage) CopyBasicFields

func (from *DiagramPackage) CopyBasicFields(to *DiagramPackage)

func (*DiagramPackage) GetName

func (diagrampackage *DiagramPackage) GetName() (res string)

for satisfaction of GongStruct interface

func (*DiagramPackage) Stage

func (diagrampackage *DiagramPackage) Stage(stage *Stage) *DiagramPackage

Stage puts diagrampackage to the model stage

func (*DiagramPackage) Unstage

func (diagrampackage *DiagramPackage) Unstage(stage *Stage) *DiagramPackage

Unstage removes diagrampackage off the model stage

func (*DiagramPackage) UnstageVoid

func (diagrampackage *DiagramPackage) UnstageVoid(stage *Stage)

UnstageVoid removes diagrampackage off the model stage

type DiagramPackage_WOP

type DiagramPackage_WOP struct {
	Name string

	Path string

	GongModelPath string

	AbsolutePathToDiagramPackage string
}

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 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 GongEnumNodeProxy

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

func (*GongEnumNodeProxy) OnAfterUpdate

func (proxy *GongEnumNodeProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)

type GongEnumNodeValueProxy

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

func (*GongEnumNodeValueProxy) OnAfterUpdate

func (proxy *GongEnumNodeValueProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)

type GongEnumShape

type GongEnumShape struct {
	Name string

	X, Y float64

	//gong:meta
	IdentifierMeta any

	GongEnumValueShapes []*GongEnumValueShape

	// with and height of the shape when they are rendered on SVG or with jointjs
	// They are optional fields. they can be computed when empty
	Width, Height float64

	IsExpanded bool
}

GongEnumShape mirrors joint.shapes.uml.Class swagger:model GongEnumShape

func CopyBranchGongEnumShape

func CopyBranchGongEnumShape(mapOrigCopy map[any]any, gongenumshapeFrom *GongEnumShape) (gongenumshapeTo *GongEnumShape)

func (*GongEnumShape) Checkout

func (gongenumshape *GongEnumShape) Checkout(stage *Stage) *GongEnumShape

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

func (*GongEnumShape) Commit

func (gongenumshape *GongEnumShape) Commit(stage *Stage) *GongEnumShape

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

func (*GongEnumShape) CommitVoid

func (gongenumshape *GongEnumShape) CommitVoid(stage *Stage)

func (*GongEnumShape) CopyBasicFields

func (from *GongEnumShape) CopyBasicFields(to *GongEnumShape)

func (*GongEnumShape) GetName

func (gongenumshape *GongEnumShape) GetName() (res string)

for satisfaction of GongStruct interface

func (*GongEnumShape) Stage

func (gongenumshape *GongEnumShape) Stage(stage *Stage) *GongEnumShape

Stage puts gongenumshape to the model stage

func (*GongEnumShape) Unstage

func (gongenumshape *GongEnumShape) Unstage(stage *Stage) *GongEnumShape

Unstage removes gongenumshape off the model stage

func (*GongEnumShape) UnstageVoid

func (gongenumshape *GongEnumShape) UnstageVoid(stage *Stage)

UnstageVoid removes gongenumshape off the model stage

type GongEnumShapeType

type GongEnumShapeType int
const (
	Int GongEnumShapeType = iota
	String
)

func (GongEnumShapeType) CodeValues

func (gongenumshapetype GongEnumShapeType) CodeValues() (res []int)

func (GongEnumShapeType) Codes

func (gongenumshapetype GongEnumShapeType) Codes() (res []string)

func (*GongEnumShapeType) FromCodeString

func (gongenumshapetype *GongEnumShapeType) FromCodeString(input string) (err error)

func (*GongEnumShapeType) FromInt

func (gongenumshapetype *GongEnumShapeType) FromInt(input int) (err error)

func (*GongEnumShapeType) ToCodeString

func (gongenumshapetype *GongEnumShapeType) ToCodeString() (res string)

func (GongEnumShapeType) ToInt

func (gongenumshapetype GongEnumShapeType) ToInt() (res int)

Utility function for GongEnumShapeType 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 GongEnumShape_WOP

type GongEnumShape_WOP struct {
	Name string

	X float64

	Y float64

	IdentifierMeta any

	Width float64

	Height float64

	IsExpanded bool
}

type GongEnumValueShape

type GongEnumValueShape struct {
	// Name of the enum value
	Name string

	//gong:meta
	IdentifierMeta any
}

func CopyBranchGongEnumValueShape

func CopyBranchGongEnumValueShape(mapOrigCopy map[any]any, gongenumvalueshapeFrom *GongEnumValueShape) (gongenumvalueshapeTo *GongEnumValueShape)

func (*GongEnumValueShape) Checkout

func (gongenumvalueshape *GongEnumValueShape) Checkout(stage *Stage) *GongEnumValueShape

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

func (*GongEnumValueShape) Commit

func (gongenumvalueshape *GongEnumValueShape) Commit(stage *Stage) *GongEnumValueShape

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

func (*GongEnumValueShape) CommitVoid

func (gongenumvalueshape *GongEnumValueShape) CommitVoid(stage *Stage)

func (*GongEnumValueShape) CopyBasicFields

func (from *GongEnumValueShape) CopyBasicFields(to *GongEnumValueShape)

func (*GongEnumValueShape) GetName

func (gongenumvalueshape *GongEnumValueShape) GetName() (res string)

for satisfaction of GongStruct interface

func (*GongEnumValueShape) Stage

func (gongenumvalueshape *GongEnumValueShape) Stage(stage *Stage) *GongEnumValueShape

Stage puts gongenumvalueshape to the model stage

func (*GongEnumValueShape) Unstage

func (gongenumvalueshape *GongEnumValueShape) Unstage(stage *Stage) *GongEnumValueShape

Unstage removes gongenumvalueshape off the model stage

func (*GongEnumValueShape) UnstageVoid

func (gongenumvalueshape *GongEnumValueShape) UnstageVoid(stage *Stage)

UnstageVoid removes gongenumvalueshape off the model stage

type GongEnumValueShape_WOP

type GongEnumValueShape_WOP struct {
	Name string

	IdentifierMeta any
}

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 GongNoteLinkShape

type GongNoteLinkShape struct {
	Name string

	// Identifier of the target shape / link of the note link
	//gong:ident
	Identifier string

	// Type of the target shape / link of the note link
	Type NoteShapeLinkType
}

A GongNoteLinkShape is a visual link from a shape to a Link or to a Classshape

Because of[issue](https://github.com/golang/go/issues/57559) the referenced identifiers in the note comments are not renamed. Unlinke for identifiers used for referencing stuff, there is workaround this limitation

func CopyBranchGongNoteLinkShape

func CopyBranchGongNoteLinkShape(mapOrigCopy map[any]any, gongnotelinkshapeFrom *GongNoteLinkShape) (gongnotelinkshapeTo *GongNoteLinkShape)

func (*GongNoteLinkShape) Checkout

func (gongnotelinkshape *GongNoteLinkShape) Checkout(stage *Stage) *GongNoteLinkShape

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

func (*GongNoteLinkShape) Commit

func (gongnotelinkshape *GongNoteLinkShape) Commit(stage *Stage) *GongNoteLinkShape

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

func (*GongNoteLinkShape) CommitVoid

func (gongnotelinkshape *GongNoteLinkShape) CommitVoid(stage *Stage)

func (*GongNoteLinkShape) CopyBasicFields

func (from *GongNoteLinkShape) CopyBasicFields(to *GongNoteLinkShape)

func (*GongNoteLinkShape) GetName

func (gongnotelinkshape *GongNoteLinkShape) GetName() (res string)

for satisfaction of GongStruct interface

func (*GongNoteLinkShape) Stage

func (gongnotelinkshape *GongNoteLinkShape) Stage(stage *Stage) *GongNoteLinkShape

Stage puts gongnotelinkshape to the model stage

func (*GongNoteLinkShape) Unstage

func (gongnotelinkshape *GongNoteLinkShape) Unstage(stage *Stage) *GongNoteLinkShape

Unstage removes gongnotelinkshape off the model stage

func (*GongNoteLinkShape) UnstageVoid

func (gongnotelinkshape *GongNoteLinkShape) UnstageVoid(stage *Stage)

UnstageVoid removes gongnotelinkshape off the model stage

type GongNoteLinkShape_WOP

type GongNoteLinkShape_WOP struct {
	Name string

	Identifier string

	Type NoteShapeLinkType
}

type GongNoteNodeProxy

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

func (*GongNoteNodeProxy) OnAfterUpdate

func (proxy *GongNoteNodeProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)

type GongNoteShape

type GongNoteShape struct {
	Name string

	// Identifier of the note object in the model package
	// a note is a special coment syntax https://pkg.go.dev/go/doc#Note
	// see vendor/github.com/fullstack-lang/gong/go/models/gong_note.go
	// since a note name is not an identifier, it cannot be renamed by gopls
	// unless it is understood to be the name of the identifier immediatly
	// following the comment
	//
	// Gongdoc makes this option a wrtting condition for note:
	// a comment text in gong containing a
	// 'gongnote' have to be followed by a constant identifier.
	//
	//    // GONGNOTE(ShortNodeOnModels): this is an example of a short note
	//    // It uses the DocLink convention for referencing Identifiers
	//    // In this case [Line], [Point] and [Line.Start]
	//    const ShortNodeOnModels = ""
	//
	// the following directive directs gong to manage this field as an identifier field
	//
	//gong:ident
	Identifier string

	Body string

	BodyHTML string

	X, Y          float64
	Width, Height float64
	Matched       bool // if a note with the same name has been found

	GongNoteLinkShapes []*GongNoteLinkShape

	IsExpanded bool
}

GongNoteShape is a UML note in a class diagram

func CopyBranchGongNoteShape

func CopyBranchGongNoteShape(mapOrigCopy map[any]any, gongnoteshapeFrom *GongNoteShape) (gongnoteshapeTo *GongNoteShape)

func (*GongNoteShape) Checkout

func (gongnoteshape *GongNoteShape) Checkout(stage *Stage) *GongNoteShape

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

func (*GongNoteShape) Commit

func (gongnoteshape *GongNoteShape) Commit(stage *Stage) *GongNoteShape

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

func (*GongNoteShape) CommitVoid

func (gongnoteshape *GongNoteShape) CommitVoid(stage *Stage)

func (*GongNoteShape) CopyBasicFields

func (from *GongNoteShape) CopyBasicFields(to *GongNoteShape)

func (*GongNoteShape) GetName

func (gongnoteshape *GongNoteShape) GetName() (res string)

for satisfaction of GongStruct interface

func (*GongNoteShape) Stage

func (gongnoteshape *GongNoteShape) Stage(stage *Stage) *GongNoteShape

Stage puts gongnoteshape to the model stage

func (*GongNoteShape) Unstage

func (gongnoteshape *GongNoteShape) Unstage(stage *Stage) *GongNoteShape

Unstage removes gongnoteshape off the model stage

func (*GongNoteShape) UnstageVoid

func (gongnoteshape *GongNoteShape) UnstageVoid(stage *Stage)

UnstageVoid removes gongnoteshape off the model stage

type GongNoteShape_WOP

type GongNoteShape_WOP struct {
	Name string

	Identifier string

	Body string

	BodyHTML string

	X float64

	Y float64

	Width float64

	Height float64

	Matched bool

	IsExpanded bool
}

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 GongStructNodeProxy

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

func (*GongStructNodeProxy) OnAfterUpdate

func (proxy *GongStructNodeProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)

type GongStructShape

type GongStructShape struct {
	Name string

	X float64
	Y float64

	// Identifier is the identifier of the struct referenced by the shape in the modeled package
	//gong:meta
	IdentifierMeta any

	// models of the composition of Field
	AttributeShapes []*AttributeShape

	// models of the composition of Link
	LinkShapes []*LinkShape

	// with and height of the shape when they are rendered on SVG or with jointjs
	// They are optional fields. they can be computed when empty
	Width, Height float64

	// this is always false in the backend, but it can be set to true by the front end
	// this means it is selected by the user
	IsSelected bool
}

GongStructShape mirrors joint.shapes.uml.Class swagger:model GongStructShape

func CopyBranchGongStructShape

func CopyBranchGongStructShape(mapOrigCopy map[any]any, gongstructshapeFrom *GongStructShape) (gongstructshapeTo *GongStructShape)

func (*GongStructShape) Checkout

func (gongstructshape *GongStructShape) Checkout(stage *Stage) *GongStructShape

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

func (*GongStructShape) Commit

func (gongstructshape *GongStructShape) Commit(stage *Stage) *GongStructShape

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

func (*GongStructShape) CommitVoid

func (gongstructshape *GongStructShape) CommitVoid(stage *Stage)

func (*GongStructShape) CopyBasicFields

func (from *GongStructShape) CopyBasicFields(to *GongStructShape)

func (*GongStructShape) GetName

func (gongstructshape *GongStructShape) GetName() (res string)

for satisfaction of GongStruct interface

func (*GongStructShape) Stage

func (gongstructshape *GongStructShape) Stage(stage *Stage) *GongStructShape

Stage puts gongstructshape to the model stage

func (*GongStructShape) Unstage

func (gongstructshape *GongStructShape) Unstage(stage *Stage) *GongStructShape

Unstage removes gongstructshape off the model stage

func (*GongStructShape) UnstageVoid

func (gongstructshape *GongStructShape) UnstageVoid(stage *Stage)

UnstageVoid removes gongstructshape off the model stage

type GongStructShape_WOP

type GongStructShape_WOP struct {
	Name string

	X float64

	Y float64

	IdentifierMeta any

	Width float64

	Height float64

	IsSelected bool
}

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 | ButtonType | GongEnumShapeType
	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 LinkFieldNodeProxy

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

func (*LinkFieldNodeProxy) OnAfterUpdate

func (proxy *LinkFieldNodeProxy) OnAfterUpdate(
	stage *tree.Stage,
	staged, front *tree.Node)
type LinkImplLink struct {
	// contains filtered or unexported fields
}

LinkImplLink it meets the interface of LinkImplInterface

func NewLinkImplLink(
	link *LinkShape,
	gongdocStage *Stage) (linkImplLink *LinkImplLink)

func (*LinkImplLink) LinkUpdated

func (linkImplLink *LinkImplLink) LinkUpdated(updatedLink *gongsvg_models.Link)

type LinkShape

type LinkShape struct {
	Name string

	// for storing the reference as a renaming target for gopls
	// for instance 'ref_models.Astruct.Anarrayofb'
	//gong:meta
	IdentifierMeta any

	//gong:meta
	FieldTypeIdentifierMeta any

	// position of the field text relative to the
	// arrow end
	FieldOffsetX float64
	FieldOffsetY float64

	TargetMultiplicity MultiplicityType

	// position of the TargetMultiplicity text relative to the
	// arrow end
	TargetMultiplicityOffsetX float64
	TargetMultiplicityOffsetY float64

	SourceMultiplicity MultiplicityType

	// position of the SourceMultiplicity text relative to the
	// arrow end
	SourceMultiplicityOffsetX float64
	SourceMultiplicityOffsetY float64

	// for links with floating anchors
	// if link type is floating orthogonal ratio, from 0 to 1,
	// where the anchor starts on the edge (horizontal / vertical)
	// Vertice in the middle
	X                float64
	Y                float64
	StartOrientation OrientationType
	StartRatio       float64
	EndOrientation   OrientationType
	EndRatio         float64

	// in case StartOrientation is the same as EndOrientation,
	// there is a perpendicular line that reach the corner at
	// CornerOffsetRatio
	CornerOffsetRatio float64
}

LinkShape represent the UML LinkShape in any diagram uni-directional https://en.wikipedia.org/wiki/Association_(object-oriented_programming) More specificaly It is a 0..1 ---> 0..1 swagger:model LinkShape

func CopyBranchLinkShape

func CopyBranchLinkShape(mapOrigCopy map[any]any, linkshapeFrom *LinkShape) (linkshapeTo *LinkShape)

func (*LinkShape) Checkout

func (linkshape *LinkShape) Checkout(stage *Stage) *LinkShape

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

func (*LinkShape) Commit

func (linkshape *LinkShape) Commit(stage *Stage) *LinkShape

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

func (*LinkShape) CommitVoid

func (linkshape *LinkShape) CommitVoid(stage *Stage)

func (*LinkShape) CopyBasicFields

func (from *LinkShape) CopyBasicFields(to *LinkShape)

func (*LinkShape) GetName

func (linkshape *LinkShape) GetName() (res string)

for satisfaction of GongStruct interface

func (*LinkShape) Stage

func (linkshape *LinkShape) Stage(stage *Stage) *LinkShape

Stage puts linkshape to the model stage

func (*LinkShape) Unstage

func (linkshape *LinkShape) Unstage(stage *Stage) *LinkShape

Unstage removes linkshape off the model stage

func (*LinkShape) UnstageVoid

func (linkshape *LinkShape) UnstageVoid(stage *Stage)

UnstageVoid removes linkshape off the model stage

type LinkShape_WOP

type LinkShape_WOP struct {
	Name string

	IdentifierMeta any

	FieldTypeIdentifierMeta any

	FieldOffsetX float64

	FieldOffsetY float64

	TargetMultiplicity MultiplicityType

	TargetMultiplicityOffsetX float64

	TargetMultiplicityOffsetY float64

	SourceMultiplicity MultiplicityType

	SourceMultiplicityOffsetX float64

	SourceMultiplicityOffsetY float64

	X float64

	Y float64

	StartOrientation OrientationType

	StartRatio float64

	EndOrientation OrientationType

	EndRatio float64

	CornerOffsetRatio float64
}

type ModelElement

type ModelElement interface {
}

type MultiplicityType

type MultiplicityType string
const (
	ZERO_ONE MultiplicityType = "0..1"
	ONE      MultiplicityType = "1"
	MANY     MultiplicityType = "*"
)

values for EnumType

func (MultiplicityType) CodeValues

func (multiplicitytype MultiplicityType) CodeValues() (res []string)

func (MultiplicityType) Codes

func (multiplicitytype MultiplicityType) Codes() (res []string)

func (*MultiplicityType) FromCodeString

func (multiplicitytype *MultiplicityType) FromCodeString(input string) (err error)

func (*MultiplicityType) FromString

func (multiplicitytype *MultiplicityType) FromString(input string) (err error)

func (*MultiplicityType) ToCodeString

func (multiplicitytype *MultiplicityType) ToCodeString() (res string)

func (MultiplicityType) ToString

func (multiplicitytype MultiplicityType) ToString() (res string)

Utility function for MultiplicityType 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 NamedStruct

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

func (*NamedStruct) GetName

func (namedStruct *NamedStruct) GetName() string

type NoteShapeLinkType

type NoteShapeLinkType string
const (
	NOTE_SHAPE_LINK_TO_GONG_STRUCT_OR_ENUM_SHAPE NoteShapeLinkType = "NOTE_SHAPE_LINK_TO_GONG_STRUCT_OR_ENUM_SHAPE"
	NOTE_SHAPE_LINK_TO_GONG_FIELD                NoteShapeLinkType = "NOTE_SHAPE_LINK_TO_GONG_FIELD"
)

func (NoteShapeLinkType) CodeValues

func (noteshapelinktype NoteShapeLinkType) CodeValues() (res []string)

func (NoteShapeLinkType) Codes

func (noteshapelinktype NoteShapeLinkType) Codes() (res []string)

func (*NoteShapeLinkType) FromCodeString

func (noteshapelinktype *NoteShapeLinkType) FromCodeString(input string) (err error)

func (*NoteShapeLinkType) FromString

func (noteshapelinktype *NoteShapeLinkType) FromString(input string) (err error)

func (*NoteShapeLinkType) ToCodeString

func (noteshapelinktype *NoteShapeLinkType) ToCodeString() (res string)

func (NoteShapeLinkType) ToString

func (noteshapelinktype NoteShapeLinkType) ToString() (res string)

Utility function for NoteShapeLinkType 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 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 OrientationType

type OrientationType string
const (
	ORIENTATION_HORIZONTAL OrientationType = "ORIENTATION_HORIZONTAL"
	ORIENTATION_VERTICAL   OrientationType = "ORIENTATION_VERTICAL"
)

values for EnumType

func (OrientationType) CodeValues

func (orientationtype OrientationType) CodeValues() (res []string)

func (OrientationType) Codes

func (orientationtype OrientationType) Codes() (res []string)

func (*OrientationType) FromCodeString

func (orientationtype *OrientationType) FromCodeString(input string) (err error)

func (*OrientationType) FromString

func (orientationtype *OrientationType) FromString(input string) (err error)

func (*OrientationType) ToCodeString

func (orientationtype *OrientationType) ToCodeString() (res string)

func (OrientationType) ToString

func (orientationtype OrientationType) ToString() (res string)

Utility function for OrientationType 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 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 {
	*ButtonType | *GongEnumShapeType
	FromCodeString(input string) (err error)
}

type PointerToGongstructEnumStringField

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

type RectImplGongenumShape

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

RectImplGongenumShape it meets the interface of RectImplInterface

func NewRectImplGongenumShape

func NewRectImplGongenumShape(
	gongEnumShape *GongEnumShape,
	gongdocStage *Stage) (rectImplGongenumShape *RectImplGongenumShape)

func (*RectImplGongenumShape) RectUpdated

func (rectImplGongenumShape *RectImplGongenumShape) RectUpdated(updatedRect *gongsvg_models.Rect)

type RectImplGongstructShape

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

RectImplGongstructShape it meets the interface of RectImplInterface

func NewRectImplGongstructShape

func NewRectImplGongstructShape(
	gongstructShape *GongStructShape,
	gongdocStage *Stage) (rectImplGongstructShape *RectImplGongstructShape)

func (*RectImplGongstructShape) RectUpdated

func (rectImplGongstructShape *RectImplGongstructShape) RectUpdated(updatedRect *gongsvg_models.Rect)

type RectImplNoteShape

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

RectImplNoteShape it meets the interface of RectImplInterface

func NewRectImplNoteShape

func NewRectImplNoteShape(
	noteShape *GongNoteShape,
	gongdocStage *Stage) (rectImplNoteShape *RectImplNoteShape)

func (*RectImplNoteShape) RectUpdated

func (rectImplNoteShape *RectImplNoteShape) RectUpdated(updatedRect *gongsvg_models.Rect)

type ReverseField

type ReverseField struct {
	GongstructName string
	Fieldname      string
}

func GetReverseFields

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

type Shape

type Shape interface {
}

type Stage

type Stage struct {

	// insertion point for definition of arrays registering instances
	AttributeShapes           map[*AttributeShape]any
	AttributeShapes_mapString map[string]*AttributeShape

	// insertion point for slice of pointers maps
	OnAfterAttributeShapeCreateCallback               OnAfterCreateInterface[AttributeShape]
	OnAfterAttributeShapeUpdateCallback               OnAfterUpdateInterface[AttributeShape]
	OnAfterAttributeShapeUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[AttributeShape]
	OnAfterAttributeShapeDeleteCallback               OnAfterDeleteInterface[AttributeShape]
	OnAfterAttributeShapeReadCallback                 OnAfterReadInterface[AttributeShape]

	Classdiagrams           map[*Classdiagram]any
	Classdiagrams_mapString map[string]*Classdiagram

	// insertion point for slice of pointers maps
	Classdiagram_GongStructShapes_reverseMap map[*GongStructShape]*Classdiagram

	Classdiagram_GongEnumShapes_reverseMap map[*GongEnumShape]*Classdiagram

	Classdiagram_GongNoteShapes_reverseMap map[*GongNoteShape]*Classdiagram

	OnAfterClassdiagramCreateCallback               OnAfterCreateInterface[Classdiagram]
	OnAfterClassdiagramUpdateCallback               OnAfterUpdateInterface[Classdiagram]
	OnAfterClassdiagramUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[Classdiagram]
	OnAfterClassdiagramDeleteCallback               OnAfterDeleteInterface[Classdiagram]
	OnAfterClassdiagramReadCallback                 OnAfterReadInterface[Classdiagram]

	DiagramPackages           map[*DiagramPackage]any
	DiagramPackages_mapString map[string]*DiagramPackage

	// insertion point for slice of pointers maps
	DiagramPackage_Classdiagrams_reverseMap map[*Classdiagram]*DiagramPackage

	OnAfterDiagramPackageCreateCallback               OnAfterCreateInterface[DiagramPackage]
	OnAfterDiagramPackageUpdateCallback               OnAfterUpdateInterface[DiagramPackage]
	OnAfterDiagramPackageUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[DiagramPackage]
	OnAfterDiagramPackageDeleteCallback               OnAfterDeleteInterface[DiagramPackage]
	OnAfterDiagramPackageReadCallback                 OnAfterReadInterface[DiagramPackage]

	GongEnumShapes           map[*GongEnumShape]any
	GongEnumShapes_mapString map[string]*GongEnumShape

	// insertion point for slice of pointers maps
	GongEnumShape_GongEnumValueShapes_reverseMap map[*GongEnumValueShape]*GongEnumShape

	OnAfterGongEnumShapeCreateCallback               OnAfterCreateInterface[GongEnumShape]
	OnAfterGongEnumShapeUpdateCallback               OnAfterUpdateInterface[GongEnumShape]
	OnAfterGongEnumShapeUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[GongEnumShape]
	OnAfterGongEnumShapeDeleteCallback               OnAfterDeleteInterface[GongEnumShape]
	OnAfterGongEnumShapeReadCallback                 OnAfterReadInterface[GongEnumShape]

	GongEnumValueShapes           map[*GongEnumValueShape]any
	GongEnumValueShapes_mapString map[string]*GongEnumValueShape

	// insertion point for slice of pointers maps
	OnAfterGongEnumValueShapeCreateCallback               OnAfterCreateInterface[GongEnumValueShape]
	OnAfterGongEnumValueShapeUpdateCallback               OnAfterUpdateInterface[GongEnumValueShape]
	OnAfterGongEnumValueShapeUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[GongEnumValueShape]
	OnAfterGongEnumValueShapeDeleteCallback               OnAfterDeleteInterface[GongEnumValueShape]
	OnAfterGongEnumValueShapeReadCallback                 OnAfterReadInterface[GongEnumValueShape]

	GongNoteLinkShapes           map[*GongNoteLinkShape]any
	GongNoteLinkShapes_mapString map[string]*GongNoteLinkShape

	// insertion point for slice of pointers maps
	OnAfterGongNoteLinkShapeCreateCallback               OnAfterCreateInterface[GongNoteLinkShape]
	OnAfterGongNoteLinkShapeUpdateCallback               OnAfterUpdateInterface[GongNoteLinkShape]
	OnAfterGongNoteLinkShapeUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[GongNoteLinkShape]
	OnAfterGongNoteLinkShapeDeleteCallback               OnAfterDeleteInterface[GongNoteLinkShape]
	OnAfterGongNoteLinkShapeReadCallback                 OnAfterReadInterface[GongNoteLinkShape]

	GongNoteShapes           map[*GongNoteShape]any
	GongNoteShapes_mapString map[string]*GongNoteShape

	// insertion point for slice of pointers maps
	GongNoteShape_GongNoteLinkShapes_reverseMap map[*GongNoteLinkShape]*GongNoteShape

	OnAfterGongNoteShapeCreateCallback               OnAfterCreateInterface[GongNoteShape]
	OnAfterGongNoteShapeUpdateCallback               OnAfterUpdateInterface[GongNoteShape]
	OnAfterGongNoteShapeUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[GongNoteShape]
	OnAfterGongNoteShapeDeleteCallback               OnAfterDeleteInterface[GongNoteShape]
	OnAfterGongNoteShapeReadCallback                 OnAfterReadInterface[GongNoteShape]

	GongStructShapes           map[*GongStructShape]any
	GongStructShapes_mapString map[string]*GongStructShape

	// insertion point for slice of pointers maps
	GongStructShape_AttributeShapes_reverseMap map[*AttributeShape]*GongStructShape

	GongStructShape_LinkShapes_reverseMap map[*LinkShape]*GongStructShape

	OnAfterGongStructShapeCreateCallback               OnAfterCreateInterface[GongStructShape]
	OnAfterGongStructShapeUpdateCallback               OnAfterUpdateInterface[GongStructShape]
	OnAfterGongStructShapeUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[GongStructShape]
	OnAfterGongStructShapeDeleteCallback               OnAfterDeleteInterface[GongStructShape]
	OnAfterGongStructShapeReadCallback                 OnAfterReadInterface[GongStructShape]

	LinkShapes           map[*LinkShape]any
	LinkShapes_mapString map[string]*LinkShape

	// insertion point for slice of pointers maps
	OnAfterLinkShapeCreateCallback               OnAfterCreateInterface[LinkShape]
	OnAfterLinkShapeUpdateCallback               OnAfterUpdateInterface[LinkShape]
	OnAfterLinkShapeUpdateWithMouseEventCallback OnAfterUpdateWithMouseEventInterface[LinkShape]
	OnAfterLinkShapeDeleteCallback               OnAfterDeleteInterface[LinkShape]
	OnAfterLinkShapeReadCallback                 OnAfterReadInterface[LinkShape]

	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
	AttributeShapeOrder            uint
	AttributeShapeMap_Staged_Order map[*AttributeShape]uint

	ClassdiagramOrder            uint
	ClassdiagramMap_Staged_Order map[*Classdiagram]uint

	DiagramPackageOrder            uint
	DiagramPackageMap_Staged_Order map[*DiagramPackage]uint

	GongEnumShapeOrder            uint
	GongEnumShapeMap_Staged_Order map[*GongEnumShape]uint

	GongEnumValueShapeOrder            uint
	GongEnumValueShapeMap_Staged_Order map[*GongEnumValueShape]uint

	GongNoteLinkShapeOrder            uint
	GongNoteLinkShapeMap_Staged_Order map[*GongNoteLinkShape]uint

	GongNoteShapeOrder            uint
	GongNoteShapeMap_Staged_Order map[*GongNoteShape]uint

	GongStructShapeOrder            uint
	GongStructShapeMap_Staged_Order map[*GongStructShape]uint

	LinkShapeOrder            uint
	LinkShapeMap_Staged_Order map[*LinkShape]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) IsStagedAttributeShape

func (stage *Stage) IsStagedAttributeShape(attributeshape *AttributeShape) (ok bool)

insertion point for stage per struct

func (*Stage) IsStagedClassdiagram

func (stage *Stage) IsStagedClassdiagram(classdiagram *Classdiagram) (ok bool)

func (*Stage) IsStagedDiagramPackage

func (stage *Stage) IsStagedDiagramPackage(diagrampackage *DiagramPackage) (ok bool)

func (*Stage) IsStagedGongEnumShape

func (stage *Stage) IsStagedGongEnumShape(gongenumshape *GongEnumShape) (ok bool)

func (*Stage) IsStagedGongEnumValueShape

func (stage *Stage) IsStagedGongEnumValueShape(gongenumvalueshape *GongEnumValueShape) (ok bool)

func (*Stage) IsStagedGongNoteLinkShape

func (stage *Stage) IsStagedGongNoteLinkShape(gongnotelinkshape *GongNoteLinkShape) (ok bool)

func (*Stage) IsStagedGongNoteShape

func (stage *Stage) IsStagedGongNoteShape(gongnoteshape *GongNoteShape) (ok bool)

func (*Stage) IsStagedGongStructShape

func (stage *Stage) IsStagedGongStructShape(gongstructshape *GongStructShape) (ok bool)

func (*Stage) IsStagedLinkShape

func (stage *Stage) IsStagedLinkShape(linkshape *LinkShape) (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) MarshallToString

func (stage *Stage) MarshallToString(modelsPackageName, packageName string) (res string, err error)

MarshallToString marshall the stage content into a string

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) StageBranchAttributeShape

func (stage *Stage) StageBranchAttributeShape(attributeshape *AttributeShape)

insertion point for stage branch per struct

func (*Stage) StageBranchClassdiagram

func (stage *Stage) StageBranchClassdiagram(classdiagram *Classdiagram)

func (*Stage) StageBranchDiagramPackage

func (stage *Stage) StageBranchDiagramPackage(diagrampackage *DiagramPackage)

func (*Stage) StageBranchGongEnumShape

func (stage *Stage) StageBranchGongEnumShape(gongenumshape *GongEnumShape)

func (*Stage) StageBranchGongEnumValueShape

func (stage *Stage) StageBranchGongEnumValueShape(gongenumvalueshape *GongEnumValueShape)

func (*Stage) StageBranchGongNoteLinkShape

func (stage *Stage) StageBranchGongNoteLinkShape(gongnotelinkshape *GongNoteLinkShape)

func (*Stage) StageBranchGongNoteShape

func (stage *Stage) StageBranchGongNoteShape(gongnoteshape *GongNoteShape)

func (*Stage) StageBranchGongStructShape

func (stage *Stage) StageBranchGongStructShape(gongstructshape *GongStructShape)

func (*Stage) StageBranchLinkShape

func (stage *Stage) StageBranchLinkShape(linkshape *LinkShape)

func (*Stage) Unstage

func (stage *Stage) Unstage()

func (*Stage) UnstageBranchAttributeShape

func (stage *Stage) UnstageBranchAttributeShape(attributeshape *AttributeShape)

insertion point for unstage branch per struct

func (*Stage) UnstageBranchClassdiagram

func (stage *Stage) UnstageBranchClassdiagram(classdiagram *Classdiagram)

func (*Stage) UnstageBranchDiagramPackage

func (stage *Stage) UnstageBranchDiagramPackage(diagrampackage *DiagramPackage)

func (*Stage) UnstageBranchGongEnumShape

func (stage *Stage) UnstageBranchGongEnumShape(gongenumshape *GongEnumShape)

func (*Stage) UnstageBranchGongEnumValueShape

func (stage *Stage) UnstageBranchGongEnumValueShape(gongenumvalueshape *GongEnumValueShape)

func (*Stage) UnstageBranchGongNoteLinkShape

func (stage *Stage) UnstageBranchGongNoteLinkShape(gongnotelinkshape *GongNoteLinkShape)

func (*Stage) UnstageBranchGongNoteShape

func (stage *Stage) UnstageBranchGongNoteShape(gongnoteshape *GongNoteShape)

func (*Stage) UnstageBranchGongStructShape

func (stage *Stage) UnstageBranchGongStructShape(gongstructshape *GongStructShape)

func (*Stage) UnstageBranchLinkShape

func (stage *Stage) UnstageBranchLinkShape(linkshape *LinkShape)

type Stager

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

func NewStager

func NewStager(
	r *gin.Engine,
	receivingAsSplitArea *split.AsSplitArea,
	stage *Stage,
	treeStage *tree.Stage,
	svgStage *svg.Stage,
	gongStage *gong.Stage,
	formStage *table.Stage,
	ssgStage *ssg.Stage,

	embeddedDiagrams bool,

	map_GongStructName_InstancesNb map[string]int,

) (stager *Stager)

func (*Stager) UpdateAndCommitFormStage

func (stager *Stager) UpdateAndCommitFormStage()

func (*Stager) UpdateAndCommitSVGStage

func (stager *Stager) UpdateAndCommitSVGStage()

func (*Stager) UpdateAndCommitTreeStage

func (stager *Stager) UpdateAndCommitTreeStage()

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 TreeNames

type TreeNames string

TreeNames are the names of the tree used in the front using an enum allows the compile-time consistency of the tree names between the front and the back

const (
	Portfolio TreeNames = "portfolio"
	Model     TreeNames = "model"
)

func (TreeNames) CodeValues

func (treenames TreeNames) CodeValues() (res []string)

func (TreeNames) Codes

func (treenames TreeNames) Codes() (res []string)

func (*TreeNames) FromCodeString

func (treenames *TreeNames) FromCodeString(input string) (err error)

func (*TreeNames) FromString

func (treenames *TreeNames) FromString(input string) (err error)

func (*TreeNames) ToCodeString

func (treenames *TreeNames) ToCodeString() (res string)

func (TreeNames) ToString

func (treenames TreeNames) ToString() (res string)

Utility function for TreeNames 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

Directories

Path Synopsis
nodestates/nodestates.go
nodestates/nodestates.go

Jump to

Keyboard shortcuts

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