models

package
v0.0.0-...-3fb929e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

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

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

Index

Constants

View Source
const IdentifiersDecls = `
	{{Identifier}} := (&models.{{GeneratedStructName}}{Name: ` + "`" + `{{GeneratedFieldNameValue}}` + "`" + `}).Stage(stage)`
View Source
const NodeOnText = ""

GONGNOTE(NodeOnText) : models.Text - t: This stands for 'text'. This element is used to represent a run of text within a paragraph. The t element will contain the actual string of text as its content. - When parsing these nodes, your code should handle each type of node appropriately based on its name. For example, when you encounter a t node, you might simply extract and store the text content. - In XML, "xml:space="preserve"" instructs the XML processor to preserve whitespace in the content of the element it's applied to. This includes spaces, line breaks, and tabs. - By default, XML processors may ignore or normalize such whitespace. This attribute ensures that the whitespace is kept intact, which can be important for maintaining the correct formatting or interpretation of the data. - For example, in a WordProcessingML document, if "xml:space="preserve"" is applied to a text ("w:t") element, it means the spaces within that text should be preserved when the document is displayed or processed.

View Source
const NoteOnColumn = ""

GONGNOTE(NoteOnColumn) The "w:tr" node represents a table row within a Word document's XML structure. It is found as a child of the "w:tbl" (table) node in the document.xml file. - This node contains child elements that represent the individual cells ("w:tc") in the row, as well as the row properties ("w:trPr"), which include attributes like height, header status, and more. - The "w:tc" node, on the other hand, represents an individual table cell. It is found as a child of the "w:tr" (table row) node. - This node contains the content of the cell, which can include text, paragraphs, or even other tables. It also contains the cell properties ("w:tcPr"), which include attributes like cell width, vertical alignment, borders, shading, and more. - When parsing "w:tr" and "w:tc" nodes, your code should correctly map the structure of the table, row, and cell, and apply the appropriate properties to each element.

View Source
const NoteOnDocument = ""

GONGNOTE(NoteOnDocument) In the structure of a .docx file, the word/document.xml file is one of the most crucial components. It contains the main content of the document, including the text and its organization into paragraphs and other structures, as well as references to other components of the document such as images, styles, formatting instructions, etc.

-

This XML file primarily houses the textual content and its associated XML tags denote various properties of the text such as font size, style, alignment, and more. All these pieces of information are represented using WordProcessingML, a type of XML developed by Microsoft for Word documents. - The document.xml file refers to other files in the .docx structure to help render the final document. For instance, it references styles from the styles.xml file, numbered lists from the numbering.xml file, relationships from the document.xml.rels file, and more. These references help assemble the complete, rendered document that you see when you open a .docx file in a word processor. - There could be multiple document*.xml files in some situations. This is typically seen when a Word document has been split into separate sections, perhaps for editing or collaboration purposes. Each document*.xml file would contain a different section of the overall document.

View Source
const NoteOnParagraph = ""

GONGNOTE(NoteOnParagraph) The "w:p" node represents a models.Paragraph in a Word document's XML structure. - It is one of the primary building blocks of a document's content within the document.xml file. - Each "w:p" element contains a series of "w:r" (run) elements, which represent sections of text within the paragraph that have consistent formatting. These "w:r" elements, in turn, contain "w:t" elements that hold the actual text content. - The "w:p" element may also contain various other child elements that provide additional information about the paragraph. For example, "w:pPr" specifies paragraph properties like alignment, indentation, and spacing. - As you parse a "w:p" node, you would typically create a new paragraph object in your code, then parse the child nodes to fill in the content and properties of that paragraph.

View Source
const NoteOnParagraphProperties = ""

GONGNOTE(NoteOnParagraphProperties) models.ParagraphProperties - The "w:pPr" node represents paragraph properties within a Word document's XML structure, and is found within a "w:p" (paragraph) node in the document.xml file. - It contains information about the formatting and layout of a paragraph. This can include properties like text alignment (left, right, centered, or justified), indentation, spacing before or after the paragraph, line spacing, and more. - The "w:pPr" node may also contain a "w:numPr" element for numbered or bulleted lists, and a "w:sectPr" element for section properties (if this paragraph marks the end of a section). - When parsing a "w:pPr" node, your code should use the information it provides to format the paragraph appropriately in your data structure or output format.

View Source
const NoteOnParagraphStyle = ""

GONGNOTE(NoteOnParagraphStyle) models.ParagraphStyle - The "w:pStyle" element, found within the paragraph properties ("w:pPr") node in a Word document's XML structure, defines the paragraph style for a given paragraph ("w:p"). - The "w:pStyle" element includes an attribute "w:val" that references the ID of the style being applied to the paragraph. This style ID correlates with the styles defined in the styles.xml part of the .docx package. - A style in Word includes a predefined set of formatting instructions. It can control multiple aspects of the paragraph's appearance, including alignment, spacing, font, size, color, and more. - By using styles, a document can maintain a consistent look and feel, and changing the style in one place will automatically update all paragraphs that reference that style. - When parsing a "w:pStyle" node, your code should map the style ID to the corresponding style in the styles.xml file and apply the associated formatting to the paragraph.

View Source
const NoteOnRunProperties = ""

GONGNOTE(NoteOnRunProperties) The "w:rPr" node represents run properties in a Word document's XML structure. It is found within a "w:r" (run) node in the document.xml file. - This node defines the formatting for a specific run of text within a paragraph. It can include properties like font size, font type, color, highlighting, bolding, italics, underlining, and more. - For example, a "w:rPr" node might contain a "w:sz" element for font size, a "w:color" element for text color, or "w:b" for bold formatting. The presence of elements like "w:b" (bold), "w:i" (italic), and "w:u" (underline) indicate that the formatting is applied, as they are toggled by their presence alone. - When parsing a "w:rPr" node, your code should use the information it provides to apply the appropriate formatting to the text in the run ("w:r") that contains this "w:rPr" node.

View Source
const NoteOnRune = ""

GONGNOTE(NoteOnRune) for models.Rune - The "w:r" node, known as a run, represents a continuous run of text within a paragraph ("w:p" node) in a Word document's XML structure. It is found within the document.xml file. - Runs are segments of text within a paragraph that share the same formatting. This can include properties like bolding, italics, underlining, color, size, font, and more. The specific formatting is defined in a "w:rPr" (Run Properties) element within the "w:r" node. - A "w:r" node contains one or more "w:t" nodes, which hold the actual text content of the run. It can also contain other types of nodes like "w:br" for a line break or "w:tab" for a tab character. - When parsing a "w:r" node, your code should handle the formatting information provided in the "w:rPr" node (if present) and apply it to the text found within the "w:t" nodes.

View Source
const NoteOnTable = ""

