models

package
v0.0.0-...-ec5ad42 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 22 Imported by: 24

Documentation

Overview

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

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

Index

Constants

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 IdentifiersDecls = `
	{{Identifier}} := (&models.{{GeneratedStructName}}{Name: ` + "`" + `{{GeneratedFieldNameValue}}` + "`" + `}).Stage(stage)`
View Source
const LegacyDiagramUmarshalling = false
View Source
const NoteOnGongdoc = ""

GONGNOTE(NoteOnGongdoc): Note Example

This note can refers to models.NoteShape or to models.Classdiagram.NoteShapes or to models.OrientationType

View Source
const NumberInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
View Source
const PointerFieldInitStatement = `
	{{Identifier}}.{{GeneratedFieldName}} = {{GeneratedFieldNameValue}}`
View Source
const RefPackagePlusPeriod = "models."
View Source
const RefPrefixReferencedPackage = "ref_"
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 *StageStruct, instance *Type)

AfterCreateFromFront is called after a create from front

func AfterDeleteFromFront

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

AfterDeleteFromFront is called after a delete from front

func AfterReadFromFront

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

AfterReadFromFront is called after a Read from front

func AfterUpdateFromFront

func AfterUpdateFromFront[Type Gongstruct](stage *StageStruct, old, new *Type)

AfterUpdateFromFront is called after a update from front

func CompareGongstructByName

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

func CopyBranch

func CopyBranch[Type Gongstruct](from *Type) (to *Type)

CopyBranch stages instance and apply CopyBranch on all gongstruct instances that are referenced by pointers or slices of pointers of the instance

the algorithm stops along the course of graph if a vertex is already staged

func EvictInOtherSlices

func EvictInOtherSlices[OwningType PointerToGongstruct, FieldType PointerToGongstruct](
	stage *StageStruct,
	owningInstance OwningType,
	sliceField []FieldType,
	fieldName string)

EvictInOtherSlices allows for adherance between the gong association model and go.

Says you have a Astruct struct with a slice field "anarrayofb []*Bstruct"

go allows many Astruct instance to have the anarrayofb field that have the same pointers. go slices are MANY-MANY association.

With gong it is only ZERO-ONE-MANY associations, a Bstruct can be pointed only once by an Astruct instance through a given field. This follows the requirement that gong is suited for full stack programming and therefore the association is encoded as a reverse pointer (not as a joint table). In gong, a named struct is translated in a table and each table is a named struct.

EvictInOtherSlices removes the fields instances from other fields of other instance

Note : algo is in O(N)log(N) of nb of Astruct and Bstruct instances

func GetAssociationName

func GetAssociationName[Type Gongstruct]() *Type

GetAssociationName is a generic function that returns an instance of Type where each association is filled with an instance whose name is the name of the association

This function can be handy for generating navigation function that are refactorable

func GetFieldStringValue

func GetFieldStringValue[Type Gongstruct](instance Type, fieldName string) (res string)

func GetFieldStringValueFromPointer

func GetFieldStringValueFromPointer[Type PointerToGongstruct](instance Type, fieldName string) (res string)

func GetFields

func GetFields[Type Gongstruct]() (res []string)

GetFields return the array of the fields

func GetFieldsFromPointer

func GetFieldsFromPointer[Type PointerToGongstruct]() (res []string)

GetFieldsFromPointer return the array of the fields

func GetGongstrucsSorted

func GetGongstrucsSorted[T PointerToGongstruct](stage *StageStruct) (sortedSlice []T)

func GetGongstructInstancesMap

func GetGongstructInstancesMap[Type Gongstruct](stage *StageStruct) *map[string]*Type

GetGongstructInstancesMap returns the map of staged GongstructType instances it is usefull because it allows refactoring of gong struct identifier

func GetGongstructInstancesSet

func GetGongstructInstancesSet[Type Gongstruct](stage *StageStruct) *map[*Type]any

GetGongstructInstancesSet returns the set staged GongstructType instances it is usefull because it allows refactoring of gongstruct identifier

func GetGongstructInstancesSetFromPointerType

func GetGongstructInstancesSetFromPointerType[Type PointerToGongstruct](stage *StageStruct) *map[Type]any

GetGongstructInstancesSetFromPointerType returns the set staged GongstructType instances it is usefull because it allows refactoring of gongstruct identifier

func GetGongstructName

func GetGongstructName[Type Gongstruct]() (res string)

GetGongstructName returns the name of the Gongstruct this can be usefull if one want program robust to refactoring

func GetPointerReverseMap

func GetPointerReverseMap[Start, End Gongstruct](fieldname string, stage *StageStruct) map[*End][]*Start

GetPointerReverseMap allows backtrack navigation of any Start.Fieldname associations (0..1) that is a pointer from one staged Gongstruct (type Start) instances to another (type End)

The function provides a map with keys as instances of End and values to arrays of *Start the map is construed by iterating over all Start instances and populationg keys with End instances and values with slice of Start instances

func GetPointerToGongstructName

func GetPointerToGongstructName[Type PointerToGongstruct]() (res string)

GetPointerToGongstructName returns the name of the Gongstruct this can be usefull if one want program robust to refactoring

func GetSliceOfPointersReverseMap

func GetSliceOfPointersReverseMap[Start, End Gongstruct](fieldname string, stage *StageStruct) map[*End]*Start

GetSliceOfPointersReverseMap allows backtrack navigation of any Start.Fieldname associations (0..N) between one staged Gongstruct instances and many others

The function provides a map with keys as instances of End and values to *Start instances the map is construed by iterating over all Start instances and populating keys with End instances and values with the Start instances

func GongGetMap

func GongGetMap[Type GongstructMapString](stage *StageStruct) *Type

GongGetMap returns the map of staged GongstructType instances it is usefull because it allows refactoring of gong struct identifier

func GongGetSet

func GongGetSet[Type GongstructSet](stage *StageStruct) *Type

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

func 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 IdentifierToFieldName

