models

package
v0.0.0-...-2829e0f Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 20 Imported by: 9

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

View Source
var Colors = []ColorType{}/* 147 elements not displayed */

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 DoNotKnowWhatThisFunctionIsFor

func DoNotKnowWhatThisFunctionIsFor(stage *StageStruct)

DoNotKnowWhatThisFunctionIsFor every staged shape to a behavior models

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 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 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 {
	CreateORMAnimate(Animate *Animate)
	CreateORMCircle(Circle *Circle)
	CreateORMEllipse(Ellipse *Ellipse)
	CreateORMLayer(Layer *Layer)
	CreateORMLine(Line *Line)
	CreateORMLink(Link *Link)
	CreateORMLinkAnchoredText(LinkAnchoredText *LinkAnchoredText)
	CreateORMPath(Path *Path)
	CreateORMPoint(Point *Point)
	CreateORMPolygone(Polygone *Polygone)
	CreateORMPolyline(Polyline *Polyline)
	CreateORMRect(Rect *Rect)
	CreateORMRectAnchoredPath(RectAnchoredPath *RectAnchoredPath)
	CreateORMRectAnchoredRect(RectAnchoredRect *RectAnchoredRect)
	CreateORMRectAnchoredText(RectAnchoredText *RectAnchoredText)
	CreateORMRectLinkLink(RectLinkLink *RectLinkLink)
	CreateORMSVG(SVG *SVG)
	CreateORMText(Text *Text)
}

swagger:ignore

type AllModelsStructDeleteInterface

type AllModelsStructDeleteInterface interface {
	DeleteORMAnimate(Animate *Animate)
	DeleteORMCircle(Circle *Circle)
	DeleteORMEllipse(Ellipse *Ellipse)
	DeleteORMLayer(Layer *Layer)
	DeleteORMLine(Line *Line)
	DeleteORMLink(Link *Link)
	DeleteORMLinkAnchoredText(LinkAnchoredText *LinkAnchoredText)
	DeleteORMPath(Path *Path)
	DeleteORMPoint(Point *Point)
	DeleteORMPolygone(Polygone *Polygone)
	DeleteORMPolyline(Polyline *Polyline)
	DeleteORMRect(Rect *Rect)
	DeleteORMRectAnchoredPath(RectAnchoredPath *RectAnchoredPath)
	DeleteORMRectAnchoredRect(RectAnchoredRect *RectAnchoredRect)
	DeleteORMRectAnchoredText(RectAnchoredText *RectAnchoredText)
	DeleteORMRectLinkLink(RectLinkLink *RectLinkLink)
	DeleteORMSVG(SVG *SVG)
	DeleteORMText(Text *Text)
}

type AnchorType

type AnchorType string
const (
	ANCHOR_TOP    AnchorType = "ANCHOR_TOP"
	ANCHOR_BOTTOM AnchorType = "ANCHOR_BOTTOM"
	ANCHOR_LEFT   AnchorType = "ANCHOR_LEFT"
	ANCHOR_RIGHT  AnchorType = "ANCHOR_RIGHT"
	ANCHOR_CENTER AnchorType = "ANCHOR_CENTER"
)

values for EnumType

func (AnchorType) CodeValues

func (anchortype AnchorType) CodeValues() (res []string)

func (AnchorType) Codes

func (anchortype AnchorType) Codes() (res []string)

func (*AnchorType) FromCodeString

func (anchortype *AnchorType) FromCodeString(input string) (err error)

func (*AnchorType) FromString

func (anchortype *AnchorType) FromString(input string) (err error)

func (*AnchorType) ToCodeString

func (anchortype *AnchorType) ToCodeString() (res string)

func (AnchorType) ToString

func (anchortype AnchorType) ToString() (res string)

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

type Animate struct {
	Name string

	AttributeName string
	Values        string
	Dur           string
	RepeatCount   string
}

func CopyBranchAnimate

func CopyBranchAnimate(mapOrigCopy map[any]any, animateFrom *Animate) (animateTo *Animate)

insertion point for stage branch per struct

func (*Animate) Checkout

func (animate *Animate) Checkout(stage *StageStruct) *Animate

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

func (*Animate) Commit

func (animate *Animate) Commit(stage *StageStruct) *Animate

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

func (*Animate) CommitVoid

func (animate *Animate) CommitVoid(stage *StageStruct)

func (*Animate) CopyBasicFields

func (from *Animate) CopyBasicFields(to *Animate)

func (*Animate) GetName

func (animate *Animate) GetName() (res string)

for satisfaction of GongStruct interface

func (*Animate) Stage

func (animate *Animate) Stage(stage *StageStruct) *Animate

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

func (*Animate) Unstage

func (animate *Animate) Unstage(stage *StageStruct) *Animate

Unstage removes animate off the model stage

func (*Animate) UnstageVoid

func (animate *Animate) UnstageVoid(stage *StageStruct)

UnstageVoid removes animate off the model stage

type Animate_WOP

type Animate_WOP struct {
	// insertion point
	Name          string
	AttributeName string
	Values        string
	Dur           string
	RepeatCount   string
}

insertion point

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
	CommitAnimate(animate *Animate)
	CheckoutAnimate(animate *Animate)
	CommitCircle(circle *Circle)
	CheckoutCircle(circle *Circle)
	CommitEllipse(ellipse *Ellipse)
	CheckoutEllipse(ellipse *Ellipse)
	CommitLayer(layer *Layer)
	CheckoutLayer(layer *Layer)
	CommitLine(line *Line)
	CheckoutLine(line *Line)
	CommitLink(link *Link)
	CheckoutLink(link *Link)
	CommitLinkAnchoredText(linkanchoredtext *LinkAnchoredText)
	CheckoutLinkAnchoredText(linkanchoredtext *LinkAnchoredText)
	CommitPath(path *Path)
	CheckoutPath(path *Path)
	CommitPoint(point *Point)
	CheckoutPoint(point *Point)
	CommitPolygone(polygone *Polygone)
	CheckoutPolygone(polygone *Polygone)
	CommitPolyline(polyline *Polyline)
	CheckoutPolyline(polyline *Polyline)
	CommitRect(rect *Rect)
	CheckoutRect(rect *Rect)
	CommitRectAnchoredPath(rectanchoredpath *RectAnchoredPath)
	CheckoutRectAnchoredPath(rectanchoredpath *RectAnchoredPath)
	CommitRectAnchoredRect(rectanchoredrect *RectAnchoredRect)
	CheckoutRectAnchoredRect(rectanchoredrect *RectAnchoredRect)
	CommitRectAnchoredText(rectanchoredtext *RectAnchoredText)
	CheckoutRectAnchoredText(rectanchoredtext *RectAnchoredText)
	CommitRectLinkLink(rectlinklink *RectLinkLink)
	CheckoutRectLinkLink(rectlinklink *RectLinkLink)
	CommitSVG(svg *SVG)
	CheckoutSVG(svg *SVG)
	CommitText(text *Text)
	CheckoutText(text *Text)
	GetLastCommitFromBackNb() uint
	GetLastPushFromFrontNb() uint
}

type Circle

type Circle struct {
	Name           string
	CX, CY, Radius float64

	Presentation

	Animations []*Animate
}

func CopyBranchCircle

func CopyBranchCircle(mapOrigCopy map[any]any, circleFrom *Circle) (circleTo *Circle)

func (*Circle) Checkout

func (circle *Circle) Checkout(stage *StageStruct) *Circle

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

func (*Circle) Commit

func (circle *Circle) Commit(stage *StageStruct) *Circle

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

func (*Circle) CommitVoid

func (circle *Circle) CommitVoid(stage *StageStruct)

func (*Circle) CopyBasicFields

func (from *Circle) CopyBasicFields(to *Circle)

func (*Circle) GetName

func (circle *Circle) GetName() (res string)

for satisfaction of GongStruct interface

func (*Circle) Stage

func (circle *Circle) Stage(stage *StageStruct) *Circle

Stage puts circle to the model stage

func (*Circle) Unstage

func (circle *Circle) Unstage(stage *StageStruct) *Circle

Unstage removes circle off the model stage

func (*Circle) UnstageVoid

func (circle *Circle) UnstageVoid(stage *StageStruct)

UnstageVoid removes circle off the model stage

type Circle_WOP