GONGNOTE(NoteOnTable) The "w:tbl" node represents a table within a Word document's XML structure. It is found in the document.xml file. - This node defines the structure and formatting of a table in the document. It contains child elements that represent the table's properties ("w:tblPr"), grid ("w:tblGrid"), and rows ("w:tr"). - The "w:tblPr" node defines the table's overall properties, such as its width, alignment, borders, and shading. - The "w:tblGrid" node defines the table's grid structure - specifically, the number and width of the columns. - The "w:tr" nodes represent table rows, and each row contains "w:tc" nodes that represent the individual cells within that row. - When parsing a "w:tbl" node, your code should handle the table structure and formatting information it provides to correctly represent the table in your data structure or output format.

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

This section is empty.

Functions

func AfterCreateFromFront

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

AfterCreateFromFront is called after a create from front

func AfterDeleteFromFront

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

AfterDeleteFromFront is called after a delete from front

func AfterReadFromFront

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

AfterReadFromFront is called after a Read from front

func AfterUpdateFromFront

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

AfterUpdateFromFront is called after a update from front

func CompareGongstructByName

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

func CopyBranch

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

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

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

func EvictInOtherSlices

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

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

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

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

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

EvictInOtherSlices removes the fields instances from other fields of other instance

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

func ExtractStyleText

func ExtractStyleText(styleName string, gongdocxStage *StageStruct) (res []string)

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 {
	CreateORMBody(Body *Body)
	CreateORMDocument(Document *Document)
	CreateORMDocx(Docx *Docx)
	CreateORMFile(File *File)
	CreateORMNode(Node *Node)
	CreateORMParagraph(Paragraph *Paragraph)
	CreateORMParagraphProperties(ParagraphProperties *ParagraphProperties)
	CreateORMParagraphStyle(ParagraphStyle *ParagraphStyle)
	CreateORMRune(Rune *Rune)
	CreateORMRuneProperties(RuneProperties *RuneProperties)
	CreateORMTable(Table *Table)
	CreateORMTableColumn(TableColumn *TableColumn)
	CreateORMTableProperties(TableProperties *TableProperties)
	CreateORMTableRow(TableRow *TableRow)
	CreateORMTableStyle(TableStyle *TableStyle)
	CreateORMText(Text *Text)
}

swagger:ignore

type AllModelsStructDeleteInterface

type AllModelsStructDeleteInterface interface {
	DeleteORMBody(Body *Body)
	DeleteORMDocument(Document *Document)
	DeleteORMDocx(Docx *Docx)
	DeleteORMFile(File *File)
	DeleteORMNode(Node *Node)
	DeleteORMParagraph(Paragraph *Paragraph)
	DeleteORMParagraphProperties(ParagraphProperties *ParagraphProperties)
	DeleteORMParagraphStyle(ParagraphStyle *ParagraphStyle)
	DeleteORMRune(Rune *Rune)
	DeleteORMRuneProperties(RuneProperties *RuneProperties)
	DeleteORMTable(Table *Table)
	DeleteORMTableColumn(TableColumn *TableColumn)
	DeleteORMTableProperties(TableProperties *TableProperties)
	DeleteORMTableRow(TableRow *TableRow)
	DeleteORMTableStyle(TableStyle *TableStyle)
	DeleteORMText(Text *Text)
}

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
	CommitBody(body *Body)
	CheckoutBody(body *Body)
	CommitDocument(document *Document)
	CheckoutDocument(document *Document)
	CommitDocx(docx *Docx)
	CheckoutDocx(docx *Docx)
	CommitFile(file *File)
	CheckoutFile(file *File)
	CommitNode(node *Node)
	CheckoutNode(node *Node)
	CommitParagraph(paragraph *Paragraph)
	CheckoutParagraph(paragraph *Paragraph)
	CommitParagraphProperties(paragraphproperties *ParagraphProperties)
	CheckoutParagraphProperties(paragraphproperties *ParagraphProperties)
	CommitParagraphStyle(paragraphstyle *ParagraphStyle)
	CheckoutParagraphStyle(paragraphstyle *ParagraphStyle)
	CommitRune(rune *Rune)
	CheckoutRune(rune *Rune)
	CommitRuneProperties(runeproperties *RuneProperties)
	CheckoutRuneProperties(runeproperties *RuneProperties)
	CommitTable(table *Table)
	CheckoutTable(table *Table)
	CommitTableColumn(tablecolumn *TableColumn)
	CheckoutTableColumn(tablecolumn *TableColumn)
	CommitTableProperties(tableproperties *TableProperties)
	CheckoutTableProperties(tableproperties *TableProperties)
	CommitTableRow(tablerow *TableRow)
	CheckoutTableRow(tablerow *TableRow)
	CommitTableStyle(tablestyle *TableStyle)
	CheckoutTableStyle(tablestyle *TableStyle)
	CommitText(text *Text)
	CheckoutText(text *Text)
	GetLastCommitFromBackNb() uint
	GetLastPushFromFrontNb() uint
}

type Body

type Body struct {
	Name       string
	Paragraphs []*Paragraph
	Tables     []*Table

	// for enabling navigation between paragraphs
	LastParagraph *Paragraph
}

func CopyBranchBody

func CopyBranchBody(mapOrigCopy map[any]any, bodyFrom *Body) (bodyTo *Body)

insertion point for stage branch per struct

func (*Body) Checkout

func (body *Body) Checkout(stage *StageStruct) *Body

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

func (*Body) Commit

func (body *Body) Commit(stage *StageStruct) *Body

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

func (*Body) CommitVoid

func (body *Body) CommitVoid(stage *StageStruct)

func (*Body) CopyBasicFields

func (from *Body) CopyBasicFields(to *Body)

func (*Body) GetName

func (body *Body) GetName() (res string)

for satisfaction of GongStruct interface

func (*Body) Stage

func (body *Body) Stage(stage *StageStruct) *Body

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

func (*Body) Unstage

func (body *Body) Unstage(stage *StageStruct) *Body

Unstage removes body off the model stage

func (*Body) UnstageVoid

func (body *Body) UnstageVoid(stage *StageStruct)

UnstageVoid removes body off the model stage

type Body_WOP

type Body_WOP struct {
	// insertion point
	Name string
}

insertion point

type Document

type Document struct {
	Name string
	File *File
	Root *Node
	Body *Body
}

func CopyBranchDocument

func CopyBranchDocument(mapOrigCopy map[any]any, documentFrom *Document) (documentTo *Document)

func (*Document) Checkout

func (document *Document) Checkout(stage *StageStruct) *Document

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

func (*Document) Commit

func (document *Document) Commit(stage *StageStruct) *Document

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

func (*Document) CommitVoid

func (document *Document) CommitVoid(stage *StageStruct)

func (*Document) CopyBasicFields

func (from *Document) CopyBasicFields(to *Document)

func (*Document) GetName

func (document *Document) GetName() (res string)

for satisfaction of GongStruct interface

func (*Document) Stage