func IdentifierToFieldName(fieldIdentifier string) (fieldName string)

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

func IdentifierToGongObjectName

func IdentifierToGongObjectName(structIdentifier string) (structName string)

IdentifierToGongObjectName 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 *StageStruct, instance *Type) (ok bool)

func ParseAstFile

func ParseAstFile(stage *StageStruct, pathToFile string) error

ParseAstFile Parse pathToFile and stages all instances declared in the file

func ParseAstFileFromAst

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

ParseAstFile Parse pathToFile and stages all instances declared in the file

func Serialize

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

func SerializeExcelize

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

func SerializeStage

func SerializeStage(stage *StageStruct, filename string)

func SetCallbackAfterCreateFromFront

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

func SetCallbackAfterDeleteFromFront

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

func SetCallbackAfterReadFromFront

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

func SetCallbackAfterUpdateFromFront

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

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

func SetOrchestratorOnAfterUpdate

func SetOrchestratorOnAfterUpdate[Type Gongstruct](stage *StageStruct)

func SetupMapDocLinkRenaming

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

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 *StageStruct, instance *Type)

StageBranch stages instance and apply StageBranch on all gongstruct instances that are referenced by pointers or slices of pointers of the instance

the algorithm stops along the course of graph if a vertex is already staged

func UnmarshallGongstructStaging

func UnmarshallGongstructStaging(stage *StageStruct, cmap *ast.CommentMap, assignStmt *ast.AssignStmt, astCoordinate_ string) (
	instance any,
	identifier string,
	gongstructName string,
	fieldName string)

UnmarshallGoStaging unmarshall a go assign statement

func UnstageBranch

func UnstageBranch[Type Gongstruct](stage *StageStruct, instance *Type)

UnstageBranch stages instance and apply UnstageBranch on all gongstruct instances that are referenced by pointers or slices of pointers of the insance

the algorithm stops along the course of graph if a vertex is already staged

Types

type AllModelsStructCreateInterface

type AllModelsStructCreateInterface interface {
	CreateORMClassdiagram(Classdiagram *Classdiagram)
	CreateORMDiagramPackage(DiagramPackage *DiagramPackage)
	CreateORMField(Field *Field)
	CreateORMGongEnumShape(GongEnumShape *GongEnumShape)
	CreateORMGongEnumValueEntry(GongEnumValueEntry *GongEnumValueEntry)
	CreateORMGongStructShape(GongStructShape *GongStructShape)
	CreateORMLink(Link *Link)
	CreateORMNoteShape(NoteShape *NoteShape)
	CreateORMNoteShapeLink(NoteShapeLink *NoteShapeLink)
	CreateORMPosition(Position *Position)
	CreateORMUmlState(UmlState *UmlState)
	CreateORMUmlsc(Umlsc *Umlsc)
	CreateORMVertice(Vertice *Vertice)
}

swagger:ignore

type AllModelsStructDeleteInterface

type AllModelsStructDeleteInterface interface {
	DeleteORMClassdiagram(Classdiagram *Classdiagram)
	DeleteORMDiagramPackage(DiagramPackage *DiagramPackage)
	DeleteORMField(Field *Field)
	DeleteORMGongEnumShape(GongEnumShape *GongEnumShape)
	DeleteORMGongEnumValueEntry(GongEnumValueEntry *GongEnumValueEntry)
	DeleteORMGongStructShape(GongStructShape *GongStructShape)
	DeleteORMLink(Link *Link)
	DeleteORMNoteShape(NoteShape *NoteShape)
	DeleteORMNoteShapeLink(NoteShapeLink *NoteShapeLink)
	DeleteORMPosition(Position *Position)
	DeleteORMUmlState(UmlState *UmlState)
	DeleteORMUmlsc(Umlsc *Umlsc)
	DeleteORMVertice(Vertice *Vertice)
}

type BackRepoInterface

type BackRepoInterface interface {
	Commit(stage *StageStruct)
	Checkout(stage *StageStruct)
	Backup(stage *StageStruct, dirPath string)
	Restore(stage *StageStruct, dirPath string)
	BackupXL(stage *StageStruct, dirPath string)
	RestoreXL(stage *StageStruct, dirPath string)
	// insertion point for Commit and Checkout signatures
	CommitClassdiagram(classdiagram *Classdiagram)
	CheckoutClassdiagram(classdiagram *Classdiagram)
	CommitDiagramPackage(diagrampackage *DiagramPackage)
	CheckoutDiagramPackage(diagrampackage *DiagramPackage)
	CommitField(field *Field)
	CheckoutField(field *Field)
	CommitGongEnumShape(gongenumshape *GongEnumShape)
	CheckoutGongEnumShape(gongenumshape *GongEnumShape)
	CommitGongEnumValueEntry(gongenumvalueentry *GongEnumValueEntry)
	CheckoutGongEnumValueEntry(gongenumvalueentry *GongEnumValueEntry)
	CommitGongStructShape(gongstructshape *GongStructShape)
	CheckoutGongStructShape(gongstructshape *GongStructShape)
	CommitLink(link *Link)
	CheckoutLink(link *Link)
	CommitNoteShape(noteshape *NoteShape)
	CheckoutNoteShape(noteshape *NoteShape)
	CommitNoteShapeLink(noteshapelink *NoteShapeLink)
	CheckoutNoteShapeLink(noteshapelink *NoteShapeLink)
	CommitPosition(position *Position)
	CheckoutPosition(position *Position)
	CommitUmlState(umlstate *UmlState)
	CheckoutUmlState(umlstate *UmlState)
	CommitUmlsc(umlsc *Umlsc)
	CheckoutUmlsc(umlsc *Umlsc)
	CommitVertice(vertice *Vertice)
	CheckoutVertice(vertice *Vertice)
	GetLastCommitFromBackNb() uint
	GetLastPushFromFrontNb() uint
}

type Classdiagram