type Circle_WOP struct {
	// insertion point
	Name                        string
	CX                          float64
	CY                          float64
	Radius                      float64
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type ColorType

type ColorType string
const (
	Aliceblue            ColorType = "aliceblue"
	Antiquewhite         ColorType = "antiquewhite"
	Aqua                 ColorType = "aqua"
	Aquamarine           ColorType = "aquamarine "
	Azure                ColorType = "azure"
	Beige                ColorType = "beige"
	Bisque               ColorType = "bisque "
	Black                ColorType = "black"
	Blanchedalmond       ColorType = "blanchedalmond "
	Blue                 ColorType = "blue"
	Blueviolet           ColorType = "blueviolet "
	Brown                ColorType = "brown"
	Burlywood            ColorType = "burlywood"
	Cadetblue            ColorType = "cadetblue"
	Chartreuse           ColorType = "chartreuse "
	Chocolate            ColorType = "chocolate"
	Coral                ColorType = "coral"
	Cornflowerblue       ColorType = "cornflowerblue "
	Cornsilk             ColorType = "cornsilk"
	Crimson              ColorType = "crimson"
	Cyan                 ColorType = "cyan"
	Darkblue             ColorType = "darkblue"
	Darkcyan             ColorType = "darkcyan"
	Darkgoldenrod        ColorType = "darkgoldenrod"
	Darkgray             ColorType = "darkgray"
	Darkgreen            ColorType = "darkgreen"
	Darkgrey             ColorType = "darkgrey"
	Darkkhaki            ColorType = "darkkhaki"
	Darkmagenta          ColorType = "darkmagenta"
	Darkolivegreen       ColorType = "darkolivegreen "
	Darkorange           ColorType = "darkorange "
	Darkorchid           ColorType = "darkorchid "
	Darkred              ColorType = "darkred"
	Darksalmon           ColorType = "darksalmon "
	Darkseagreen         ColorType = "darkseagreen"
	Darkslateblue        ColorType = "darkslateblue"
	Darkslategray        ColorType = "darkslategray"
	Darkslategrey        ColorType = "darkslategrey"
	Darkturquoise        ColorType = "darkturquoise"
	Darkviolet           ColorType = "darkviolet "
	Deeppink             ColorType = "deeppink"
	Deepskyblue          ColorType = "deepskyblue"
	Dimgray              ColorType = "dimgray"
	Dimgrey              ColorType = "dimgrey"
	Dodgerblue           ColorType = "dodgerblue "
	Firebrick            ColorType = "firebrick"
	Floralwhite          ColorType = "floralwhite"
	Forestgreen          ColorType = "forestgreen"
	Fuchsia              ColorType = "fuchsia"
	Gainsboro            ColorType = "gainsboro"
	Ghostwhite           ColorType = "ghostwhite "
	Gold                 ColorType = "gold"
	Goldenrod            ColorType = "goldenrod"
	Gray                 ColorType = "gray"
	Green                ColorType = "green"
	Greenyellow          ColorType = "greenyellow"
	Grey                 ColorType = "grey"
	Honeydew             ColorType = "honeydew"
	Hotpink              ColorType = "hotpink"
	Indianred            ColorType = "indianred"
	Indigo               ColorType = "indigo "
	Ivory                ColorType = "ivory"
	Khaki                ColorType = "khaki"
	Lavender             ColorType = "lavender"
	Lavenderblush        ColorType = "lavenderblush"
	Lawngreen            ColorType = "lawngreen"
	Lemonchiffon         ColorType = "lemonchiffon"
	Lightblue            ColorType = "lightblue"
	Lightcoral           ColorType = "lightcoral "
	Lightcyan            ColorType = "lightcyan"
	Lightgoldenrodyellow ColorType = "lightgoldenrodyellow"
	Lightgray            ColorType = "lightgray"
	Lightgreen           ColorType = "lightgreen "
	Lightgrey            ColorType = "lightgrey"
	Lightpink            ColorType = "lightpink"
	Lightsalmon          ColorType = "lightsalmon"
	Lightseagreen        ColorType = "lightseagreen"
	Lightskyblue         ColorType = "lightskyblue"
	Lightslategray       ColorType = "lightslategray "
	Lightslategrey       ColorType = "lightslategrey "
	Lightsteelblue       ColorType = "lightsteelblue "
	Lightyellow          ColorType = "lightyellow"
	Lime                 ColorType = "lime"
	Limegreen            ColorType = "limegreen"
	Linen                ColorType = "linen"
	Magenta              ColorType = "magenta"
	Maroon               ColorType = "maroon "
	Mediumaquamarine     ColorType = "mediumaquamarine"
	Mediumblue           ColorType = "mediumblue "
	Mediumorchid         ColorType = "mediumorchid"
	Mediumpurple         ColorType = "mediumpurple"
	Mediumseagreen       ColorType = "mediumseagreen "
	Mediumslateblue      ColorType = "mediumslateblue"
	Mediumspringgreen    ColorType = "mediumspringgreen"
	Mediumturquoise      ColorType = "mediumturquoise"
	Mediumvioletred      ColorType = "mediumvioletred"
	Midnightblue         ColorType = "midnightblue"
	Mintcream            ColorType = "mintcream"
	Mistyrose            ColorType = "mistyrose"
	Moccasin             ColorType = "moccasin"
	Navajowhite          ColorType = "navajowhite"
	Navy                 ColorType = "navy"
	Oldlace              ColorType = "oldlace"
	Olive                ColorType = "olive"
	Olivedrab            ColorType = "olivedrab"
	Orange               ColorType = "orange "
	Orangered            ColorType = "orangered"
	Orchid               ColorType = "orchid "
	Palegoldenrod        ColorType = "palegoldenrod"
	Palegreen            ColorType = "palegreen"
	Paleturquoise        ColorType = "paleturquoise"
	Palevioletred        ColorType = "palevioletred"
	Papayawhip           ColorType = "papayawhip "
	Peachpuff            ColorType = "peachpuff"
	Peru                 ColorType = "peru"
	Pink                 ColorType = "pink"
	Plum                 ColorType = "plum"
	Powderblue           ColorType = "powderblue "
	Purple               ColorType = "purple "
	Red                  ColorType = "red"
	Rosybrown            ColorType = "rosybrown"
	Royalblue            ColorType = "royalblue"
	Saddlebrown          ColorType = "saddlebrown"
	Salmon               ColorType = "salmon "
	Sandybrown           ColorType = "sandybrown "
	Seagreen             ColorType = "seagreen"
	Seashell             ColorType = "seashell"
	Sienna               ColorType = "sienna "
	Silver               ColorType = "silver "
	Skyblue              ColorType = "skyblue"
	Slateblue            ColorType = "slateblue"
	Slategray            ColorType = "slategray"
	Slategrey            ColorType = "slategrey"
	Snow                 ColorType = "snow"
	Springgreen          ColorType = "springgreen"
	Steelblue            ColorType = "steelblue"
	Tan                  ColorType = "tan"
	Teal                 ColorType = "teal"
	Thistle              ColorType = "thistle"
	Tomato               ColorType = "tomato "
	Turquoise            ColorType = "turquoise"
	Violet               ColorType = "violet "
	Wheat                ColorType = "wheat"
	White                ColorType = "white"
	Whitesmoke           ColorType = "whitesmoke "
	Yellow               ColorType = "yellow "
	Yellowgreen          ColorType = "yellowgreen"
)

values for EnumType

func (ColorType) CodeValues

func (colortype ColorType) CodeValues() (res []string)

func (ColorType) Codes

func (colortype ColorType) Codes() (res []string)

func (*ColorType) FromCodeString

func (colortype *ColorType) FromCodeString(input string) (err error)

func (*ColorType) FromString

func (colortype *ColorType) FromString(input string) (err error)

func (*ColorType) ToCodeString

func (colortype *ColorType) ToCodeString() (res string)

func (ColorType) ToString

func (colortype ColorType) ToString() (res string)

Utility function for ColorType 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 DrawingState

type DrawingState string
const (
	NOT_DRAWING_LINK DrawingState = "NOT_DRAWING_LINK"
	DRAWING_LINK     DrawingState = "DRAWING_LINK"
)

values for EnumType

func (DrawingState) CodeValues

func (drawingstate DrawingState) CodeValues() (res []string)

func (DrawingState) Codes

func (drawingstate DrawingState) Codes() (res []string)

func (*DrawingState) FromCodeString

func (drawingstate *DrawingState) FromCodeString(input string) (err error)

func (*DrawingState) FromString

func (drawingstate *DrawingState) FromString(input string) (err error)

func (*DrawingState) ToCodeString

func (drawingstate *DrawingState) ToCodeString() (res string)

func (DrawingState) ToString

func (drawingstate DrawingState) ToString() (res string)

Utility function for DrawingState 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 Ellipse

type Ellipse struct {
	Name           string
	CX, CY, RX, RY float64

	Presentation

	Animates []*Animate
}

func CopyBranchEllipse

func CopyBranchEllipse(mapOrigCopy map[any]any, ellipseFrom *Ellipse) (ellipseTo *Ellipse)

func (*Ellipse) Checkout

func (ellipse *Ellipse) Checkout(stage *StageStruct) *Ellipse

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

func (*Ellipse) Commit

func (ellipse *Ellipse) Commit(stage *StageStruct) *Ellipse

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

func (*Ellipse) CommitVoid

func (ellipse *Ellipse) CommitVoid(stage *StageStruct)

func (*Ellipse) CopyBasicFields

func (from *Ellipse) CopyBasicFields(to *Ellipse)

func (*Ellipse) GetName

func (ellipse *Ellipse) GetName() (res string)

for satisfaction of GongStruct interface

func (*Ellipse) Stage

func (ellipse *Ellipse) Stage(stage *StageStruct) *Ellipse

Stage puts ellipse to the model stage

func (*Ellipse) Unstage

func (ellipse *Ellipse) Unstage(stage *StageStruct) *Ellipse

Unstage removes ellipse off the model stage

func (*Ellipse) UnstageVoid

func (ellipse *Ellipse) UnstageVoid(stage *StageStruct)

UnstageVoid removes ellipse off the model stage

type Ellipse_WOP

type Ellipse_WOP struct {
	// insertion point
	Name                        string
	CX                          float64
	CY                          float64
	RX                          float64
	RY                          float64
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   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 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 GongStructInterface

type GongStructInterface interface {
	GetName() (res string)
}

GongStructInterface is the interface met by GongStructs It allows runtime reflexion of instances (without the hassle of the "reflect" package)

type Gongstruct

type Gongstruct interface {
	// insertion point for generic types
	Animate | Circle | Ellipse | Layer | Line | Link | LinkAnchoredText | Path | Point | Polygone | Polyline | Rect | RectAnchoredPath | RectAnchoredRect | RectAnchoredText | RectLinkLink | SVG | Text
}

Gongstruct is the type parameter for generated generic function that allows - access to staged instances - navigation between staged instances by going backward association links between gongstruct - full refactoring of Gongstruct identifiers / fields

type GongstructEnumIntField

type GongstructEnumIntField interface {
	int
	Codes() []string
	CodeValues() []int
}

type GongstructMapString

type GongstructMapString interface {
	map[any]any |

		map[string]*Animate |
		map[string]*Circle |
		map[string]*Ellipse |
		map[string]*Layer |
		map[string]*Line |
		map[string]*Link |
		map[string]*LinkAnchoredText |
		map[string]*Path |
		map[string]*Point |
		map[string]*Polygone |
		map[string]*Polyline |
		map[string]*Rect |
		map[string]*RectAnchoredPath |
		map[string]*RectAnchoredRect |
		map[string]*RectAnchoredText |
		map[string]*RectLinkLink |
		map[string]*SVG |
		map[string]*Text |
		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[*Animate]any |
		map[*Circle]any |
		map[*Ellipse]any |
		map[*Layer]any |
		map[*Line]any |
		map[*Link]any |
		map[*LinkAnchoredText]any |
		map[*Path]any |
		map[*Point]any |
		map[*Polygone]any |
		map[*Polyline]any |
		map[*Rect]any |
		map[*RectAnchoredPath]any |
		map[*RectAnchoredRect]any |
		map[*RectAnchoredText]any |
		map[*RectLinkLink]any |
		map[*SVG]any |
		map[*Text]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 GraphicElementInterface

type GraphicElementInterface interface {
	Output(output *string)
}

type Layer

type Layer struct {
	Display bool

	Name string

	Rects         []*Rect
	Texts         []*Text
	Circles       []*Circle
	Lines         []*Line
	Ellipses      []*Ellipse
	Polylines     []*Polyline
	Polygones     []*Polygone
	Paths         []*Path
	Links         []*Link
	RectLinkLinks []*RectLinkLink
}

func CopyBranchLayer

func CopyBranchLayer(mapOrigCopy map[any]any, layerFrom *Layer) (layerTo *Layer)

func (*Layer) Checkout

func (layer *Layer) Checkout(stage *StageStruct) *Layer

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

func (*Layer) Commit

func (layer *Layer) Commit(stage *StageStruct) *Layer

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

func (*Layer) CommitVoid

func (layer *Layer) CommitVoid(stage *StageStruct)

func (*Layer) CopyBasicFields

func (from *Layer) CopyBasicFields(to *Layer)

func (*Layer) GetName

func (layer *Layer) GetName() (res string)

for satisfaction of GongStruct interface

func (*Layer) Stage

func (layer *Layer) Stage(stage *StageStruct) *Layer

Stage puts layer to the model stage

func (*Layer) Unstage

func (layer *Layer) Unstage(stage *StageStruct) *Layer

Unstage removes layer off the model stage

func (*Layer) UnstageVoid

func (layer *Layer) UnstageVoid(stage *StageStruct)

UnstageVoid removes layer off the model stage

type Layer_WOP

type Layer_WOP struct {
	// insertion point
	Display bool
	Name    string
}

type Line

type Line struct {
	Name           string
	X1, Y1, X2, Y2 float64
	Presentation

	Animates []*Animate

	// when an end user interacts with the line,
	// it updates those fields
	MouseClickX, MouseClickY float64
}

func CopyBranchLine

func CopyBranchLine(mapOrigCopy map[any]any, lineFrom *Line) (lineTo *Line)

func (*Line) Checkout

func (line *Line) Checkout(stage *StageStruct) *Line

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

func (*Line) Commit

func (line *Line) Commit(stage *StageStruct) *Line

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

func (*Line) CommitVoid

func (line *Line) CommitVoid(stage *StageStruct)

func (*Line) CopyBasicFields

func (from *Line) CopyBasicFields(to *Line)

func (*Line) GetName

func (line *Line) GetName() (res string)

for satisfaction of GongStruct interface

func (*Line) OnAfterUpdate

func (line *Line) OnAfterUpdate(stage *StageStruct, _, frontLine *Line)

func (*Line) Stage

func (line *Line) Stage(stage *StageStruct) *Line

Stage puts line to the model stage

func (*Line) Unstage

func (line *Line) Unstage(stage *StageStruct) *Line

Unstage removes line off the model stage

func (*Line) UnstageVoid

func (line *Line) UnstageVoid(stage *StageStruct)

UnstageVoid removes line off the model stage

type LineOrchestrator

type LineOrchestrator struct {
}

insertion point LineOrchestrator

func (*LineOrchestrator) OnAfterUpdate

func (orchestrator *LineOrchestrator) OnAfterUpdate(
	gongsvgStage *StageStruct,
	stagedLine, backRepoLine *Line)

type Line_WOP

type Line_WOP struct {
	// insertion point
	Name                        string
	X1                          float64
	Y1                          float64
	X2                          float64
	Y2                          float64
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
	MouseClickX                 float64
	MouseClickY                 float64
}
type Link struct {
	Name string

	Type LinkType

	// IsBezierCurve, if true will draw the link as a bezier curve instead of segments
	IsBezierCurve bool

	Start           *Rect
	StartAnchorType AnchorType

	End           *Rect
	EndAnchorType AnchorType

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

	// corner radius
	CornerRadius float64

	// End Arrows
	HasEndArrow  bool
	EndArrowSize float64

	// Start Arrows
	HasStartArrow  bool
	StartArrowSize float64

	// to be displayed at the end
	TextAtArrowEnd []*LinkAnchoredText

	// to be displayed at the start
	TextAtArrowStart []*LinkAnchoredText

	// for non floating orthogonal anchors
	ControlPoints []*Point

	Presentation

	Impl LinkImplInterface
}
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) OnAfterUpdate

func (link *Link) OnAfterUpdate(stage *StageStruct, _, frontLink *Link)

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 LinkAnchorType

type LinkAnchorType string

LinkAnchorType specifies the way a text should be attached to a link end.

the link end meets a rect either horizontally or vertically

const (
	// If horizontally, the text will be on top of the link end
	// If verticaly, the text will be on the left
	LINK_LEFT_OR_TOP LinkAnchorType = "LINK_LEFT_OR_TOP"
	// bottom / right
	LINK_RIGHT_OR_BOTTOM LinkAnchorType = "LINK_RIGHT_OR_BOTTOM"
)

func (LinkAnchorType) CodeValues

func (linkanchortype LinkAnchorType) CodeValues() (res []string)

func (LinkAnchorType) Codes

func (linkanchortype LinkAnchorType) Codes() (res []string)

func (*LinkAnchorType) FromCodeString

func (linkanchortype *LinkAnchorType) FromCodeString(input string) (err error)

func (*LinkAnchorType) FromString

func (linkanchortype *LinkAnchorType) FromString(input string) (err error)

func (*LinkAnchorType) ToCodeString

func (linkanchortype *LinkAnchorType) ToCodeString() (res string)

func (LinkAnchorType) ToString

func (linkanchortype LinkAnchorType) ToString() (res string)

Utility function for LinkAnchorType 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 LinkAnchoredText

type LinkAnchoredText struct {
	Name    string
	Content string

	// AutomaticLayout is true will have the front compute the
	// X_Offset / Y_Offset of the anchored text
	AutomaticLayout bool
	LinkAnchorType  LinkAnchorType

	// values if AutomaticLayout is false
	X_Offset float64
	Y_Offset float64

	// "bold", "normal", ...
	FontWeight string

	Presentation
	Animates []*Animate

	Impl LinkAnchoredTextImplInterface
}

func CopyBranchLinkAnchoredText

func CopyBranchLinkAnchoredText(mapOrigCopy map[any]any, linkanchoredtextFrom *LinkAnchoredText) (linkanchoredtextTo *LinkAnchoredText)

func (*LinkAnchoredText) Checkout

func (linkanchoredtext *LinkAnchoredText) Checkout(stage *StageStruct) *LinkAnchoredText

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

func (*LinkAnchoredText) Commit

func (linkanchoredtext *LinkAnchoredText) Commit(stage *StageStruct) *LinkAnchoredText

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

func (*LinkAnchoredText) CommitVoid

func (linkanchoredtext *LinkAnchoredText) CommitVoid(stage *StageStruct)

func (*LinkAnchoredText) CopyBasicFields

func (from *LinkAnchoredText) CopyBasicFields(to *LinkAnchoredText)

func (*LinkAnchoredText) GetName

func (linkanchoredtext *LinkAnchoredText) GetName() (res string)

for satisfaction of GongStruct interface

func (*LinkAnchoredText) OnAfterUpdate

func (linkAnchoredText *LinkAnchoredText) OnAfterUpdate(stage *StageStruct, _, frontLinkAnchoredText *LinkAnchoredText)

func (*LinkAnchoredText) Stage

func (linkanchoredtext *LinkAnchoredText) Stage(stage *StageStruct) *LinkAnchoredText

Stage puts linkanchoredtext to the model stage

func (*LinkAnchoredText) Unstage

func (linkanchoredtext *LinkAnchoredText) Unstage(stage *StageStruct) *LinkAnchoredText

Unstage removes linkanchoredtext off the model stage

func (*LinkAnchoredText) UnstageVoid

func (linkanchoredtext *LinkAnchoredText) UnstageVoid(stage *StageStruct)

UnstageVoid removes linkanchoredtext off the model stage

type LinkAnchoredTextImplInterface

type LinkAnchoredTextImplInterface interface {

	// AnchoredTextUpdated function is called each time a AnchoredText is modified
	AnchoredTextUpdated(updatedAnchoredText *LinkAnchoredText)
}

type LinkAnchoredTextOrchestrator

type LinkAnchoredTextOrchestrator struct {
}

LinkAnchoredTextOrchestrator

func (*LinkAnchoredTextOrchestrator) OnAfterUpdate

func (orchestrator *LinkAnchoredTextOrchestrator) OnAfterUpdate(
	gongsvgStage *StageStruct,
	stagedLinkAnchoredText, backRepoLinkAnchoredText *LinkAnchoredText)

type LinkAnchoredText_WOP

type LinkAnchoredText_WOP struct {
	// insertion point
	Name                        string
	Content                     string
	AutomaticLayout             bool
	LinkAnchorType              LinkAnchorType
	X_Offset                    float64
	Y_Offset                    float64
	FontWeight                  string
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type LinkImplInterface

type LinkImplInterface interface {

	// LinkUpdated function is called each time a Link is modified
	LinkUpdated(updatedLink *Link)
}

type LinkOrchestrator

type LinkOrchestrator struct {
}

LinkOrchestrator

func (*LinkOrchestrator) OnAfterUpdate

func (orchestrator *LinkOrchestrator) OnAfterUpdate(
	gongsvgStage *StageStruct,
	stagedLink, backRepoLink *Link)

type LinkType

type LinkType string
const (
	LINK_TYPE_LINE_WITH_CONTROL_POINTS LinkType = "LINK_TYPE_LINE_WITH_CONTROL_POINTS"

	//  These connectors allow you to anchor the link at any point along the edge of the
	// shape, giving you more flexibility in connecting shapes while still maintaining
	// the orthogonal (vertical/horizontal) orientation of the connection lines.
	LINK_TYPE_FLOATING_ORTHOGONAL LinkType = "LINK_TYPE_FLOATING_ORTHOGONAL"
)

values for EnumType

func (LinkType) CodeValues

func (linktype LinkType) CodeValues() (res []string)

func (LinkType) Codes

func (linktype LinkType) Codes() (res []string)

func (*LinkType) FromCodeString

func (linktype *LinkType) FromCodeString(input string) (err error)

func (*LinkType) FromString

func (linktype *LinkType) FromString(input string) (err error)

func (*LinkType) ToCodeString

func (linktype *LinkType) ToCodeString() (res string)

func (LinkType) ToString

func (linktype LinkType) ToString() (res string)

Utility function for LinkType 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 Link_WOP struct {
	// insertion point
	Name                        string
	Type                        LinkType
	IsBezierCurve               bool
	StartAnchorType             AnchorType
	EndAnchorType               AnchorType
	StartOrientation            OrientationType
	StartRatio                  float64
	EndOrientation              OrientationType
	EndRatio                    float64
	CornerOffsetRatio           float64
	CornerRadius                float64
	HasEndArrow                 bool
	EndArrowSize                float64
	HasStartArrow               bool
	StartArrowSize              float64
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type OnAfterCreateInterface

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

OnAfterCreateInterface callback when an instance is updated from the front

type OnAfterDeleteInterface

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

OnAfterDeleteInterface callback when an instance is updated from the front

type OnAfterReadInterface

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

OnAfterReadInterface callback when an instance is updated from the front

type OnAfterUpdateInterface

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

OnAfterUpdateInterface callback when an instance is updated from the front

type OnInitCommitInterface

type OnInitCommitInterface interface {
	BeforeCommit(stage *StageStruct)
}

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

type Path struct {
	Name string

	// Definition
	//
	//
	// d="M 10,30
	// A 20,20 0,0,1 50,30
	// A 20,20 0,0,1 90,30
	// Q 90,60 50,90
	// Q 10,60 10,30 z" />
	//
	// MoveTo: M, m
	// LineTo: L, l, H, h, V, v
	// Cubic Bézier Curve: C, c, S, s
	// Quadratic Bézier Curve: Q, q, T, t
	// Elliptical Arc Curve: A, a
	// ClosePath: Z, z
	// gong:text gong:width 600
	Definition string
	Presentation
	Animates []*Animate
}

func CopyBranchPath

func CopyBranchPath(mapOrigCopy map[any]any, pathFrom *Path) (pathTo *Path)

func (*Path) Checkout

func (path *Path) Checkout(stage *StageStruct) *Path

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

func (*Path) Commit

func (path *Path) Commit(stage *StageStruct) *Path

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

func (*Path) CommitVoid

func (path *Path) CommitVoid(stage *StageStruct)

func (*Path) CopyBasicFields

func (from *Path) CopyBasicFields(to *Path)

func (*Path) GetName

func (path *Path) GetName() (res string)

for satisfaction of GongStruct interface

func (*Path) Stage

func (path *Path) Stage(stage *StageStruct) *Path

Stage puts path to the model stage

func (*Path) Unstage

func (path *Path) Unstage(stage *StageStruct) *Path

Unstage removes path off the model stage

func (*Path) UnstageVoid

func (path *Path) UnstageVoid(stage *StageStruct)

UnstageVoid removes path off the model stage

type Path_WOP

type Path_WOP struct {
	// insertion point
	Name                        string
	Definition                  string
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type Point

type Point struct {
	Name string
	X, Y float64
}

func CopyBranchPoint

func CopyBranchPoint(mapOrigCopy map[any]any, pointFrom *Point) (pointTo *Point)

func (*Point) Checkout

func (point *Point) Checkout(stage *StageStruct) *Point

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

func (*Point) Commit

func (point *Point) Commit(stage *StageStruct) *Point

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

func (*Point) CommitVoid

func (point *Point) CommitVoid(stage *StageStruct)

func (*Point) CopyBasicFields

func (from *Point) CopyBasicFields(to *Point)

func (*Point) GetName

func (point *Point) GetName() (res string)

for satisfaction of GongStruct interface

func (*Point) Stage

func (point *Point) Stage(stage *StageStruct) *Point

Stage puts point to the model stage

func (*Point) Unstage

func (point *Point) Unstage(stage *StageStruct) *Point

Unstage removes point off the model stage

func (*Point) UnstageVoid

func (point *Point) UnstageVoid(stage *StageStruct)

UnstageVoid removes point off the model stage

type Point_WOP

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

type PointerToGongstruct

type PointerToGongstruct interface {
	*Animate | *Circle | *Ellipse | *Layer | *Line | *Link | *LinkAnchoredText | *Path | *Point | *Polygone | *Polyline | *Rect | *RectAnchoredPath | *RectAnchoredRect | *RectAnchoredText | *RectLinkLink | *SVG | *Text
	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 {
	FromCodeString(input string) (err error)
}

type PointerToGongstructEnumStringField

type PointerToGongstructEnumStringField interface {
	*AnchorType | *ColorType | *DrawingState | *LinkAnchorType | *LinkType | *OrientationType | *PositionOnArrowType | *RectAnchorType | *SideType | *StackName | *TextAnchorType
	FromCodeString(input string) (err error)
}

type Polygone

type Polygone struct {
	Name   string
	Points string
	Presentation
	Animates []*Animate
}

func CopyBranchPolygone

func CopyBranchPolygone(mapOrigCopy map[any]any, polygoneFrom *Polygone) (polygoneTo *Polygone)

func (*Polygone) Checkout

func (polygone *Polygone) Checkout(stage *StageStruct) *Polygone

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

func (*Polygone) Commit

func (polygone *Polygone) Commit(stage *StageStruct) *Polygone

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

func (*Polygone) CommitVoid

func (polygone *Polygone) CommitVoid(stage *StageStruct)

func (*Polygone) CopyBasicFields

func (from *Polygone) CopyBasicFields(to *Polygone)

func (*Polygone) GetName

func (polygone *Polygone) GetName() (res string)

for satisfaction of GongStruct interface

func (*Polygone) Stage

func (polygone *Polygone) Stage(stage *StageStruct) *Polygone

Stage puts polygone to the model stage

func (*Polygone) Unstage

func (polygone *Polygone) Unstage(stage *StageStruct) *Polygone

Unstage removes polygone off the model stage

func (*Polygone) UnstageVoid

func (polygone *Polygone) UnstageVoid(stage *StageStruct)

UnstageVoid removes polygone off the model stage

type Polygone_WOP

type Polygone_WOP struct {
	// insertion point
	Name                        string
	Points                      string
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type Polyline

type Polyline struct {
	Name   string
	Points string
	Presentation
	Animates []*Animate
}

func CopyBranchPolyline

func CopyBranchPolyline(mapOrigCopy map[any]any, polylineFrom *Polyline) (polylineTo *Polyline)

func (*Polyline) Checkout

func (polyline *Polyline) Checkout(stage *StageStruct) *Polyline

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

func (*Polyline) Commit

func (polyline *Polyline) Commit(stage *StageStruct) *Polyline

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

func (*Polyline) CommitVoid

func (polyline *Polyline) CommitVoid(stage *StageStruct)

func (*Polyline) CopyBasicFields

func (from *Polyline) CopyBasicFields(to *Polyline)

func (*Polyline) GetName

func (polyline *Polyline) GetName() (res string)

for satisfaction of GongStruct interface

func (*Polyline) Stage

func (polyline *Polyline) Stage(stage *StageStruct) *Polyline

Stage puts polyline to the model stage

func (*Polyline) Unstage

func (polyline *Polyline) Unstage(stage *StageStruct) *Polyline

Unstage removes polyline off the model stage

func (*Polyline) UnstageVoid

func (polyline *Polyline) UnstageVoid(stage *StageStruct)

UnstageVoid removes polyline off the model stage

type Polyline_WOP

type Polyline_WOP struct {
	// insertion point
	Name                        string
	Points                      string
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type PositionOnArrowType

type PositionOnArrowType string
const (
	POSITION_ON_ARROW_START PositionOnArrowType = "POSITION_ON_ARROW_START"
	POSITION_ON_ARROW_END   PositionOnArrowType = "POSITION_ON_ARROW_END"
)

values for EnumType

func (PositionOnArrowType) CodeValues

func (positiononarrowtype PositionOnArrowType) CodeValues() (res []string)

func (PositionOnArrowType) Codes

func (positiononarrowtype PositionOnArrowType) Codes() (res []string)

func (*PositionOnArrowType) FromCodeString

func (positiononarrowtype *PositionOnArrowType) FromCodeString(input string) (err error)

func (*PositionOnArrowType) FromString

func (positiononarrowtype *PositionOnArrowType) FromString(input string) (err error)

func (*PositionOnArrowType) ToCodeString

func (positiononarrowtype *PositionOnArrowType) ToCodeString() (res string)

func (PositionOnArrowType) ToString

func (positiononarrowtype PositionOnArrowType) ToString() (res string)

Utility function for PositionOnArrowType 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 Presentation

type Presentation struct {
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string

	// Transform is a string componding SVG transform
	//
	// for instance : rotate(-10 50 100)
	// translate(-36 45.5)
	// skewX(40)
	// scale(1 0.5)
	// gong:text gong:width 600 gong:height 400
	Transform string
}

type Rect

type Rect struct {
	Name string

	X, Y, Width, Height, RX float64
	Presentation

	Animations []*Animate

	IsSelectable bool // alllow selected
	IsSelected   bool

	CanHaveLeftHandle bool
	HasLeftHandle     bool

	CanHaveRightHandle bool
	HasRightHandle     bool

	CanHaveTopHandle bool
	HasTopHandle     bool

	IsScalingProportionally bool

	CanHaveBottomHandle bool
	HasBottomHandle     bool

	CanMoveHorizontaly bool
	CanMoveVerticaly   bool

	RectAnchoredTexts []*RectAnchoredText
	RectAnchoredRects []*RectAnchoredRect
	RectAnchoredPaths []*RectAnchoredPath

	Impl RectImplInterface
}

func CopyBranchRect

func CopyBranchRect(mapOrigCopy map[any]any, rectFrom *Rect) (rectTo *Rect)

func (*Rect) Checkout

func (rect *Rect) Checkout(stage *StageStruct) *Rect

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

func (*Rect) Commit

func (rect *Rect) Commit(stage *StageStruct) *Rect

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

func (*Rect) CommitVoid

func (rect *Rect) CommitVoid(stage *StageStruct)

func (*Rect) CopyBasicFields

func (from *Rect) CopyBasicFields(to *Rect)

func (*Rect) GetName

func (rect *Rect) GetName() (res string)

for satisfaction of GongStruct interface

func (*Rect) OnAfterUpdate

func (rect *Rect) OnAfterUpdate(stage *StageStruct, _, frontRect *Rect)

OnAfterUpdate, notice that rect == stagedRect

func (*Rect) Stage

func (rect *Rect) Stage(stage *StageStruct) *Rect

Stage puts rect to the model stage

func (*Rect) Unstage

func (rect *Rect) Unstage(stage *StageStruct) *Rect

Unstage removes rect off the model stage

func (*Rect) UnstageVoid

func (rect *Rect) UnstageVoid(stage *StageStruct)

UnstageVoid removes rect off the model stage

type RectAnchorType

type RectAnchorType string
const (
	RECT_TOP                RectAnchorType = "RECT_TOP"
	RECT_TOP_LEFT           RectAnchorType = "RECT_TOP_LEFT"
	RECT_TOP_RIGHT          RectAnchorType = "RECT_TOP_RIGHT"
	RECT_BOTTOM             RectAnchorType = "RECT_BOTTOM"
	RECT_BOTTOM_LEFT        RectAnchorType = "RECT_BOTTOM_LEFT"
	RECT_BOTTOM_LEFT_LEFT   RectAnchorType = "RECT_BOTTOM_LEFT_LEFT"
	RECT_BOTTOM_BOTTOM_LEFT RectAnchorType = "RECT_BOTTOM_BOTTOM_LEFT"
	RECT_BOTTOM_RIGHT       RectAnchorType = "RECT_BOTTOM_RIGHT"

	// the path is inside the shape, but on the right
	RECT_BOTTOM_INSIDE_RIGHT RectAnchorType = "RECT_BOTTOM_INSIDE_RIGHT"

	RECT_LEFT   RectAnchorType = "RECT_LEFT"
	RECT_RIGHT  RectAnchorType = "RECT_RIGHT"
	RECT_CENTER RectAnchorType = "RECT_CENTER"
)

values for EnumType

func (RectAnchorType) CodeValues

func (rectanchortype RectAnchorType) CodeValues() (res []string)

func (RectAnchorType) Codes

func (rectanchortype RectAnchorType) Codes() (res []string)

func (*RectAnchorType) FromCodeString

func (rectanchortype *RectAnchorType) FromCodeString(input string) (err error)

func (*RectAnchorType) FromString

func (rectanchortype *RectAnchorType) FromString(input string) (err error)

func (*RectAnchorType) ToCodeString

func (rectanchortype *RectAnchorType) ToCodeString() (res string)

func (RectAnchorType) ToString

func (rectanchortype RectAnchorType) ToString() (res string)

Utility function for RectAnchorType 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 RectAnchoredPath

type RectAnchoredPath struct {
	Name string

	Definition string

	X_Offset float64
	Y_Offset float64

	// gong:width 400
	RectAnchorType RectAnchorType

	// if true, rect has the same Dimension that the rect it is anchored to
	// rect must scale proportionnaly
	ScalePropotionnally bool

	// AppliedScaling is the scale that is applied is ScalePropotionnally is set
	// The value is initialized to 1 then scales with the scaling action
	// of the end user
	AppliedScaling float64

	Presentation
}

func CopyBranchRectAnchoredPath

func CopyBranchRectAnchoredPath(mapOrigCopy map[any]any, rectanchoredpathFrom *RectAnchoredPath) (rectanchoredpathTo *RectAnchoredPath)

func (*RectAnchoredPath) Checkout

func (rectanchoredpath *RectAnchoredPath) Checkout(stage *StageStruct) *RectAnchoredPath

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

func (*RectAnchoredPath) Commit

func (rectanchoredpath *RectAnchoredPath) Commit(stage *StageStruct) *RectAnchoredPath

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

func (*RectAnchoredPath) CommitVoid

func (rectanchoredpath *RectAnchoredPath) CommitVoid(stage *StageStruct)

func (*RectAnchoredPath) CopyBasicFields

func (from *RectAnchoredPath) CopyBasicFields(to *RectAnchoredPath)

func (*RectAnchoredPath) GetName

func (rectanchoredpath *RectAnchoredPath) GetName() (res string)

for satisfaction of GongStruct interface

func (*RectAnchoredPath) Stage

func (rectanchoredpath *RectAnchoredPath) Stage(stage *StageStruct) *RectAnchoredPath

Stage puts rectanchoredpath to the model stage

func (*RectAnchoredPath) Unstage

func (rectanchoredpath *RectAnchoredPath) Unstage(stage *StageStruct) *RectAnchoredPath

Unstage removes rectanchoredpath off the model stage

func (*RectAnchoredPath) UnstageVoid

func (rectanchoredpath *RectAnchoredPath) UnstageVoid(stage *StageStruct)

UnstageVoid removes rectanchoredpath off the model stage

type RectAnchoredPath_WOP

type RectAnchoredPath_WOP struct {
	// insertion point
	Name                        string
	Definition                  string
	X_Offset                    float64
	Y_Offset                    float64
	RectAnchorType              RectAnchorType
	ScalePropotionnally         bool
	AppliedScaling              float64
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type RectAnchoredRect

type RectAnchoredRect struct {
	Name string

	X, Y, Width, Height, RX float64

	X_Offset float64
	Y_Offset float64

	RectAnchorType RectAnchorType

	// if true, rect has the same Dimension that the rect it is anchored to
	WidthFollowRect  bool
	HeightFollowRect bool

	Presentation
}

func CopyBranchRectAnchoredRect

func CopyBranchRectAnchoredRect(mapOrigCopy map[any]any, rectanchoredrectFrom *RectAnchoredRect) (rectanchoredrectTo *RectAnchoredRect)

func (*RectAnchoredRect) Checkout

func (rectanchoredrect *RectAnchoredRect) Checkout(stage *StageStruct) *RectAnchoredRect

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

func (*RectAnchoredRect) Commit

func (rectanchoredrect *RectAnchoredRect) Commit(stage *StageStruct) *RectAnchoredRect

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

func (*RectAnchoredRect) CommitVoid

func (rectanchoredrect *RectAnchoredRect) CommitVoid(stage *StageStruct)

func (*RectAnchoredRect) CopyBasicFields

func (from *RectAnchoredRect) CopyBasicFields(to *RectAnchoredRect)

func (*RectAnchoredRect) GetName

func (rectanchoredrect *RectAnchoredRect) GetName() (res string)

for satisfaction of GongStruct interface

func (*RectAnchoredRect) Stage

func (rectanchoredrect *RectAnchoredRect) Stage(stage *StageStruct) *RectAnchoredRect

Stage puts rectanchoredrect to the model stage

func (*RectAnchoredRect) Unstage

func (rectanchoredrect *RectAnchoredRect) Unstage(stage *StageStruct) *RectAnchoredRect

Unstage removes rectanchoredrect off the model stage

func (*RectAnchoredRect) UnstageVoid

func (rectanchoredrect *RectAnchoredRect) UnstageVoid(stage *StageStruct)

UnstageVoid removes rectanchoredrect off the model stage

type RectAnchoredRect_WOP

type RectAnchoredRect_WOP struct {
	// insertion point
	Name                        string
	X                           float64
	Y                           float64
	Width                       float64
	Height                      float64
	RX                          float64
	X_Offset                    float64
	Y_Offset                    float64
	RectAnchorType              RectAnchorType
	WidthFollowRect             bool
	HeightFollowRect            bool
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type RectAnchoredText

type RectAnchoredText struct {
	Name    string
	Content string

	// "bold", "normal", ...
	FontWeight string
	FontSize   int

	X_Offset float64
	Y_Offset float64

	RectAnchorType RectAnchorType
	TextAnchorType TextAnchorType

	Presentation
	Animates []*Animate
}

func CopyBranchRectAnchoredText

func CopyBranchRectAnchoredText(mapOrigCopy map[any]any, rectanchoredtextFrom *RectAnchoredText) (rectanchoredtextTo *RectAnchoredText)

func (*RectAnchoredText) Checkout

func (rectanchoredtext *RectAnchoredText) Checkout(stage *StageStruct) *RectAnchoredText

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

func (*RectAnchoredText) Commit

func (rectanchoredtext *RectAnchoredText) Commit(stage *StageStruct) *RectAnchoredText

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

func (*RectAnchoredText) CommitVoid

func (rectanchoredtext *RectAnchoredText) CommitVoid(stage *StageStruct)

func (*RectAnchoredText) CopyBasicFields

func (from *RectAnchoredText) CopyBasicFields(to *RectAnchoredText)

func (*RectAnchoredText) GetName

func (rectanchoredtext *RectAnchoredText) GetName() (res string)

for satisfaction of GongStruct interface

func (*RectAnchoredText) Stage

func (rectanchoredtext *RectAnchoredText) Stage(stage *StageStruct) *RectAnchoredText

Stage puts rectanchoredtext to the model stage

func (*RectAnchoredText) Unstage

func (rectanchoredtext *RectAnchoredText) Unstage(stage *StageStruct) *RectAnchoredText

Unstage removes rectanchoredtext off the model stage

func (*RectAnchoredText) UnstageVoid

func (rectanchoredtext *RectAnchoredText) UnstageVoid(stage *StageStruct)

UnstageVoid removes rectanchoredtext off the model stage

type RectAnchoredText_WOP

type RectAnchoredText_WOP struct {
	// insertion point
	Name                        string
	Content                     string
	FontWeight                  string
	FontSize                    int
	X_Offset                    float64
	Y_Offset                    float64
	RectAnchorType              RectAnchorType
	TextAnchorType              TextAnchorType
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type RectImplInterface

type RectImplInterface interface {

	// RectUpdated function is called each time a Rect is modified
	RectUpdated(updatedRect *Rect)
}
type RectLinkLink struct {
	Name  string
	Start *Rect
	End   *Link

	// TargetAnchorPosition defines the anchor point on the target link between
	// the start and and the end rectangle
	// 0 zero means the anchor is on the anchor at the start rectangle and 1 means the anchor is on the anchor on the end rectangle
	TargetAnchorPosition float64

	Presentation
}

RectLinkLink define a link between a rectangle and a target link

func CopyBranchRectLinkLink(mapOrigCopy map[any]any, rectlinklinkFrom *RectLinkLink) (rectlinklinkTo *RectLinkLink)

func (*RectLinkLink) Checkout

func (rectlinklink *RectLinkLink) Checkout(stage *StageStruct) *RectLinkLink

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

func (*RectLinkLink) Commit

func (rectlinklink *RectLinkLink) Commit(stage *StageStruct) *RectLinkLink

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

func (*RectLinkLink) CommitVoid

func (rectlinklink *RectLinkLink) CommitVoid(stage *StageStruct)

func (*RectLinkLink) CopyBasicFields

func (from *RectLinkLink) CopyBasicFields(to *RectLinkLink)

func (*RectLinkLink) GetName

func (rectlinklink *RectLinkLink) GetName() (res string)

for satisfaction of GongStruct interface

func (*RectLinkLink) Stage

func (rectlinklink *RectLinkLink) Stage(stage *StageStruct) *RectLinkLink

Stage puts rectlinklink to the model stage

func (*RectLinkLink) Unstage

func (rectlinklink *RectLinkLink) Unstage(stage *StageStruct) *RectLinkLink

Unstage removes rectlinklink off the model stage

func (*RectLinkLink) UnstageVoid

func (rectlinklink *RectLinkLink) UnstageVoid(stage *StageStruct)

UnstageVoid removes rectlinklink off the model stage

type RectLinkLink_WOP struct {
	// insertion point
	Name                        string
	TargetAnchorPosition        float64
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

type RectOrchestrator

type RectOrchestrator struct {
}

RectOrchestrator

func (*RectOrchestrator) OnAfterUpdate

func (orchestrator *RectOrchestrator) OnAfterUpdate(
	gongsvgStage *StageStruct,
	stagedRect, backRepoRect *Rect)

type Rect_WOP

type Rect_WOP struct {
	// insertion point
	Name                        string
	X                           float64
	Y                           float64
	Width                       float64
	Height                      float64
	RX                          float64
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
	IsSelectable                bool
	IsSelected                  bool
	CanHaveLeftHandle           bool
	HasLeftHandle               bool
	CanHaveRightHandle          bool
	HasRightHandle              bool
	CanHaveTopHandle            bool
	HasTopHandle                bool
	IsScalingProportionally     bool
	CanHaveBottomHandle         bool
	HasBottomHandle             bool
	CanMoveHorizontaly          bool
	CanMoveVerticaly            bool
}

type ReverseField

type ReverseField struct {
	GongstructName string
	Fieldname      string
}

func GetReverseFields

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

type SVG

type SVG struct {
	Name   string
	Layers []*Layer

	// Drawing indicates wether it draws the line
	DrawingState DrawingState

	// When the mouse is up on the end rect, the SVG backend will create the link
	// between both rects
	StartRect *Rect
	EndRect   *Rect

	IsEditable bool

	Impl SVGImplInterface
}

func CopyBranchSVG

func CopyBranchSVG(mapOrigCopy map[any]any, svgFrom *SVG) (svgTo *SVG)

func (*SVG) Checkout

func (svg *SVG) Checkout(stage *StageStruct) *SVG

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

func (*SVG) Commit

func (svg *SVG) Commit(stage *StageStruct) *SVG

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

func (*SVG) CommitVoid

func (svg *SVG) CommitVoid(stage *StageStruct)

func (*SVG) CopyBasicFields

func (from *SVG) CopyBasicFields(to *SVG)

func (*SVG) GetName

func (svg *SVG) GetName() (res string)

for satisfaction of GongStruct interface

func (*SVG) OnAfterUpdate

func (svg *SVG) OnAfterUpdate(stage *StageStruct, _, frontSVG *SVG)

OnAfterUpdate, notice that rect == stagedRect

func (*SVG) Stage

func (svg *SVG) Stage(stage *StageStruct) *SVG

Stage puts svg to the model stage

func (*SVG) Unstage

func (svg *SVG) Unstage(stage *StageStruct) *SVG

Unstage removes svg off the model stage

func (*SVG) UnstageVoid

func (svg *SVG) UnstageVoid(stage *StageStruct)

UnstageVoid removes svg off the model stage

type SVGImplInterface

type SVGImplInterface interface {

	// SVGUpdated function is called each time a SVG is modified
	SVGUpdated(updatedSVG *SVG)
}

type SVGOrchestrator

type SVGOrchestrator struct {
}

SVGOrchestrator

func (*SVGOrchestrator) OnAfterUpdate

func (orchestrator *SVGOrchestrator) OnAfterUpdate(
	gongsvgStage *StageStruct,
	stagedSVG, backRepoSVG *SVG)

type SVG_WOP

type SVG_WOP struct {
	// insertion point
	Name         string
	DrawingState DrawingState
	IsEditable   bool
}

type SideType

type SideType string
const (
	SIDE_TOP    SideType = "SIDE_TOP"
	SIDE_BOTTOM SideType = "SIDE_BOTTOM"
	SIDE_LEFT   SideType = "SIDE_LEFT"
	SIDE_RIGHT  SideType = "SIDE_RIGHT"
)

values for EnumType

func (SideType) CodeValues

func (sidetype SideType) CodeValues() (res []string)

func (SideType) Codes

func (sidetype SideType) Codes() (res []string)

func (*SideType) FromCodeString

func (sidetype *SideType) FromCodeString(input string) (err error)

func (*SideType) FromString

func (sidetype *SideType) FromString(input string) (err error)

func (*SideType) ToCodeString

func (sidetype *SideType) ToCodeString() (res string)

func (SideType) ToString

func (sidetype SideType) ToString() (res string)

Utility function for SideType 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 StackName

type StackName string

StackName -

const (
	StackNameDefault StackName = "gongsvg" // this is the value generated in the main
)

values for TableName

func (StackName) CodeValues

func (stackname StackName) CodeValues() (res []string)

func (StackName) Codes

func (stackname StackName) Codes() (res []string)

func (*StackName) FromCodeString

func (stackname *StackName) FromCodeString(input string) (err error)

func (*StackName) FromString

func (stackname *StackName) FromString(input string) (err error)

func (*StackName) ToCodeString

func (stackname *StackName) ToCodeString() (res string)

func (StackName) ToString

func (stackname StackName) ToString() (res string)

Utility function for StackName if enum values are string, it is stored with the value if enum values are int, they are stored with the code of the value

type StageStruct

type StageStruct struct {

	// insertion point for definition of arrays registering instances
	Animates           map[*Animate]any
	Animates_mapString map[string]*Animate

	OnAfterAnimateCreateCallback OnAfterCreateInterface[Animate]
	OnAfterAnimateUpdateCallback OnAfterUpdateInterface[Animate]
	OnAfterAnimateDeleteCallback OnAfterDeleteInterface[Animate]
	OnAfterAnimateReadCallback   OnAfterReadInterface[Animate]

	Circles           map[*Circle]any
	Circles_mapString map[string]*Circle

	// insertion point for slice of pointers maps
	Circle_Animations_reverseMap map[*Animate]*Circle

	OnAfterCircleCreateCallback OnAfterCreateInterface[Circle]
	OnAfterCircleUpdateCallback OnAfterUpdateInterface[Circle]
	OnAfterCircleDeleteCallback OnAfterDeleteInterface[Circle]
	OnAfterCircleReadCallback   OnAfterReadInterface[Circle]

	Ellipses           map[*Ellipse]any
	Ellipses_mapString map[string]*Ellipse

	// insertion point for slice of pointers maps
	Ellipse_Animates_reverseMap map[*Animate]*Ellipse

	OnAfterEllipseCreateCallback OnAfterCreateInterface[Ellipse]
	OnAfterEllipseUpdateCallback OnAfterUpdateInterface[Ellipse]
	OnAfterEllipseDeleteCallback OnAfterDeleteInterface[Ellipse]
	OnAfterEllipseReadCallback   OnAfterReadInterface[Ellipse]

	Layers           map[*Layer]any
	Layers_mapString map[string]*Layer

	// insertion point for slice of pointers maps
	Layer_Rects_reverseMap         map[*Rect]*Layer
	Layer_Texts_reverseMap         map[*Text]*Layer
	Layer_Circles_reverseMap       map[*Circle]*Layer
	Layer_Lines_reverseMap         map[*Line]*Layer
	Layer_Ellipses_reverseMap      map[*Ellipse]*Layer
	Layer_Polylines_reverseMap     map[*Polyline]*Layer
	Layer_Polygones_reverseMap     map[*Polygone]*Layer
	Layer_Paths_reverseMap         map[*Path]*Layer
	Layer_Links_reverseMap         map[*Link]*Layer
	Layer_RectLinkLinks_reverseMap map[*RectLinkLink]*Layer

	OnAfterLayerCreateCallback OnAfterCreateInterface[Layer]
	OnAfterLayerUpdateCallback OnAfterUpdateInterface[Layer]
	OnAfterLayerDeleteCallback OnAfterDeleteInterface[Layer]
	OnAfterLayerReadCallback   OnAfterReadInterface[Layer]

	Lines           map[*Line]any
	Lines_mapString map[string]*Line

	// insertion point for slice of pointers maps
	Line_Animates_reverseMap map[*Animate]*Line

	OnAfterLineCreateCallback OnAfterCreateInterface[Line]
	OnAfterLineUpdateCallback OnAfterUpdateInterface[Line]
	OnAfterLineDeleteCallback OnAfterDeleteInterface[Line]
	OnAfterLineReadCallback   OnAfterReadInterface[Line]

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

	// insertion point for slice of pointers maps
	Link_TextAtArrowEnd_reverseMap   map[*LinkAnchoredText]*Link
	Link_TextAtArrowStart_reverseMap map[*LinkAnchoredText]*Link
	Link_ControlPoints_reverseMap    map[*Point]*Link

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

	LinkAnchoredTexts           map[*LinkAnchoredText]any
	LinkAnchoredTexts_mapString map[string]*LinkAnchoredText

	// insertion point for slice of pointers maps
	LinkAnchoredText_Animates_reverseMap map[*Animate]*LinkAnchoredText

	OnAfterLinkAnchoredTextCreateCallback OnAfterCreateInterface[LinkAnchoredText]
	OnAfterLinkAnchoredTextUpdateCallback OnAfterUpdateInterface[LinkAnchoredText]
	OnAfterLinkAnchoredTextDeleteCallback OnAfterDeleteInterface[LinkAnchoredText]
	OnAfterLinkAnchoredTextReadCallback   OnAfterReadInterface[LinkAnchoredText]

	Paths           map[*Path]any
	Paths_mapString map[string]*Path

	// insertion point for slice of pointers maps
	Path_Animates_reverseMap map[*Animate]*Path

	OnAfterPathCreateCallback OnAfterCreateInterface[Path]
	OnAfterPathUpdateCallback OnAfterUpdateInterface[Path]
	OnAfterPathDeleteCallback OnAfterDeleteInterface[Path]
	OnAfterPathReadCallback   OnAfterReadInterface[Path]

	Points           map[*Point]any
	Points_mapString map[string]*Point

	OnAfterPointCreateCallback OnAfterCreateInterface[Point]
	OnAfterPointUpdateCallback OnAfterUpdateInterface[Point]
	OnAfterPointDeleteCallback OnAfterDeleteInterface[Point]
	OnAfterPointReadCallback   OnAfterReadInterface[Point]

	Polygones           map[*Polygone]any
	Polygones_mapString map[string]*Polygone

	// insertion point for slice of pointers maps
	Polygone_Animates_reverseMap map[*Animate]*Polygone

	OnAfterPolygoneCreateCallback OnAfterCreateInterface[Polygone]
	OnAfterPolygoneUpdateCallback OnAfterUpdateInterface[Polygone]
	OnAfterPolygoneDeleteCallback OnAfterDeleteInterface[Polygone]
	OnAfterPolygoneReadCallback   OnAfterReadInterface[Polygone]

	Polylines           map[*Polyline]any
	Polylines_mapString map[string]*Polyline

	// insertion point for slice of pointers maps
	Polyline_Animates_reverseMap map[*Animate]*Polyline

	OnAfterPolylineCreateCallback OnAfterCreateInterface[Polyline]
	OnAfterPolylineUpdateCallback OnAfterUpdateInterface[Polyline]
	OnAfterPolylineDeleteCallback OnAfterDeleteInterface[Polyline]
	OnAfterPolylineReadCallback   OnAfterReadInterface[Polyline]

	Rects           map[*Rect]any
	Rects_mapString map[string]*Rect

	// insertion point for slice of pointers maps
	Rect_Animations_reverseMap        map[*Animate]*Rect
	Rect_RectAnchoredTexts_reverseMap map[*RectAnchoredText]*Rect
	Rect_RectAnchoredRects_reverseMap map[*RectAnchoredRect]*Rect
	Rect_RectAnchoredPaths_reverseMap map[*RectAnchoredPath]*Rect

	OnAfterRectCreateCallback OnAfterCreateInterface[Rect]
	OnAfterRectUpdateCallback OnAfterUpdateInterface[Rect]
	OnAfterRectDeleteCallback OnAfterDeleteInterface[Rect]
	OnAfterRectReadCallback   OnAfterReadInterface[Rect]

	RectAnchoredPaths           map[*RectAnchoredPath]any
	RectAnchoredPaths_mapString map[string]*RectAnchoredPath

	OnAfterRectAnchoredPathCreateCallback OnAfterCreateInterface[RectAnchoredPath]
	OnAfterRectAnchoredPathUpdateCallback OnAfterUpdateInterface[RectAnchoredPath]
	OnAfterRectAnchoredPathDeleteCallback OnAfterDeleteInterface[RectAnchoredPath]
	OnAfterRectAnchoredPathReadCallback   OnAfterReadInterface[RectAnchoredPath]

	RectAnchoredRects           map[*RectAnchoredRect]any
	RectAnchoredRects_mapString map[string]*RectAnchoredRect

	OnAfterRectAnchoredRectCreateCallback OnAfterCreateInterface[RectAnchoredRect]
	OnAfterRectAnchoredRectUpdateCallback OnAfterUpdateInterface[RectAnchoredRect]
	OnAfterRectAnchoredRectDeleteCallback OnAfterDeleteInterface[RectAnchoredRect]
	OnAfterRectAnchoredRectReadCallback   OnAfterReadInterface[RectAnchoredRect]

	RectAnchoredTexts           map[*RectAnchoredText]any
	RectAnchoredTexts_mapString map[string]*RectAnchoredText

	// insertion point for slice of pointers maps
	RectAnchoredText_Animates_reverseMap map[*Animate]*RectAnchoredText

	OnAfterRectAnchoredTextCreateCallback OnAfterCreateInterface[RectAnchoredText]
	OnAfterRectAnchoredTextUpdateCallback OnAfterUpdateInterface[RectAnchoredText]
	OnAfterRectAnchoredTextDeleteCallback OnAfterDeleteInterface[RectAnchoredText]
	OnAfterRectAnchoredTextReadCallback   OnAfterReadInterface[RectAnchoredText]

	RectLinkLinks           map[*RectLinkLink]any
	RectLinkLinks_mapString map[string]*RectLinkLink

	OnAfterRectLinkLinkCreateCallback OnAfterCreateInterface[RectLinkLink]
	OnAfterRectLinkLinkUpdateCallback OnAfterUpdateInterface[RectLinkLink]
	OnAfterRectLinkLinkDeleteCallback OnAfterDeleteInterface[RectLinkLink]
	OnAfterRectLinkLinkReadCallback   OnAfterReadInterface[RectLinkLink]

	SVGs           map[*SVG]any
	SVGs_mapString map[string]*SVG

	// insertion point for slice of pointers maps
	SVG_Layers_reverseMap map[*Layer]*SVG

	OnAfterSVGCreateCallback OnAfterCreateInterface[SVG]
	OnAfterSVGUpdateCallback OnAfterUpdateInterface[SVG]
	OnAfterSVGDeleteCallback OnAfterDeleteInterface[SVG]
	OnAfterSVGReadCallback   OnAfterReadInterface[SVG]

	Texts           map[*Text]any
	Texts_mapString map[string]*Text

	// insertion point for slice of pointers maps
	Text_Animates_reverseMap map[*Animate]*Text

	OnAfterTextCreateCallback OnAfterCreateInterface[Text]
	OnAfterTextUpdateCallback OnAfterUpdateInterface[Text]
	OnAfterTextDeleteCallback OnAfterDeleteInterface[Text]
	OnAfterTextReadCallback   OnAfterReadInterface[Text]

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

func (stage *StageStruct) IsStagedAnimate(animate *Animate) (ok bool)

insertion point for stage per struct

func (*StageStruct) IsStagedCircle

func (stage *StageStruct) IsStagedCircle(circle *Circle) (ok bool)

func (*StageStruct) IsStagedEllipse

func (stage *StageStruct) IsStagedEllipse(ellipse *Ellipse) (ok bool)

func (*StageStruct) IsStagedLayer

func (stage *StageStruct) IsStagedLayer(layer *Layer) (ok bool)

func (*StageStruct) IsStagedLine

func (stage *StageStruct) IsStagedLine(line *Line) (ok bool)
func (stage *StageStruct) IsStagedLink(link *Link) (ok bool)

func (*StageStruct) IsStagedLinkAnchoredText

func (stage *StageStruct) IsStagedLinkAnchoredText(linkanchoredtext *LinkAnchoredText) (ok bool)

func (*StageStruct) IsStagedPath

func (stage *StageStruct) IsStagedPath(path *Path) (ok bool)

func (*StageStruct) IsStagedPoint

func (stage *StageStruct) IsStagedPoint(point *Point) (ok bool)

func (*StageStruct) IsStagedPolygone

func (stage *StageStruct) IsStagedPolygone(polygone *Polygone) (ok bool)

func (*StageStruct) IsStagedPolyline

func (stage *StageStruct) IsStagedPolyline(polyline *Polyline) (ok bool)

func (*StageStruct) IsStagedRect

func (stage *StageStruct) IsStagedRect(rect *Rect) (ok bool)

func (*StageStruct) IsStagedRectAnchoredPath

func (stage *StageStruct) IsStagedRectAnchoredPath(rectanchoredpath *RectAnchoredPath) (ok bool)

func (*StageStruct) IsStagedRectAnchoredRect

func (stage *StageStruct) IsStagedRectAnchoredRect(rectanchoredrect *RectAnchoredRect) (ok bool)

func (*StageStruct) IsStagedRectAnchoredText

func (stage *StageStruct) IsStagedRectAnchoredText(rectanchoredtext *RectAnchoredText) (ok bool)
func (stage *StageStruct) IsStagedRectLinkLink(rectlinklink *RectLinkLink) (ok bool)

func (*StageStruct) IsStagedSVG

func (stage *StageStruct) IsStagedSVG(svg *SVG) (ok bool)

func (*StageStruct) IsStagedText

func (stage *StageStruct) IsStagedText(text *Text) (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) StageBranchAnimate

func (stage *StageStruct) StageBranchAnimate(animate *Animate)

insertion point for stage branch per struct

func (*StageStruct) StageBranchCircle

func (stage *StageStruct) StageBranchCircle(circle *Circle)

func (*StageStruct) StageBranchEllipse

func (stage *StageStruct) StageBranchEllipse(ellipse *Ellipse)

func (*StageStruct) StageBranchLayer

func (stage *StageStruct) StageBranchLayer(layer *Layer)

func (*StageStruct) StageBranchLine

func (stage *StageStruct) StageBranchLine(line *Line)
func (stage *StageStruct) StageBranchLink(link *Link)

func (*StageStruct) StageBranchLinkAnchoredText

func (stage *StageStruct) StageBranchLinkAnchoredText(linkanchoredtext *LinkAnchoredText)

func (*StageStruct) StageBranchPath

func (stage *StageStruct) StageBranchPath(path *Path)

func (*StageStruct) StageBranchPoint

func (stage *StageStruct) StageBranchPoint(point *Point)

func (*StageStruct) StageBranchPolygone

func (stage *StageStruct) StageBranchPolygone(polygone *Polygone)

func (*StageStruct) StageBranchPolyline

func (stage *StageStruct) StageBranchPolyline(polyline *Polyline)

func (*StageStruct) StageBranchRect

func (stage *StageStruct) StageBranchRect(rect *Rect)

func (*StageStruct) StageBranchRectAnchoredPath

func (stage *StageStruct) StageBranchRectAnchoredPath(rectanchoredpath *RectAnchoredPath)

func (*StageStruct) StageBranchRectAnchoredRect

func (stage *StageStruct) StageBranchRectAnchoredRect(rectanchoredrect *RectAnchoredRect)

func (*StageStruct) StageBranchRectAnchoredText

func (stage *StageStruct) StageBranchRectAnchoredText(rectanchoredtext *RectAnchoredText)
func (stage *StageStruct) StageBranchRectLinkLink(rectlinklink *RectLinkLink)

func (*StageStruct) StageBranchSVG

func (stage *StageStruct) StageBranchSVG(svg *SVG)

func (*StageStruct) StageBranchText

func (stage *StageStruct) StageBranchText(text *Text)

func (*StageStruct) Unstage

func (stage *StageStruct) Unstage()

func (*StageStruct) UnstageBranchAnimate

func (stage *StageStruct) UnstageBranchAnimate(animate *Animate)

insertion point for unstage branch per struct

func (*StageStruct) UnstageBranchCircle

func (stage *StageStruct) UnstageBranchCircle(circle *Circle)

func (*StageStruct) UnstageBranchEllipse

func (stage *StageStruct) UnstageBranchEllipse(ellipse *Ellipse)

func (*StageStruct) UnstageBranchLayer

func (stage *StageStruct) UnstageBranchLayer(layer *Layer)

func (*StageStruct) UnstageBranchLine

func (stage *StageStruct) UnstageBranchLine(line *Line)
func (stage *StageStruct) UnstageBranchLink(link *Link)

func (*StageStruct) UnstageBranchLinkAnchoredText

func (stage *StageStruct) UnstageBranchLinkAnchoredText(linkanchoredtext *LinkAnchoredText)

func (*StageStruct) UnstageBranchPath

func (stage *StageStruct) UnstageBranchPath(path *Path)

func (*StageStruct) UnstageBranchPoint

func (stage *StageStruct) UnstageBranchPoint(point *Point)

func (*StageStruct) UnstageBranchPolygone

func (stage *StageStruct) UnstageBranchPolygone(polygone *Polygone)

func (*StageStruct) UnstageBranchPolyline

func (stage *StageStruct) UnstageBranchPolyline(polyline *Polyline)

func (*StageStruct) UnstageBranchRect

func (stage *StageStruct) UnstageBranchRect(rect *Rect)

func (*StageStruct) UnstageBranchRectAnchoredPath

func (stage *StageStruct) UnstageBranchRectAnchoredPath(rectanchoredpath *RectAnchoredPath)

func (*StageStruct) UnstageBranchRectAnchoredRect

func (stage *StageStruct) UnstageBranchRectAnchoredRect(rectanchoredrect *RectAnchoredRect)

func (*StageStruct) UnstageBranchRectAnchoredText

func (stage *StageStruct) UnstageBranchRectAnchoredText(rectanchoredtext *RectAnchoredText)
func (stage *StageStruct) UnstageBranchRectLinkLink(rectlinklink *RectLinkLink)

func (*StageStruct) UnstageBranchSVG

func (stage *StageStruct) UnstageBranchSVG(svg *SVG)

func (*StageStruct) UnstageBranchText

func (stage *StageStruct) UnstageBranchText(text *Text)

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 Text

type Text struct {
	Name    string
	X, Y    float64
	Content string
	Presentation
	Animates []*Animate
}

func CopyBranchText

func CopyBranchText(mapOrigCopy map[any]any, textFrom *Text) (textTo *Text)

func (*Text) Checkout

func (text *Text) Checkout(stage *StageStruct) *Text

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

func (*Text) Commit

func (text *Text) Commit(stage *StageStruct) *Text

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

func (*Text) CommitVoid

func (text *Text) CommitVoid(stage *StageStruct)

func (*Text) CopyBasicFields

func (from *Text) CopyBasicFields(to *Text)

func (*Text) GetName

func (text *Text) GetName() (res string)

for satisfaction of GongStruct interface

func (*Text) Stage

func (text *Text) Stage(stage *StageStruct) *Text

Stage puts text to the model stage

func (*Text) Unstage

func (text *Text) Unstage(stage *StageStruct) *Text

Unstage removes text off the model stage

func (*Text) UnstageVoid

func (text *Text) UnstageVoid(stage *StageStruct)

UnstageVoid removes text off the model stage

type TextAnchorType

type TextAnchorType string
const (
	TEXT_ANCHOR_START  TextAnchorType = "start"
	TEXT_ANCHOR_CENTER TextAnchorType = "middle"
	TEXT_ANCHOR_END    TextAnchorType = "end"
)

values for https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor

func (TextAnchorType) CodeValues

func (textanchortype TextAnchorType) CodeValues() (res []string)

func (TextAnchorType) Codes

func (textanchortype TextAnchorType) Codes() (res []string)

func (*TextAnchorType) FromCodeString

func (textanchortype *TextAnchorType) FromCodeString(input string) (err error)

func (*TextAnchorType) FromString

func (textanchortype *TextAnchorType) FromString(input string) (err error)

func (*TextAnchorType) ToCodeString

func (textanchortype *TextAnchorType) ToCodeString() (res string)

func (TextAnchorType) ToString

func (textanchortype TextAnchorType) ToString() (res string)

Utility function for TextAnchorType 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 Text_WOP

type Text_WOP struct {
	// insertion point
	Name                        string
	X                           float64
	Y                           float64
	Content                     string
	Color                       string
	FillOpacity                 float64
	Stroke                      string
	StrokeWidth                 float64
	StrokeDashArray             string
	StrokeDashArrayWhenSelected string
	Transform                   string
}

Jump to

Keyboard shortcuts

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