func (document *Document) Stage(stage *StageStruct) *Document

Stage puts document to the model stage

func (*Document) Unstage

func (document *Document) Unstage(stage *StageStruct) *Document

Unstage removes document off the model stage

func (*Document) UnstageVoid

func (document *Document) UnstageVoid(stage *StageStruct)

UnstageVoid removes document off the model stage

type Document_WOP

type Document_WOP struct {
	// insertion point
	Name string
}

type Docx

type Docx struct {
	Name string

	Files []*File

	Document *Document
}

func CopyBranchDocx

func CopyBranchDocx(mapOrigCopy map[any]any, docxFrom *Docx) (docxTo *Docx)

func NewDocx

func NewDocx(gongdocx_stage *StageStruct, path string, embed bool) (docx *Docx)

func (*Docx) Checkout

func (docx *Docx) Checkout(stage *StageStruct) *Docx

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

func (*Docx) Commit

func (docx *Docx) Commit(stage *StageStruct) *Docx

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

func (*Docx) CommitVoid

func (docx *Docx) CommitVoid(stage *StageStruct)

func (*Docx) CopyBasicFields

func (from *Docx) CopyBasicFields(to *Docx)

func (*Docx) GetName

func (docx *Docx) GetName() (res string)

for satisfaction of GongStruct interface

func (*Docx) Stage

func (docx *Docx) Stage(stage *StageStruct) *Docx

Stage puts docx to the model stage

func (*Docx) Unstage

func (docx *Docx) Unstage(stage *StageStruct) *Docx

Unstage removes docx off the model stage

func (*Docx) UnstageVoid

func (docx *Docx) UnstageVoid(stage *StageStruct)

UnstageVoid removes docx off the model stage

type Docx_WOP