type Classdiagram struct {
	Name string

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

	GongEnumShapes []*GongEnumShape

	// list of notes in the diagram
	NoteShapes []*NoteShape

	// IsInDrawMode indicates the the drawing can be edited (in development mode)
	// or not (in production mode)
	IsInDrawMode bool
}

Classdiagram diagram struct store a class diagram temporary here swagger:model Classdiagram

func CopyBranchClassdiagram

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

insertion point for stage branch per struct

func (*Classdiagram) AddGongEnumShape

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

func (*Classdiagram) AddGongStructShape

func (classdiagram *Classdiagram) AddGongStructShape(stage *StageStruct, diagramPackage *DiagramPackage, gongstructshapeName string)

func (*Classdiagram) Checkout

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

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

func (*Classdiagram) Commit

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

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

func (*Classdiagram) CommitVoid

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

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

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

func (*Classdiagram) RemoveGongStructShape

func (classdiagram *Classdiagram) RemoveGongStructShape(stage *StageStruct, gongstructshapeName string)

func (*Classdiagram) Stage

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

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

func (*Classdiagram) Unstage

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

Unstage removes classdiagram off the model stage

func (*Classdiagram) UnstageVoid

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

UnstageVoid removes classdiagram off the model stage

type Classdiagram_WOP

type Classdiagram_WOP struct {
	// insertion point
	Name         string
	IsInDrawMode bool
}

insertion point

type DiagramPackage

type DiagramPackage struct {
	Name string

	// Stage_ where the DiagamPackage lives
	Stage_ *StageStruct

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

	// list of files in the "diagrams" directory
	Files []string
	Ast   *ast.Package
	Fset  *token.FileSet

	// Umlscs stores UML State charts diagrams
	Umlscs []*Umlsc

	// IsEditable indicates wether the end user can edit the diagram
	// When a diagram is used in production for navigation, the
	// model is not IsEditable.
	IsEditable bool

	// IsReload indicates if a reload of the go definition of the diagram is rrequested
	// from the end user.
	// on the back stage, this value is allways false
	// on the front stage, this value is set to true when the end user requests a reload
	// after the checkout from the front, the value is set back to false
	IsReloaded bool

	// 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 *StageStruct) *DiagramPackage

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

func (*DiagramPackage) Commit

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

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

func (*DiagramPackage) CommitVoid

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

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 *StageStruct) *DiagramPackage

Stage puts diagrampackage to the model stage

func (*DiagramPackage) UnmarshallOneDiagram

func (diagramPackage *DiagramPackage) UnmarshallOneDiagram(stage *StageStruct, diagramName string, inFile *ast.File, fset *token.FileSet) (classdiagram *Classdiagram)

func (*DiagramPackage) Unstage

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

Unstage removes diagrampackage off the model stage

func (*DiagramPackage) UnstageVoid

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

UnstageVoid removes diagrampackage off the model stage

type DiagramPackage_WOP

type DiagramPackage_WOP struct {
	// insertion point
	Name                         string
	Path                         string
	GongModelPath                string
	IsEditable                   bool
	IsReloaded                   bool
	AbsolutePathToDiagramPackage string
}

type ExcelizeTabulator

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

func (*ExcelizeTabulator) AddCell

func (tab *ExcelizeTabulator) AddCell(sheetName string, rowId, columnIndex int, value string)

func (*ExcelizeTabulator) AddRow

func (tab *ExcelizeTabulator) AddRow(sheetName string) (rowId int)

func (*ExcelizeTabulator) AddSheet

func (tab *ExcelizeTabulator) AddSheet(sheetName string)

func (*ExcelizeTabulator) SetExcelizeFile

func (tab *ExcelizeTabulator) SetExcelizeFile(f *excelize.File)

type Field

type Field struct {
	Name string

	// Identifier is the identifier of the struct field referenced
	// by the UML classshape in the modeled package
	//gong:ident
	Identifier string

	FieldTypeAsString string
	Structname        string
	Fieldtypename     string
}

Field represent the UML Field of a Class (a "struct" in go) swagger:model Field

func CopyBranchField

func CopyBranchField(mapOrigCopy map[any]any, fieldFrom *Field) (fieldTo *Field)

func (*Field) Checkout

func (field *Field) Checkout(stage *StageStruct) *Field

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

func (*Field) Commit

func (field *Field) Commit(stage *StageStruct) *Field

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

func (*Field) CommitVoid

func (field *Field) CommitVoid(stage *StageStruct)

func (*Field) CopyBasicFields

func (from *Field) CopyBasicFields(to *Field)

func (*Field) GetName

func (field *Field) GetName() (res string)

for satisfaction of GongStruct interface

func (*Field) Stage

func (field *Field) Stage(stage *StageStruct) *Field

Stage puts field to the model stage

func (*Field) Unstage

func (field *Field) Unstage(stage *StageStruct) *Field

Unstage removes field off the model stage

func (*Field) UnstageVoid

func (field *Field) UnstageVoid(stage *StageStruct)

UnstageVoid removes field off the model stage

type Field_WOP

type Field_WOP struct {
	// insertion point
	Name              string
	Identifier        string
	FieldTypeAsString string
	Structname        string
	Fieldtypename     string
}

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 GongEnumShape

type GongEnumShape struct {
	Name string

	Position *Position

	// Identifier is the identifier of the struct referenced by the shape in the modeled package
	//gong:ident
	Identifier string

	GongEnumValueEntrys []*GongEnumValueEntry

	// 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
}

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 *StageStruct) *GongEnumShape

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

func (*GongEnumShape) Commit

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

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

func (*GongEnumShape) CommitVoid

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

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 *StageStruct) *GongEnumShape

Stage puts gongenumshape to the model stage

func (*GongEnumShape) Unstage

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

Unstage removes gongenumshape off the model stage

func (*GongEnumShape) UnstageVoid

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

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)

insertion point of enum utility functions 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 {
	// insertion point
	Name       string
	Identifier string
	Width      float64
	Height     float64
}

type GongEnumValueEntry

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

	// Identifier is the identifier of the enum value referenced by the shape in the modeled package
	//gong:ident
	Identifier string
}

func CopyBranchGongEnumValueEntry

func CopyBranchGongEnumValueEntry(mapOrigCopy map[any]any, gongenumvalueentryFrom *GongEnumValueEntry) (gongenumvalueentryTo *GongEnumValueEntry)

func (*GongEnumValueEntry) Checkout

func (gongenumvalueentry *GongEnumValueEntry) Checkout(stage *StageStruct) *GongEnumValueEntry

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

func (*GongEnumValueEntry) Commit

func (gongenumvalueentry *GongEnumValueEntry) Commit(stage *StageStruct) *GongEnumValueEntry

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

func (*GongEnumValueEntry) CommitVoid

func (gongenumvalueentry *GongEnumValueEntry) CommitVoid(stage *StageStruct)

func (*GongEnumValueEntry) CopyBasicFields

func (from *GongEnumValueEntry) CopyBasicFields(to *GongEnumValueEntry)

func (*GongEnumValueEntry) GetName

func (gongenumvalueentry *GongEnumValueEntry) GetName() (res string)

for satisfaction of GongStruct interface

func (*GongEnumValueEntry) Stage

func (gongenumvalueentry *GongEnumValueEntry) Stage(stage *StageStruct) *GongEnumValueEntry

Stage puts gongenumvalueentry to the model stage

func (*GongEnumValueEntry) Unstage

func (gongenumvalueentry *GongEnumValueEntry) Unstage(stage *StageStruct) *GongEnumValueEntry

Unstage removes gongenumvalueentry off the model stage

func (*GongEnumValueEntry) UnstageVoid

func (gongenumvalueentry *GongEnumValueEntry) UnstageVoid(stage *StageStruct)

UnstageVoid removes gongenumvalueentry off the model stage

type GongEnumValueEntry_WOP

type GongEnumValueEntry_WOP struct {
	// insertion point
	Name       string
	Identifier string
}

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 GongStructShape

type GongStructShape struct {
	Name string

	Position *Position

	// Identifier is the identifier of the struct referenced by the shape in the modeled package
	//gong:ident
	Identifier string

	// gongdoc can be integrated in a runtime application
	// the application can then set up the number of instances of Struct
	ShowNbInstances bool
	NbInstances     int

	// models of the composition of Field
	Fields []*Field

	// models of the composition of Link
	Links []*Link

	// 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 *StageStruct) *GongStructShape

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

func (*GongStructShape) Commit

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

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

func (*GongStructShape) CommitVoid

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

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 *StageStruct) *GongStructShape

Stage puts gongstructshape to the model stage

func (*GongStructShape) Unstage

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

Unstage removes gongstructshape off the model stage

func (*GongStructShape) UnstageVoid

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

UnstageVoid removes gongstructshape off the model stage

type GongStructShape_WOP

type GongStructShape_WOP struct {
	// insertion point
	Name            string
	Identifier      string
	ShowNbInstances bool
	NbInstances     int
	Width           float64
	Height          float64
	IsSelected      bool
}

type Gongstruct

type Gongstruct interface {
	// insertion point for generic types
	Classdiagram | DiagramPackage | Field | GongEnumShape | GongEnumValueEntry | GongStructShape | Link | NoteShape | NoteShapeLink | Position | UmlState | Umlsc | Vertice
}

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

type GongstructEnumStringField

type GongstructEnumStringField interface {
	string | MultiplicityType | NoteShapeLinkType | OrientationType
	Codes() []string
	CodeValues() []string
}

type GongstructMapString

type GongstructMapString interface {
	map[any]any |

		map[string]*Classdiagram |
		map[string]*DiagramPackage |
		map[string]*Field |
		map[string]*GongEnumShape |
		map[string]*GongEnumValueEntry |
		map[string]*GongStructShape |
		map[string]*Link |
		map[string]*NoteShape |
		map[string]*NoteShapeLink |
		map[string]*Position |
		map[string]*UmlState |
		map[string]*Umlsc |
		map[string]*Vertice |
		map[*any]any // because go does not support an extra "|" at the end of type specifications
}

type GongstructSet

type GongstructSet interface {
	map[any]any |

		map[*Classdiagram]any |
		map[*DiagramPackage]any |
		map[*Field]any |
		map[*GongEnumShape]any |
		map[*GongEnumValueEntry]any |
		map[*GongStructShape]any |
		map[*Link]any |
		map[*NoteShape]any |
		map[*NoteShapeLink]any |
		map[*Position]any |
		map[*UmlState]any |
		map[*Umlsc]any |
		map[*Vertice]any |
		map[*any]any // because go does not support an extra "|" at the end of type specifications
}

type GongtructBasicField

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

	// Identifier is the identifier of the struct field referenced by the
	// UML field of the classshape in the modeled package
	//gong:ident
	Identifier string

	//gong:ident
	Fieldtypename string

	// 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 link with control points
	// Vertices at the middle
	Middlevertice *Vertice

	// 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)
	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
}

Link represent the UML Link 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 Link

func CopyBranchLink(mapOrigCopy map[any]any, linkFrom *Link) (linkTo *Link)

func (*Link) Checkout

func (link *Link) Checkout(stage *StageStruct) *Link

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

func (*Link) Commit

func (link *Link) Commit(stage *StageStruct) *Link

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

func (*Link) CommitVoid

func (link *Link) CommitVoid(stage *StageStruct)

func (*Link) CopyBasicFields

func (from *Link) CopyBasicFields(to *Link)

func (*Link) GetName

func (link *Link) GetName() (res string)

for satisfaction of GongStruct interface

func (*Link) Stage

func (link *Link) Stage(stage *StageStruct) *Link

Stage puts link to the model stage

func (*Link) Unstage

func (link *Link) Unstage(stage *StageStruct) *Link

Unstage removes link off the model stage