type Docx_WOP struct {
	// insertion point
	Name 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 File

type File struct {
	Name string
}

file embedded in a docx

func CopyBranchFile

func CopyBranchFile(mapOrigCopy map[any]any, fileFrom *File) (fileTo *File)

func (*File) Checkout

func (file *File) Checkout(stage *StageStruct) *File

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

func (*File) Commit

func (file *File) Commit(stage *StageStruct) *File

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

func (*File) CommitVoid

func (file *File) CommitVoid(stage *StageStruct)

func (*File) CopyBasicFields

func (from *File) CopyBasicFields(to *File)

func (*File) GetName

func (file *File) GetName() (res string)

for satisfaction of GongStruct interface

func (*File) Stage

func (file *File) Stage(stage *StageStruct) *File

Stage puts file to the model stage

func (*File) Unstage

func (file *File) Unstage(stage *StageStruct) *File

Unstage removes file off the model stage

func (*File) UnstageVoid

func (file *File) UnstageVoid(stage *StageStruct)

UnstageVoid removes file off the model stage

type File_WOP

type File_WOP struct {
	// insertion point
	Name string
}

type GONG__ExpressionType

type GONG__ExpressionType string

swagger:ignore

const (
	GONG__STRUCT_INSTANCE      GONG__ExpressionType = "STRUCT_INSTANCE"
	GONG__FIELD_OR_CONST_VALUE GONG__ExpressionType = "FIELD_OR_CONST_VALUE"
	GONG__FIELD_VALUE          GONG__ExpressionType = "FIELD_VALUE"
	GONG__ENUM_CAST_INT        GONG__ExpressionType = "ENUM_CAST_INT"
	GONG__ENUM_CAST_STRING     GONG__ExpressionType = "ENUM_CAST_STRING"
	GONG__IDENTIFIER_CONST     GONG__ExpressionType = "IDENTIFIER_CONST"
)

type GONG__Identifier

type GONG__Identifier struct {
	Ident string
	Type  GONG__ExpressionType
}

type 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
	Body | Document | Docx | File | Node | Paragraph | ParagraphProperties | ParagraphStyle | Rune | RuneProperties | Table | TableColumn | TableProperties | TableRow | TableStyle | 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 GongstructEnumStringField

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

type GongstructMapString

type GongstructMapString interface {
	map[any]any |

		map[string]*Body |
		map[string]*Document |
		map[string]*Docx |
		map[string]*File |
		map[string]*Node |
		map[string]*Paragraph |
		map[string]*ParagraphProperties |
		map[string]*ParagraphStyle |
		map[string]*Rune |
		map[string]*RuneProperties |
		map[string]*Table |
		map[string]*TableColumn |
		map[string]*TableProperties |
		map[string]*TableRow |
		map[string]*TableStyle |
		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[*Body]any |
		map[*Document]any |
		map[*Docx]any |
		map[*File]any |
		map[*Node]any |
		map[*Paragraph]any |
		map[*ParagraphProperties]any |
		map[*ParagraphStyle]any |
		map[*Rune]any |
		map[*RuneProperties]any |
		map[*Table]any |
		map[*TableColumn]any |
		map[*TableProperties]any |
		map[*TableRow]any |
		map[*TableStyle]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 Node

type Node struct {
	Name string

	Nodes []*Node
}

func CopyBranchNode

func CopyBranchNode(mapOrigCopy map[any]any, nodeFrom *Node) (nodeTo *Node)

func (*Node) Checkout

func (node *Node) Checkout(stage *StageStruct) *Node

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

func (*Node) Commit

func (node *Node) Commit(stage *StageStruct) *Node

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

func (*Node) CommitVoid

func (node *Node) CommitVoid(stage *StageStruct)

func (*Node) CopyBasicFields

func (from *Node) CopyBasicFields(to *Node)

func (*Node) GetName

func (node *Node) GetName() (res string)

for satisfaction of GongStruct interface

func (*Node) Stage

func (node *Node) Stage(stage *StageStruct) *Node

Stage puts node to the model stage

func (*Node) Unstage

func (node *Node) Unstage(stage *StageStruct) *Node

Unstage removes node off the model stage

func (*Node) UnstageVoid

func (node *Node) UnstageVoid(stage *StageStruct)

UnstageVoid removes node off the model stage

type Node_

type Node_ struct {
	XMLName xml.Name
	Attrs   []xml.Attr `xml:"-"`
	Content []byte     `xml:",innerxml"`
	Nodes   []Node_    `xml:",any"`
}

Node_ is

func (*Node_) UnmarshalXML

func (n *Node_) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML is

type Node_WOP

type Node_WOP struct {
	// insertion point
	Name string
}

type Numbering

type Numbering struct {
	XMLName     xml.Name `xml:"numbering"`
	Text        string   `xml:",chardata"`
	Wpc         string   `xml:"wpc,attr"`
	Cx          string   `xml:"cx,attr"`
	Cx1         string   `xml:"cx1,attr"`
	Mc          string   `xml:"mc,attr"`
	O           string   `xml:"o,attr"`
	R           string   `xml:"r,attr"`
	M           string   `xml:"m,attr"`
	V           string   `xml:"v,attr"`
	Wp14        string   `xml:"wp14,attr"`
	Wp          string   `xml:"wp,attr"`
	W10         string   `xml:"w10,attr"`
	W           string   `xml:"w,attr"`
	W14         string   `xml:"w14,attr"`
	W15         string   `xml:"w15,attr"`
	W16se       string   `xml:"w16se,attr"`
	Wpg         string   `xml:"wpg,attr"`
	Wpi         string   `xml:"wpi,attr"`
	Wne         string   `xml:"wne,attr"`
	Wps         string   `xml:"wps,attr"`
	Ignorable   string   `xml:"Ignorable,attr"`
	AbstractNum []struct {
		Text                       string         `xml:",chardata"`
		AbstractNumID              string         `xml:"abstractNumId,attr"`
		RestartNumberingAfterBreak string         `xml:"restartNumberingAfterBreak,attr"`
		Nsid                       TextVal        `xml:"nsid"`
		MultiLevelType             TextVal        `xml:"multiLevelType"`
		Tmpl                       TextVal        `xml:"tmpl"`
		Lvl                        []NumberingLvl `xml:"lvl"`
	} `xml:"abstractNum"`
	Num []struct {
		Text          string  `xml:",chardata"`
		NumID         string  `xml:"numId,attr"`
		AbstractNumID TextVal `xml:"abstractNumId"`
	} `xml:"num"`
}

Numbering is

type NumberingLvl

type NumberingLvl struct {
	Text      string  `xml:",chardata"`
	Ilvl      string  `xml:"ilvl,attr"`
	Tplc      string  `xml:"tplc,attr"`
	Tentative string  `xml:"tentative,attr"`
	Start     TextVal `xml:"start"`
	NumFmt    TextVal `xml:"numFmt"`
	LvlText   TextVal `xml:"lvlText"`
	LvlJc     TextVal `xml:"lvlJc"`
	PPr       struct {
		Text string `xml:",chardata"`
		Ind  struct {
			Text    string `xml:",chardata"`
			Left    string `xml:"left,attr"`
			Hanging string `xml:"hanging,attr"`
		} `xml:"ind"`
	} `xml:"pPr"`
	RPr struct {
		Text string `xml:",chardata"`
		U    struct {
			Text string `xml:",chardata"`
			Val  string `xml:"val,attr"`
		} `xml:"u"`
		RFonts struct {
			Text string `xml:",chardata"`
			Hint string `xml:"hint,attr"`
		} `xml:"rFonts"`
	} `xml:"rPr"`
}

NumberingLvl is

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 Paragraph

type Paragraph struct {
	Name                string
	Content             string
	Node                *Node
	ParagraphProperties *ParagraphProperties
	Runes               []*Rune

	Text string // collated text of all runes

	// navigation
	Next                 *Paragraph
	Previous             *Paragraph
	EnclosingBody        *Body
	EnclosingTableColumn *TableColumn
}

func CopyBranchParagraph

func CopyBranchParagraph(mapOrigCopy map[any]any, paragraphFrom *Paragraph) (paragraphTo *Paragraph)

func (*Paragraph) Checkout

func (paragraph *Paragraph) Checkout(stage *StageStruct) *Paragraph

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

func (*Paragraph) Commit

func (paragraph *Paragraph) Commit(stage *StageStruct) *Paragraph

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

func (*Paragraph) CommitVoid

func (paragraph *Paragraph) CommitVoid(stage *StageStruct)

func (*Paragraph) CopyBasicFields

func (from *Paragraph) CopyBasicFields(to *Paragraph)

func (*Paragraph) GetName

func (paragraph *Paragraph) GetName() (res string)

for satisfaction of GongStruct interface

func (*Paragraph) Stage

func (paragraph *Paragraph) Stage(stage *StageStruct) *Paragraph

Stage puts paragraph to the model stage

func (*Paragraph) Unstage

func (paragraph *Paragraph) Unstage(stage *StageStruct) *Paragraph

Unstage removes paragraph off the model stage

func (*Paragraph) UnstageVoid

func (paragraph *Paragraph) UnstageVoid(stage *StageStruct)

UnstageVoid removes paragraph off the model stage

type ParagraphProperties

type ParagraphProperties struct {
	Name    string
	Content string

	ParagraphStyle *ParagraphStyle

	Node *Node
}

func CopyBranchParagraphProperties

func CopyBranchParagraphProperties(mapOrigCopy map[any]any, paragraphpropertiesFrom *ParagraphProperties) (paragraphpropertiesTo *ParagraphProperties)

func (*ParagraphProperties) Checkout

func (paragraphproperties *ParagraphProperties) Checkout(stage *StageStruct) *ParagraphProperties

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

func (*ParagraphProperties) Commit

func (paragraphproperties *ParagraphProperties) Commit(stage *StageStruct) *ParagraphProperties

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

func (*ParagraphProperties) CommitVoid

func (paragraphproperties *ParagraphProperties) CommitVoid(stage *StageStruct)

func (*ParagraphProperties) CopyBasicFields

func (from *ParagraphProperties) CopyBasicFields(to *ParagraphProperties)

func (*ParagraphProperties) GetName

func (paragraphproperties *ParagraphProperties) GetName() (res string)

for satisfaction of GongStruct interface

func (*ParagraphProperties) Stage

func (paragraphproperties *ParagraphProperties) Stage(stage *StageStruct) *ParagraphProperties

Stage puts paragraphproperties to the model stage

func (*ParagraphProperties) Unstage

func (paragraphproperties *ParagraphProperties) Unstage(stage *StageStruct) *ParagraphProperties

Unstage removes paragraphproperties off the model stage

func (*ParagraphProperties) UnstageVoid

func (paragraphproperties *ParagraphProperties) UnstageVoid(stage *StageStruct)

UnstageVoid removes paragraphproperties off the model stage

type ParagraphProperties_WOP

type ParagraphProperties_WOP struct {
	// insertion point
	Name    string
	Content string
}

type ParagraphStyle

type ParagraphStyle struct {
	Name    string
	Node    *Node
	Content string

	// 	The "w:val" attribute in WordProcessingML stores a value for a specific
	// property. For "w:pStyle", "w:val" holds the ID of the paragraph style applied
	// to the current paragraph.
	//
	// "w" stands for the Word namespace, a standard in WordProcessingML to avoid
	// naming conflicts with other XML languages. "val" is likely short for "value,"
	// indicating this attribute holds the value of the "w:pStyle" element.
	//
	// Thus, "w:val" holds a value in the Word namespace. Its specific meaning can
	// vary depending on context, but it often holds an ID linking to other data or
	// formatting in the .docx package.
	ValAttr string
}

func CopyBranchParagraphStyle

func CopyBranchParagraphStyle(mapOrigCopy map[any]any, paragraphstyleFrom *ParagraphStyle) (paragraphstyleTo *ParagraphStyle)

func (*ParagraphStyle) Checkout

func (paragraphstyle *ParagraphStyle) Checkout(stage *StageStruct) *ParagraphStyle

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

func (*ParagraphStyle) Commit

func (paragraphstyle *ParagraphStyle) Commit(stage *StageStruct) *ParagraphStyle

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

func (*ParagraphStyle) CommitVoid

func (paragraphstyle *ParagraphStyle) CommitVoid(stage *StageStruct)

func (*ParagraphStyle) CopyBasicFields

func (from *ParagraphStyle) CopyBasicFields(to *ParagraphStyle)

func (*ParagraphStyle) GetName

func (paragraphstyle *ParagraphStyle) GetName() (res string)

for satisfaction of GongStruct interface

func (*ParagraphStyle) Stage

func (paragraphstyle *ParagraphStyle) Stage(stage *StageStruct) *ParagraphStyle

Stage puts paragraphstyle to the model stage

func (*ParagraphStyle) Unstage

func (paragraphstyle *ParagraphStyle) Unstage(stage *StageStruct) *ParagraphStyle

Unstage removes paragraphstyle off the model stage

func (*ParagraphStyle) UnstageVoid

func (paragraphstyle *ParagraphStyle) UnstageVoid(stage *StageStruct)

UnstageVoid removes paragraphstyle off the model stage

type ParagraphStyle_WOP

type ParagraphStyle_WOP struct {
	// insertion point
	Name    string
	Content string
	ValAttr string
}

type Paragraph_WOP

type Paragraph_WOP struct {
	// insertion point
	Name    string
	Content string
	Text    string
}

type PointerToGongstruct

type PointerToGongstruct interface {
	*Body | *Document | *Docx | *File | *Node | *Paragraph | *ParagraphProperties | *ParagraphStyle | *Rune | *RuneProperties | *Table | *TableColumn | *TableProperties | *TableRow | *TableStyle | *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 {
	FromCodeString(input string) (err error)
}

type Relationship

type Relationship struct {
	Text       string `xml:",chardata"`
	ID         string `xml:"Id,attr"`
	Type       string `xml:"Type,attr"`
	Target     string `xml:"Target,attr"`
	TargetMode string `xml:"TargetMode,attr"`
}

Relationship is

type Relationships

type Relationships struct {
	XMLName      xml.Name       `xml:"Relationships"`
	Text         string         `xml:",chardata"`
	Xmlns        string         `xml:"xmlns,attr"`
	Relationship []Relationship `xml:"Relationship"`
}

Relationships is

type ReverseField

type ReverseField struct {
	GongstructName string
	Fieldname      string
}

func GetReverseFields

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

type Rune

type Rune struct {
	Name    string
	Content string

	Node           *Node
	Text           *Text
	RuneProperties *RuneProperties

	// navigation
	EnclosingParagraph *Paragraph
}

func CopyBranchRune

func CopyBranchRune(mapOrigCopy map[any]any, runeFrom *Rune) (runeTo *Rune)

func (*Rune) Checkout

func (rune *Rune) Checkout(stage *StageStruct) *Rune

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

func (*Rune) Commit

func (rune *Rune) Commit(stage *StageStruct) *Rune

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

func (*Rune) CommitVoid

func (rune *Rune) CommitVoid(stage *StageStruct)

func (*Rune) CopyBasicFields

func (from *Rune) CopyBasicFields(to *Rune)

func (*Rune) GetName

func (rune *Rune) GetName() (res string)

for satisfaction of GongStruct interface

func (*Rune) Stage

func (rune *Rune) Stage(stage *StageStruct) *Rune

Stage puts rune to the model stage

func (*Rune) Unstage

func (rune *Rune) Unstage(stage *StageStruct) *Rune

Unstage removes rune off the model stage

func (*Rune) UnstageVoid

func (rune *Rune) UnstageVoid(stage *StageStruct)

UnstageVoid removes rune off the model stage

type RuneProperties

type RuneProperties struct {
	Name     string
	Node     *Node
	IsBold   bool
	IsStrike bool
	IsItalic bool

	Content string
}

func CopyBranchRuneProperties

func CopyBranchRuneProperties(mapOrigCopy map[any]any, runepropertiesFrom *RuneProperties) (runepropertiesTo *RuneProperties)

func (*RuneProperties) Checkout

func (runeproperties *RuneProperties) Checkout(stage *StageStruct) *RuneProperties

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

func (*RuneProperties) Commit

func (runeproperties *RuneProperties) Commit(stage *StageStruct) *RuneProperties

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

func (*RuneProperties) CommitVoid

func (runeproperties *RuneProperties) CommitVoid(stage *StageStruct)

func (*RuneProperties) CopyBasicFields

func (from *RuneProperties) CopyBasicFields(to *RuneProperties)

func (*RuneProperties) GetName

func (runeproperties *RuneProperties) GetName() (res string)

for satisfaction of GongStruct interface

func (*RuneProperties) Stage

func (runeproperties *RuneProperties) Stage(stage *StageStruct) *RuneProperties

Stage puts runeproperties to the model stage

func (*RuneProperties) Unstage

func (runeproperties *RuneProperties) Unstage(stage *StageStruct) *RuneProperties

Unstage removes runeproperties off the model stage

func (*RuneProperties) UnstageVoid

func (runeproperties *RuneProperties) UnstageVoid(stage *StageStruct)

UnstageVoid removes runeproperties off the model stage

type RuneProperties_WOP

type RuneProperties_WOP struct {
	// insertion point
	Name     string
	IsBold   bool
	IsStrike bool
	IsItalic bool
	Content  string
}

type Rune_WOP

type Rune_WOP struct {
	// insertion point
	Name    string
	Content string
}

type StageStruct

type StageStruct struct {

	// insertion point for definition of arrays registering instances
	Bodys           map[*Body]any
	Bodys_mapString map[string]*Body

	// insertion point for slice of pointers maps
	Body_Paragraphs_reverseMap map[*Paragraph]*Body
	Body_Tables_reverseMap     map[*Table]*Body

	OnAfterBodyCreateCallback OnAfterCreateInterface[Body]
	OnAfterBodyUpdateCallback OnAfterUpdateInterface[Body]
	OnAfterBodyDeleteCallback OnAfterDeleteInterface[Body]
	OnAfterBodyReadCallback   OnAfterReadInterface[Body]

	Documents           map[*Document]any
	Documents_mapString map[string]*Document

	OnAfterDocumentCreateCallback OnAfterCreateInterface[Document]
	OnAfterDocumentUpdateCallback OnAfterUpdateInterface[Document]
	OnAfterDocumentDeleteCallback OnAfterDeleteInterface[Document]
	OnAfterDocumentReadCallback   OnAfterReadInterface[Document]

	Docxs           map[*Docx]any
	Docxs_mapString map[string]*Docx

	// insertion point for slice of pointers maps
	Docx_Files_reverseMap map[*File]*Docx

	OnAfterDocxCreateCallback OnAfterCreateInterface[Docx]
	OnAfterDocxUpdateCallback OnAfterUpdateInterface[Docx]
	OnAfterDocxDeleteCallback OnAfterDeleteInterface[Docx]
	OnAfterDocxReadCallback   OnAfterReadInterface[Docx]

	Files           map[*File]any
	Files_mapString map[string]*File

	OnAfterFileCreateCallback OnAfterCreateInterface[File]
	OnAfterFileUpdateCallback OnAfterUpdateInterface[File]
	OnAfterFileDeleteCallback OnAfterDeleteInterface[File]
	OnAfterFileReadCallback   OnAfterReadInterface[File]

	Nodes           map[*Node]any
	Nodes_mapString map[string]*Node

	// insertion point for slice of pointers maps
	Node_Nodes_reverseMap map[*Node]*Node

	OnAfterNodeCreateCallback OnAfterCreateInterface[Node]
	OnAfterNodeUpdateCallback OnAfterUpdateInterface[Node]
	OnAfterNodeDeleteCallback OnAfterDeleteInterface[Node]
	OnAfterNodeReadCallback   OnAfterReadInterface[Node]

	Paragraphs           map[*Paragraph]any
	Paragraphs_mapString map[string]*Paragraph

	// insertion point for slice of pointers maps
	Paragraph_Runes_reverseMap map[*Rune]*Paragraph

	OnAfterParagraphCreateCallback OnAfterCreateInterface[Paragraph]
	OnAfterParagraphUpdateCallback OnAfterUpdateInterface[Paragraph]
	OnAfterParagraphDeleteCallback OnAfterDeleteInterface[Paragraph]
	OnAfterParagraphReadCallback   OnAfterReadInterface[Paragraph]

	ParagraphPropertiess           map[*ParagraphProperties]any
	ParagraphPropertiess_mapString map[string]*ParagraphProperties

	OnAfterParagraphPropertiesCreateCallback OnAfterCreateInterface[ParagraphProperties]
	OnAfterParagraphPropertiesUpdateCallback OnAfterUpdateInterface[ParagraphProperties]
	OnAfterParagraphPropertiesDeleteCallback OnAfterDeleteInterface[ParagraphProperties]
	OnAfterParagraphPropertiesReadCallback   OnAfterReadInterface[ParagraphProperties]

	ParagraphStyles           map[*ParagraphStyle]any
	ParagraphStyles_mapString map[string]*ParagraphStyle

	OnAfterParagraphStyleCreateCallback OnAfterCreateInterface[ParagraphStyle]
	OnAfterParagraphStyleUpdateCallback OnAfterUpdateInterface[ParagraphStyle]
	OnAfterParagraphStyleDeleteCallback OnAfterDeleteInterface[ParagraphStyle]
	OnAfterParagraphStyleReadCallback   OnAfterReadInterface[ParagraphStyle]

	Runes           map[*Rune]any
	Runes_mapString map[string]*Rune

	OnAfterRuneCreateCallback OnAfterCreateInterface[Rune]
	OnAfterRuneUpdateCallback OnAfterUpdateInterface[Rune]
	OnAfterRuneDeleteCallback OnAfterDeleteInterface[Rune]
	OnAfterRuneReadCallback   OnAfterReadInterface[Rune]

	RunePropertiess           map[*RuneProperties]any
	RunePropertiess_mapString map[string]*RuneProperties

	OnAfterRunePropertiesCreateCallback OnAfterCreateInterface[RuneProperties]
	OnAfterRunePropertiesUpdateCallback OnAfterUpdateInterface[RuneProperties]
	OnAfterRunePropertiesDeleteCallback OnAfterDeleteInterface[RuneProperties]
	OnAfterRunePropertiesReadCallback   OnAfterReadInterface[RuneProperties]

	Tables           map[*Table]any
	Tables_mapString map[string]*Table

	// insertion point for slice of pointers maps
	Table_TableRows_reverseMap map[*TableRow]*Table

	OnAfterTableCreateCallback OnAfterCreateInterface[Table]
	OnAfterTableUpdateCallback OnAfterUpdateInterface[Table]
	OnAfterTableDeleteCallback OnAfterDeleteInterface[Table]
	OnAfterTableReadCallback   OnAfterReadInterface[Table]

	TableColumns           map[*TableColumn]any
	TableColumns_mapString map[string]*TableColumn

	// insertion point for slice of pointers maps
	TableColumn_Paragraphs_reverseMap map[*Paragraph]*TableColumn

	OnAfterTableColumnCreateCallback OnAfterCreateInterface[TableColumn]
	OnAfterTableColumnUpdateCallback OnAfterUpdateInterface[TableColumn]
	OnAfterTableColumnDeleteCallback OnAfterDeleteInterface[TableColumn]
	OnAfterTableColumnReadCallback   OnAfterReadInterface[TableColumn]

	TablePropertiess           map[*TableProperties]any
	TablePropertiess_mapString map[string]*TableProperties

	OnAfterTablePropertiesCreateCallback OnAfterCreateInterface[TableProperties]
	OnAfterTablePropertiesUpdateCallback OnAfterUpdateInterface[TableProperties]
	OnAfterTablePropertiesDeleteCallback OnAfterDeleteInterface[TableProperties]
	OnAfterTablePropertiesReadCallback   OnAfterReadInterface[TableProperties]

	TableRows           map[*TableRow]any
	TableRows_mapString map[string]*TableRow

	// insertion point for slice of pointers maps
	TableRow_TableColumns_reverseMap map[*TableColumn]*TableRow

	OnAfterTableRowCreateCallback OnAfterCreateInterface[TableRow]
	OnAfterTableRowUpdateCallback OnAfterUpdateInterface[TableRow]
	OnAfterTableRowDeleteCallback OnAfterDeleteInterface[TableRow]
	OnAfterTableRowReadCallback   OnAfterReadInterface[TableRow]

	TableStyles           map[*TableStyle]any
	TableStyles_mapString map[string]*TableStyle

	OnAfterTableStyleCreateCallback OnAfterCreateInterface[TableStyle]
	OnAfterTableStyleUpdateCallback OnAfterUpdateInterface[TableStyle]
	OnAfterTableStyleDeleteCallback OnAfterDeleteInterface[TableStyle]
	OnAfterTableStyleReadCallback   OnAfterReadInterface[TableStyle]

	Texts           map[*Text]any
	Texts_mapString map[string]*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) IsStagedBody

func (stage *StageStruct) IsStagedBody(body *Body) (ok bool)

insertion point for stage per struct

func (*StageStruct) IsStagedDocument

func (stage *StageStruct) IsStagedDocument(document *Document) (ok bool)

func (*StageStruct) IsStagedDocx

func (stage *StageStruct) IsStagedDocx(docx *Docx) (ok bool)

func (*StageStruct) IsStagedFile

func (stage *StageStruct) IsStagedFile(file *File) (ok bool)

func (*StageStruct) IsStagedNode

func (stage *StageStruct) IsStagedNode(node *Node) (ok bool)

func (*StageStruct) IsStagedParagraph

func (stage *StageStruct) IsStagedParagraph(paragraph *Paragraph) (ok bool)

func (*StageStruct) IsStagedParagraphProperties

func (stage *StageStruct) IsStagedParagraphProperties(paragraphproperties *ParagraphProperties) (ok bool)

func (*StageStruct) IsStagedParagraphStyle

func (stage *StageStruct) IsStagedParagraphStyle(paragraphstyle *ParagraphStyle) (ok bool)

func (*StageStruct) IsStagedRune

func (stage *StageStruct) IsStagedRune(rune *Rune) (ok bool)

func (*StageStruct) IsStagedRuneProperties

func (stage *StageStruct) IsStagedRuneProperties(runeproperties *RuneProperties) (ok bool)

func (*StageStruct) IsStagedTable

func (stage *StageStruct) IsStagedTable(table *Table) (ok bool)

func (*StageStruct) IsStagedTableColumn

func (stage *StageStruct) IsStagedTableColumn(tablecolumn *TableColumn) (ok bool)

func (*StageStruct) IsStagedTableProperties

func (stage *StageStruct) IsStagedTableProperties(tableproperties *TableProperties) (ok bool)

func (*StageStruct) IsStagedTableRow

func (stage *StageStruct) IsStagedTableRow(tablerow *TableRow) (ok bool)

func (*StageStruct) IsStagedTableStyle

func (stage *StageStruct) IsStagedTableStyle(tablestyle *TableStyle) (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) StageBranchBody

func (stage *StageStruct) StageBranchBody(body *Body)

insertion point for stage branch per struct

func (*StageStruct) StageBranchDocument

func (stage *StageStruct) StageBranchDocument(document *Document)

func (*StageStruct) StageBranchDocx

func (stage *StageStruct) StageBranchDocx(docx *Docx)

func (*StageStruct) StageBranchFile

func (stage *StageStruct) StageBranchFile(file *File)

func (*StageStruct) StageBranchNode

func (stage *StageStruct) StageBranchNode(node *Node)

func (*StageStruct) StageBranchParagraph

func (stage *StageStruct) StageBranchParagraph(paragraph *Paragraph)

func (*StageStruct) StageBranchParagraphProperties

func (stage *StageStruct) StageBranchParagraphProperties(paragraphproperties *ParagraphProperties)

func (*StageStruct) StageBranchParagraphStyle

func (stage *StageStruct) StageBranchParagraphStyle(paragraphstyle *ParagraphStyle)

func (*StageStruct) StageBranchRune

func (stage *StageStruct) StageBranchRune(rune *Rune)

func (*StageStruct) StageBranchRuneProperties

func (stage *StageStruct) StageBranchRuneProperties(runeproperties *RuneProperties)

func (*StageStruct) StageBranchTable

func (stage *StageStruct) StageBranchTable(table *Table)

func (*StageStruct) StageBranchTableColumn

func (stage *StageStruct) StageBranchTableColumn(tablecolumn *TableColumn)

func (*StageStruct) StageBranchTableProperties

func (stage *StageStruct) StageBranchTableProperties(tableproperties *TableProperties)

func (*StageStruct) StageBranchTableRow

func (stage *StageStruct) StageBranchTableRow(tablerow *TableRow)

func (*StageStruct) StageBranchTableStyle

func (stage *StageStruct) StageBranchTableStyle(tablestyle *TableStyle)

func (*StageStruct) StageBranchText

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

func (*StageStruct) Unstage

func (stage *StageStruct) Unstage()

func (*StageStruct) UnstageBranchBody

func (stage *StageStruct) UnstageBranchBody(body *Body)

insertion point for unstage branch per struct

func (*StageStruct) UnstageBranchDocument

func (stage *StageStruct) UnstageBranchDocument(document *Document)

func (*StageStruct) UnstageBranchDocx

func (stage *StageStruct) UnstageBranchDocx(docx *Docx)

func (*StageStruct) UnstageBranchFile

func (stage *StageStruct) UnstageBranchFile(file *File)

func (*StageStruct) UnstageBranchNode

func (stage *StageStruct) UnstageBranchNode(node *Node)

func (*StageStruct) UnstageBranchParagraph

func (stage *StageStruct) UnstageBranchParagraph(paragraph *Paragraph)

func (*StageStruct) UnstageBranchParagraphProperties

func (stage *StageStruct) UnstageBranchParagraphProperties(paragraphproperties *ParagraphProperties)

func (*StageStruct) UnstageBranchParagraphStyle

func (stage *StageStruct) UnstageBranchParagraphStyle(paragraphstyle *ParagraphStyle)

func (*StageStruct) UnstageBranchRune

func (stage *StageStruct) UnstageBranchRune(rune *Rune)

func (*StageStruct) UnstageBranchRuneProperties

func (stage *StageStruct) UnstageBranchRuneProperties(runeproperties *RuneProperties)

func (*StageStruct) UnstageBranchTable

func (stage *StageStruct) UnstageBranchTable(table *Table)

func (*StageStruct) UnstageBranchTableColumn

func (stage *StageStruct) UnstageBranchTableColumn(tablecolumn *TableColumn)

func (*StageStruct) UnstageBranchTableProperties

func (stage *StageStruct) UnstageBranchTableProperties(tableproperties *TableProperties)

func (*StageStruct) UnstageBranchTableRow

func (stage *StageStruct) UnstageBranchTableRow(tablerow *TableRow)

func (*StageStruct) UnstageBranchTableStyle

func (stage *StageStruct) UnstageBranchTableStyle(tablestyle *TableStyle)

func (*StageStruct) UnstageBranchText

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

type Table

type Table struct {
	Name            string
	Node            *Node
	Content         string
	TableProperties *TableProperties
	TableRows       []*TableRow
}

func CopyBranchTable

func CopyBranchTable(mapOrigCopy map[any]any, tableFrom *Table) (tableTo *Table)

func (*Table) Checkout

func (table *Table) Checkout(stage *StageStruct) *Table

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

func (*Table) Commit

func (table *Table) Commit(stage *StageStruct) *Table

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

func (*Table) CommitVoid

func (table *Table) CommitVoid(stage *StageStruct)

func (*Table) CopyBasicFields

func (from *Table) CopyBasicFields(to *Table)

func (*Table) GetName

func (table *Table) GetName() (res string)

for satisfaction of GongStruct interface

func (*Table) Stage

func (table *Table) Stage(stage *StageStruct) *Table

Stage puts table to the model stage

func (*Table) Unstage

func (table *Table) Unstage(stage *StageStruct) *Table

Unstage removes table off the model stage

func (*Table) UnstageVoid

func (table *Table) UnstageVoid(stage *StageStruct)

UnstageVoid removes table off the model stage

type TableColumn

type TableColumn struct {
	Name       string
	Content    string
	Node       *Node
	Paragraphs []*Paragraph
}

func CopyBranchTableColumn

func CopyBranchTableColumn(mapOrigCopy map[any]any, tablecolumnFrom *TableColumn) (tablecolumnTo *TableColumn)

func (*TableColumn) Checkout

func (tablecolumn *TableColumn) Checkout(stage *StageStruct) *TableColumn

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

func (*TableColumn) Commit

func (tablecolumn *TableColumn) Commit(stage *StageStruct) *TableColumn

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

func (*TableColumn) CommitVoid

func (tablecolumn *TableColumn) CommitVoid(stage *StageStruct)

func (*TableColumn) CopyBasicFields

func (from *TableColumn) CopyBasicFields(to *TableColumn)

func (*TableColumn) GetName

func (tablecolumn *TableColumn) GetName() (res string)

for satisfaction of GongStruct interface

func (*TableColumn) Stage

func (tablecolumn *TableColumn) Stage(stage *StageStruct) *TableColumn

Stage puts tablecolumn to the model stage

func (*TableColumn) Unstage

func (tablecolumn *TableColumn) Unstage(stage *StageStruct) *TableColumn

Unstage removes tablecolumn off the model stage

func (*TableColumn) UnstageVoid

func (tablecolumn *TableColumn) UnstageVoid(stage *StageStruct)

UnstageVoid removes tablecolumn off the model stage

type TableColumn_WOP

type TableColumn_WOP struct {
	// insertion point
	Name    string
	Content string
}

type TableProperties

type TableProperties struct {
	Name       string
	Node       *Node
	Content    string
	TableStyle *TableStyle
}

func CopyBranchTableProperties

func CopyBranchTableProperties(mapOrigCopy map[any]any, tablepropertiesFrom *TableProperties) (tablepropertiesTo *TableProperties)

func (*TableProperties) Checkout

func (tableproperties *TableProperties) Checkout(stage *StageStruct) *TableProperties

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

func (*TableProperties) Commit

func (tableproperties *TableProperties) Commit(stage *StageStruct) *TableProperties

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

func (*TableProperties) CommitVoid

func (tableproperties *TableProperties) CommitVoid(stage *StageStruct)

func (*TableProperties) CopyBasicFields

func (from *TableProperties) CopyBasicFields(to *TableProperties)

func (*TableProperties) GetName

func (tableproperties *TableProperties) GetName() (res string)

for satisfaction of GongStruct interface

func (*TableProperties) Stage

func (tableproperties *TableProperties) Stage(stage *StageStruct) *TableProperties

Stage puts tableproperties to the model stage

func (*TableProperties) Unstage

func (tableproperties *TableProperties) Unstage(stage *StageStruct) *TableProperties

Unstage removes tableproperties off the model stage

func (*TableProperties) UnstageVoid

func (tableproperties *TableProperties) UnstageVoid(stage *StageStruct)

UnstageVoid removes tableproperties off the model stage

type TableProperties_WOP

type TableProperties_WOP struct {
	// insertion point
	Name    string
	Content string
}

type TableRow

type TableRow struct {
	Name         string
	Content      string
	Node         *Node
	TableColumns []*TableColumn
}

func CopyBranchTableRow

func CopyBranchTableRow(mapOrigCopy map[any]any, tablerowFrom *TableRow) (tablerowTo *TableRow)

func (*TableRow) Checkout

func (tablerow *TableRow) Checkout(stage *StageStruct) *TableRow

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

func (*TableRow) Commit

func (tablerow *TableRow) Commit(stage *StageStruct) *TableRow

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

func (*TableRow) CommitVoid

func (tablerow *TableRow) CommitVoid(stage *StageStruct)

func (*TableRow) CopyBasicFields

func (from *TableRow) CopyBasicFields(to *TableRow)

func (*TableRow) GetName

func (tablerow *TableRow) GetName() (res string)

for satisfaction of GongStruct interface

func (*TableRow) Stage

func (tablerow *TableRow) Stage(stage *StageStruct) *TableRow

Stage puts tablerow to the model stage

func (*TableRow) Unstage

func (tablerow *TableRow) Unstage(stage *StageStruct) *TableRow

Unstage removes tablerow off the model stage

func (*TableRow) UnstageVoid

func (tablerow *TableRow) UnstageVoid(stage *StageStruct)

UnstageVoid removes tablerow off the model stage

type TableRow_WOP

type TableRow_WOP struct {
	// insertion point
	Name    string
	Content string
}

type TableStyle

type TableStyle struct {
	Name    string
	Node    *Node
	Content string
	Val     string
}

func CopyBranchTableStyle

func CopyBranchTableStyle(mapOrigCopy map[any]any, tablestyleFrom *TableStyle) (tablestyleTo *TableStyle)

func (*TableStyle) Checkout

func (tablestyle *TableStyle) Checkout(stage *StageStruct) *TableStyle

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

func (*TableStyle) Commit

func (tablestyle *TableStyle) Commit(stage *StageStruct) *TableStyle

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

func (*TableStyle) CommitVoid

func (tablestyle *TableStyle) CommitVoid(stage *StageStruct)

func (*TableStyle) CopyBasicFields

func (from *TableStyle) CopyBasicFields(to *TableStyle)

func (*TableStyle) GetName

func (tablestyle *TableStyle) GetName() (res string)

for satisfaction of GongStruct interface

func (*TableStyle) Stage

func (tablestyle *TableStyle) Stage(stage *StageStruct) *TableStyle

Stage puts tablestyle to the model stage

func (*TableStyle) Unstage

func (tablestyle *TableStyle) Unstage(stage *StageStruct) *TableStyle

Unstage removes tablestyle off the model stage

func (*TableStyle) UnstageVoid

func (tablestyle *TableStyle) UnstageVoid(stage *StageStruct)

UnstageVoid removes tablestyle off the model stage

type TableStyle_WOP

type TableStyle_WOP struct {
	// insertion point
	Name    string
	Content string
	Val     string
}

type Table_WOP

type Table_WOP struct {
	// insertion point
	Name    string
	Content string
}

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
	Content            string
	Node               *Node
	PreserveWhiteSpace bool

	// navigation
	EnclosingRune *Rune
}

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 TextVal

type TextVal struct {
	Text string `xml:",chardata"`
	Val  string `xml:"val,attr"`
}

TextVal is

type Text_WOP

type Text_WOP struct {
	// insertion point
	Name               string
	Content            string
	PreserveWhiteSpace bool
}

Jump to

Keyboard shortcuts

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