func (*Link) UnstageVoid

func (link *Link) UnstageVoid(stage *StageStruct)

UnstageVoid removes link off the model stage

type Link_WOP struct {
	// insertion point
	Name                      string
	Identifier                string
	Fieldtypename             string
	FieldOffsetX              float64
	FieldOffsetY              float64
	TargetMultiplicity        MultiplicityType
	TargetMultiplicityOffsetX float64
	TargetMultiplicityOffsetY float64
	SourceMultiplicity        MultiplicityType
	SourceMultiplicityOffsetX float64
	SourceMultiplicityOffsetY float64
	StartOrientation          OrientationType
	StartRatio                float64
	EndOrientation            OrientationType
	EndRatio                  float64
	CornerOffsetRatio         float64
}

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 NoteShape

type NoteShape 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

	NoteShapeLinks []*NoteShapeLink
}

NoteShape is a UML note in a class diagram

func CopyBranchNoteShape

func CopyBranchNoteShape(mapOrigCopy map[any]any, noteshapeFrom *NoteShape) (noteshapeTo *NoteShape)

func (*NoteShape) Checkout

func (noteshape *NoteShape) Checkout(stage *StageStruct) *NoteShape

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

func (*NoteShape) Commit

func (noteshape *NoteShape) Commit(stage *StageStruct) *NoteShape

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

func (*NoteShape) CommitVoid

func (noteshape *NoteShape) CommitVoid(stage *StageStruct)

func (*NoteShape) CopyBasicFields

func (from *NoteShape) CopyBasicFields(to *NoteShape)

func (*NoteShape) GetName

func (noteshape *NoteShape) GetName() (res string)

for satisfaction of GongStruct interface

func (*NoteShape) Stage

func (noteshape *NoteShape) Stage(stage *StageStruct) *NoteShape

Stage puts noteshape to the model stage

func (*NoteShape) Unstage

func (noteshape *NoteShape) Unstage(stage *StageStruct) *NoteShape

Unstage removes noteshape off the model stage

func (*NoteShape) UnstageVoid

func (noteshape *NoteShape) UnstageVoid(stage *StageStruct)

UnstageVoid removes noteshape off the model stage

type NoteShapeLink 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 NoteShapeLink 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 CopyBranchNoteShapeLink(mapOrigCopy map[any]any, noteshapelinkFrom *NoteShapeLink) (noteshapelinkTo *NoteShapeLink)

func (*NoteShapeLink) Checkout

func (noteshapelink *NoteShapeLink) Checkout(stage *StageStruct) *NoteShapeLink

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

func (*NoteShapeLink) Commit

func (noteshapelink *NoteShapeLink) Commit(stage *StageStruct) *NoteShapeLink

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

func (*NoteShapeLink) CommitVoid

func (noteshapelink *NoteShapeLink) CommitVoid(stage *StageStruct)

func (*NoteShapeLink) CopyBasicFields

func (from *NoteShapeLink) CopyBasicFields(to *NoteShapeLink)

func (*NoteShapeLink) GetName

func (noteshapelink *NoteShapeLink) GetName() (res string)

for satisfaction of GongStruct interface

func (*NoteShapeLink) Stage

func (noteshapelink *NoteShapeLink) Stage(stage *StageStruct) *NoteShapeLink

Stage puts noteshapelink to the model stage

func (*NoteShapeLink) Unstage

func (noteshapelink *NoteShapeLink) Unstage(stage *StageStruct) *NoteShapeLink

Unstage removes noteshapelink off the model stage

func (*NoteShapeLink) UnstageVoid

func (noteshapelink *NoteShapeLink) UnstageVoid(stage *StageStruct)

UnstageVoid removes noteshapelink off the model stage

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 NoteShapeLink_WOP struct {
	// insertion point
	Name       string
	Identifier string
	Type       NoteShapeLinkType
}

type NoteShape_WOP

type NoteShape_WOP struct {
	// insertion point
	Name       string
	Identifier string
	Body       string
	BodyHTML   string
	X          float64
	Y          float64
	Width      float64
	Height     float64
	Matched    bool
}

type OnAfterCreateInterface

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

OnAfterCreateInterface callback when an instance is updated from the front

type OnAfterDeleteInterface

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

OnAfterDeleteInterface callback when an instance is updated from the front

type OnAfterReadInterface

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

OnAfterReadInterface callback when an instance is updated from the front

type OnAfterUpdateInterface

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

OnAfterUpdateInterface callback when an instance is updated from the front

type OnInitCommitInterface

type OnInitCommitInterface interface {
	BeforeCommit(stage *StageStruct)
}

type 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 {
	*Classdiagram | *DiagramPackage | *Field | *GongEnumShape | *GongEnumValueEntry | *GongStructShape | *Link | *NoteShape | *NoteShapeLink | *Position | *UmlState | *Umlsc | *Vertice
	GetName() string
	CommitVoid(*StageStruct)
	UnstageVoid(stage *StageStruct)
}

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 {
	*GongEnumShapeType
	FromCodeString(input string) (err error)
}

type PointerToGongstructEnumStringField

type PointerToGongstructEnumStringField interface {
	*MultiplicityType | *NoteShapeLinkType | *OrientationType
	FromCodeString(input string) (err error)
}

type Position

type Position struct {
	X    float64
	Y    float64
	Name string // temporary
}

Position mirrors joint.dia.Point swagger:model Position

func CopyBranchPosition

func CopyBranchPosition(mapOrigCopy map[any]any, positionFrom *Position) (positionTo *Position)

func (*Position) Checkout

func (position *Position) Checkout(stage *StageStruct) *Position

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

func (*Position) Commit

func (position *Position) Commit(stage *StageStruct) *Position

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

func (*Position) CommitVoid

func (position *Position) CommitVoid(stage *StageStruct)

func (*Position) CopyBasicFields

func (from *Position) CopyBasicFields(to *Position)

func (*Position) GetName

func (position *Position) GetName() (res string)

for satisfaction of GongStruct interface

func (*Position) Stage

func (position *Position) Stage(stage *StageStruct) *Position

Stage puts position to the model stage

func (*Position) Unstage

func (position *Position) Unstage(stage *StageStruct) *Position

Unstage removes position off the model stage

func (*Position) UnstageVoid

func (position *Position) UnstageVoid(stage *StageStruct)

UnstageVoid removes position off the model stage

type Position_WOP

type Position_WOP struct {
	// insertion point
	X    float64
	Y    float64
	Name string
}

type ReverseField

type ReverseField struct {
	GongstructName string
	Fieldname      string
}

func GetReverseFields

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

type StageStruct

type StageStruct struct {

	// insertion point for definition of arrays registering instances
	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_NoteShapes_reverseMap       map[*NoteShape]*Classdiagram

	OnAfterClassdiagramCreateCallback OnAfterCreateInterface[Classdiagram]
	OnAfterClassdiagramUpdateCallback OnAfterUpdateInterface[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
	DiagramPackage_Umlscs_reverseMap        map[*Umlsc]*DiagramPackage

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

	Fields           map[*Field]any
	Fields_mapString map[string]*Field

	OnAfterFieldCreateCallback OnAfterCreateInterface[Field]
	OnAfterFieldUpdateCallback OnAfterUpdateInterface[Field]
	OnAfterFieldDeleteCallback OnAfterDeleteInterface[Field]
	OnAfterFieldReadCallback   OnAfterReadInterface[Field]

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

	// insertion point for slice of pointers maps
	GongEnumShape_GongEnumValueEntrys_reverseMap map[*GongEnumValueEntry]*GongEnumShape

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

	GongEnumValueEntrys           map[*GongEnumValueEntry]any
	GongEnumValueEntrys_mapString map[string]*GongEnumValueEntry

	OnAfterGongEnumValueEntryCreateCallback OnAfterCreateInterface[GongEnumValueEntry]
	OnAfterGongEnumValueEntryUpdateCallback OnAfterUpdateInterface[GongEnumValueEntry]
	OnAfterGongEnumValueEntryDeleteCallback OnAfterDeleteInterface[GongEnumValueEntry]
	OnAfterGongEnumValueEntryReadCallback   OnAfterReadInterface[GongEnumValueEntry]

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

	// insertion point for slice of pointers maps
	GongStructShape_Fields_reverseMap map[*Field]*GongStructShape
	GongStructShape_Links_reverseMap  map[*Link]*GongStructShape

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

	Links           map[*Link]any
	Links_mapString map[string]*Link

	OnAfterLinkCreateCallback OnAfterCreateInterface[Link]
	OnAfterLinkUpdateCallback OnAfterUpdateInterface[Link]
	OnAfterLinkDeleteCallback OnAfterDeleteInterface[Link]
	OnAfterLinkReadCallback   OnAfterReadInterface[Link]

	NoteShapes           map[*NoteShape]any
	NoteShapes_mapString map[string]*NoteShape

	// insertion point for slice of pointers maps
	NoteShape_NoteShapeLinks_reverseMap map[*NoteShapeLink]*NoteShape

	OnAfterNoteShapeCreateCallback OnAfterCreateInterface[NoteShape]
	OnAfterNoteShapeUpdateCallback OnAfterUpdateInterface[NoteShape]
	OnAfterNoteShapeDeleteCallback OnAfterDeleteInterface[NoteShape]
	OnAfterNoteShapeReadCallback   OnAfterReadInterface[NoteShape]

	NoteShapeLinks           map[*NoteShapeLink]any
	NoteShapeLinks_mapString map[string]*NoteShapeLink

	OnAfterNoteShapeLinkCreateCallback OnAfterCreateInterface[NoteShapeLink]
	OnAfterNoteShapeLinkUpdateCallback OnAfterUpdateInterface[NoteShapeLink]
	OnAfterNoteShapeLinkDeleteCallback OnAfterDeleteInterface[NoteShapeLink]
	OnAfterNoteShapeLinkReadCallback   OnAfterReadInterface[NoteShapeLink]

	Positions           map[*Position]any
	Positions_mapString map[string]*Position

	OnAfterPositionCreateCallback OnAfterCreateInterface[Position]
	OnAfterPositionUpdateCallback OnAfterUpdateInterface[Position]
	OnAfterPositionDeleteCallback OnAfterDeleteInterface[Position]
	OnAfterPositionReadCallback   OnAfterReadInterface[Position]

	UmlStates           map[*UmlState]any
	UmlStates_mapString map[string]*UmlState

	OnAfterUmlStateCreateCallback OnAfterCreateInterface[UmlState]
	OnAfterUmlStateUpdateCallback OnAfterUpdateInterface[UmlState]
	OnAfterUmlStateDeleteCallback OnAfterDeleteInterface[UmlState]
	OnAfterUmlStateReadCallback   OnAfterReadInterface[UmlState]

	Umlscs           map[*Umlsc]any
	Umlscs_mapString map[string]*Umlsc

	// insertion point for slice of pointers maps
	Umlsc_States_reverseMap map[*UmlState]*Umlsc

	OnAfterUmlscCreateCallback OnAfterCreateInterface[Umlsc]
	OnAfterUmlscUpdateCallback OnAfterUpdateInterface[Umlsc]
	OnAfterUmlscDeleteCallback OnAfterDeleteInterface[Umlsc]
	OnAfterUmlscReadCallback   OnAfterReadInterface[Umlsc]

	Vertices           map[*Vertice]any
	Vertices_mapString map[string]*Vertice

	OnAfterVerticeCreateCallback OnAfterCreateInterface[Vertice]
	OnAfterVerticeUpdateCallback OnAfterUpdateInterface[Vertice]
	OnAfterVerticeDeleteCallback OnAfterDeleteInterface[Vertice]
	OnAfterVerticeReadCallback   OnAfterReadInterface[Vertice]

	AllModelsStructCreateCallback AllModelsStructCreateInterface

	AllModelsStructDeleteCallback AllModelsStructDeleteInterface

	BackRepo BackRepoInterface

	// if set will be called before each commit to the back repo
	OnInitCommitCallback          OnInitCommitInterface
	OnInitCommitFromFrontCallback OnInitCommitInterface
	OnInitCommitFromBackCallback  OnInitCommitInterface

	// store the number of instance per gongstruct
	Map_GongStructName_InstancesNb map[string]int

	// store meta package import
	MetaPackageImportPath  string
	MetaPackageImportAlias string

	// to be removed after fix of [issue](https://github.com/golang/go/issues/57559)
	// map to enable docLink renaming when an identifier is renamed
	Map_DocLink_Renaming map[string]GONG__Identifier
	// contains filtered or unexported fields
}

StageStruct enables storage of staged instances swagger:ignore

func NewStage

func NewStage(path string) (stage *StageStruct)

func (*StageStruct) Backup

func (stage *StageStruct) Backup(dirPath string)

backup generates backup files in the dirPath

func (*StageStruct) BackupXL

func (stage *StageStruct) BackupXL(dirPath string)

backup generates backup files in the dirPath

func (*StageStruct) Checkout

func (stage *StageStruct) Checkout()

func (*StageStruct) Commit

func (stage *StageStruct) Commit()

func (*StageStruct) CommitWithSuspendedCallbacks

func (stage *StageStruct) CommitWithSuspendedCallbacks()

func (*StageStruct) ComputeReverseMaps

func (stage *StageStruct) ComputeReverseMaps()

ComputeReverseMaps computes the reverse map, for all intances, for all slice to pointers field Its complexity is in O(n)O(p) where p is the number of pointers

func (*StageStruct) GetPath

func (stage *StageStruct) GetPath() string

func (*StageStruct) GetType

func (stage *StageStruct) GetType() string

func (*StageStruct) IsStagedClassdiagram

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

insertion point for stage per struct

func (*StageStruct) IsStagedDiagramPackage

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

func (*StageStruct) IsStagedField

func (stage *StageStruct) IsStagedField(field *Field) (ok bool)

func (*StageStruct) IsStagedGongEnumShape

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

func (*StageStruct) IsStagedGongEnumValueEntry

func (stage *StageStruct) IsStagedGongEnumValueEntry(gongenumvalueentry *GongEnumValueEntry) (ok bool)

func (*StageStruct) IsStagedGongStructShape

func (stage *StageStruct) IsStagedGongStructShape(gongstructshape *GongStructShape) (ok bool)
func (stage *StageStruct) IsStagedLink(link *Link) (ok bool)

func (*StageStruct) IsStagedNoteShape

func (stage *StageStruct) IsStagedNoteShape(noteshape *NoteShape) (ok bool)
func (stage *StageStruct) IsStagedNoteShapeLink(noteshapelink *NoteShapeLink) (ok bool)

func (*StageStruct) IsStagedPosition

func (stage *StageStruct) IsStagedPosition(position *Position) (ok bool)

func (*StageStruct) IsStagedUmlState

func (stage *StageStruct) IsStagedUmlState(umlstate *UmlState) (ok bool)

func (*StageStruct) IsStagedUmlsc

func (stage *StageStruct) IsStagedUmlsc(umlsc *Umlsc) (ok bool)

func (*StageStruct) IsStagedVertice

func (stage *StageStruct) IsStagedVertice(vertice *Vertice) (ok bool)

func (*StageStruct) Marshall

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

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

func (*StageStruct) Nil

func (stage *StageStruct) Nil()

func (*StageStruct) Reset

func (stage *StageStruct) Reset()

func (*StageStruct) Restore

func (stage *StageStruct) Restore(dirPath string)

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

func (*StageStruct) RestoreXL

func (stage *StageStruct) RestoreXL(dirPath string)

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

func (*StageStruct) StageBranchClassdiagram

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

insertion point for stage branch per struct

func (*StageStruct) StageBranchDiagramPackage

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

func (*StageStruct) StageBranchField

func (stage *StageStruct) StageBranchField(field *Field)

func (*StageStruct) StageBranchGongEnumShape

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

func (*StageStruct) StageBranchGongEnumValueEntry

func (stage *StageStruct) StageBranchGongEnumValueEntry(gongenumvalueentry *GongEnumValueEntry)

func (*StageStruct) StageBranchGongStructShape

func (stage *StageStruct) StageBranchGongStructShape(gongstructshape *GongStructShape)
func (stage *StageStruct) StageBranchLink(link *Link)

func (*StageStruct) StageBranchNoteShape

func (stage *StageStruct) StageBranchNoteShape(noteshape *NoteShape)
func (stage *StageStruct) StageBranchNoteShapeLink(noteshapelink *NoteShapeLink)

func (*StageStruct) StageBranchPosition

func (stage *StageStruct) StageBranchPosition(position *Position)

func (*StageStruct) StageBranchUmlState

func (stage *StageStruct) StageBranchUmlState(umlstate *UmlState)

func (*StageStruct) StageBranchUmlsc

func (stage *StageStruct) StageBranchUmlsc(umlsc *Umlsc)

func (*StageStruct) StageBranchVertice

func (stage *StageStruct) StageBranchVertice(vertice *Vertice)

func (*StageStruct) Unstage

func (stage *StageStruct) Unstage()

func (*StageStruct) UnstageBranchClassdiagram

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

insertion point for unstage branch per struct

func (*StageStruct) UnstageBranchDiagramPackage

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

func (*StageStruct) UnstageBranchField

func (stage *StageStruct) UnstageBranchField(field *Field)

func (*StageStruct) UnstageBranchGongEnumShape

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

func (*StageStruct) UnstageBranchGongEnumValueEntry

func (stage *StageStruct) UnstageBranchGongEnumValueEntry(gongenumvalueentry *GongEnumValueEntry)

func (*StageStruct) UnstageBranchGongStructShape

func (stage *StageStruct) UnstageBranchGongStructShape(gongstructshape *GongStructShape)
func (stage *StageStruct) UnstageBranchLink(link *Link)

func (*StageStruct) UnstageBranchNoteShape

func (stage *StageStruct) UnstageBranchNoteShape(noteshape *NoteShape)
func (stage *StageStruct) UnstageBranchNoteShapeLink(noteshapelink *NoteShapeLink)

func (*StageStruct) UnstageBranchPosition

func (stage *StageStruct) UnstageBranchPosition(position *Position)

func (*StageStruct) UnstageBranchUmlState

func (stage *StageStruct) UnstageBranchUmlState(umlstate *UmlState)

func (*StageStruct) UnstageBranchUmlsc

func (stage *StageStruct) UnstageBranchUmlsc(umlsc *Umlsc)

func (*StageStruct) UnstageBranchVertice

func (stage *StageStruct) UnstageBranchVertice(vertice *Vertice)

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 UmlState

type UmlState struct {
	Name string

	X float64
	Y float64
}

UmlState mirrors joint.shapes.uml.UmlState swagger:model UmlState

func CopyBranchUmlState

func CopyBranchUmlState(mapOrigCopy map[any]any, umlstateFrom *UmlState) (umlstateTo *UmlState)

func (*UmlState) Checkout

func (umlstate *UmlState) Checkout(stage *StageStruct) *UmlState

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

func (*UmlState) Commit

func (umlstate *UmlState) Commit(stage *StageStruct) *UmlState

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

func (*UmlState) CommitVoid

func (umlstate *UmlState) CommitVoid(stage *StageStruct)

func (*UmlState) CopyBasicFields

func (from *UmlState) CopyBasicFields(to *UmlState)

func (*UmlState) GetName

func (umlstate *UmlState) GetName() (res string)

for satisfaction of GongStruct interface

func (*UmlState) Stage

func (umlstate *UmlState) Stage(stage *StageStruct) *UmlState

Stage puts umlstate to the model stage

func (*UmlState) Unstage

func (umlstate *UmlState) Unstage(stage *StageStruct) *UmlState

Unstage removes umlstate off the model stage

func (*UmlState) UnstageVoid

func (umlstate *UmlState) UnstageVoid(stage *StageStruct)

UnstageVoid removes umlstate off the model stage

type UmlState_WOP

type UmlState_WOP struct {
	// insertion point
	Name string
	X    float64
	Y    float64
}

type Umlsc

type Umlsc struct {
	Name string

	// this is the memory model (and not the "memory motel" of the Rolling Stones)
	// it is not ignored by swagger because it is used by the angular model
	States []*UmlState

	// in this version, only one state is active mong the states
	// (with the embedded states version, that might change)
	Activestate string

	// IsInDrawMode indicates the the drawing can be edited (in development mode)
	// or not (in production mode)
	IsInDrawMode bool
}

Umlsc diagram struct store a class diagram temporary here swagger:model Umlsc

func CopyBranchUmlsc

func CopyBranchUmlsc(mapOrigCopy map[any]any, umlscFrom *Umlsc) (umlscTo *Umlsc)

func (*Umlsc) Checkout

func (umlsc *Umlsc) Checkout(stage *StageStruct) *Umlsc

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

func (*Umlsc) Commit

func (umlsc *Umlsc) Commit(stage *StageStruct) *Umlsc

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

func (*Umlsc) CommitVoid

func (umlsc *Umlsc) CommitVoid(stage *StageStruct)

func (*Umlsc) CopyBasicFields

func (from *Umlsc) CopyBasicFields(to *Umlsc)

func (*Umlsc) GetName

func (umlsc *Umlsc) GetName() (res string)

for satisfaction of GongStruct interface

func (*Umlsc) Stage

func (umlsc *Umlsc) Stage(stage *StageStruct) *Umlsc

Stage puts umlsc to the model stage

func (*Umlsc) Unstage

func (umlsc *Umlsc) Unstage(stage *StageStruct) *Umlsc

Unstage removes umlsc off the model stage

func (*Umlsc) UnstageVoid

func (umlsc *Umlsc) UnstageVoid(stage *StageStruct)

UnstageVoid removes umlsc off the model stage

type Umlsc_WOP

type Umlsc_WOP struct {
	// insertion point
	Name         string
	Activestate  string
	IsInDrawMode bool
}

type Vertice

type Vertice struct {
	X    float64
	Y    float64
	Name string // temporary
}

Vertice mirrors joint.dia.Point swagger:model Vertice

func CopyBranchVertice

func CopyBranchVertice(mapOrigCopy map[any]any, verticeFrom *Vertice) (verticeTo *Vertice)

func (*Vertice) Checkout

func (vertice *Vertice) Checkout(stage *StageStruct) *Vertice

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

func (*Vertice) Commit

func (vertice *Vertice) Commit(stage *StageStruct) *Vertice

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

func (*Vertice) CommitVoid

func (vertice *Vertice) CommitVoid(stage *StageStruct)

func (*Vertice) CopyBasicFields

func (from *Vertice) CopyBasicFields(to *Vertice)

func (*Vertice) GetName

func (vertice *Vertice) GetName() (res string)

for satisfaction of GongStruct interface

func (*Vertice) Stage

func (vertice *Vertice) Stage(stage *StageStruct) *Vertice

Stage puts vertice to the model stage

func (*Vertice) Unstage

func (vertice *Vertice) Unstage(stage *StageStruct) *Vertice

Unstage removes vertice off the model stage

func (*Vertice) UnstageVoid

func (vertice *Vertice) UnstageVoid(stage *StageStruct)

UnstageVoid removes vertice off the model stage

type Vertice_WOP

type Vertice_WOP struct {
	// insertion point
	X    float64
	Y    float64
	Name string
}

Jump to

Keyboard shortcuts

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