models

package
v0.0.0-...-b26830e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 20 Imported by: 4

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

This section is empty.

Functions

func AfterCreateFromFront

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

AfterCreateFromFront is called after a create from front

func AfterDeleteFromFront

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

AfterDeleteFromFront is called after a delete from front

func AfterReadFromFront

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

AfterReadFromFront is called after a Read from front

func AfterUpdateFromFront

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

AfterUpdateFromFront is called after a update from front

func CompareGongstructByName

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

func CopyBranch

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

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

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

func EvictInOtherSlices

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

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

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

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

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

EvictInOtherSlices removes the fields instances from other fields of other instance

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

func GetAssociationName

func GetAssociationName[Type Gongstruct]() *Type

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

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

func GetFieldStringValue

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

func GetFieldStringValueFromPointer

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

func GetFields

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

GetFields return the array of the fields

func GetFieldsFromPointer

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

GetFieldsFromPointer return the array of the fields

func GetGongstrucsSorted

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

func GetGongstructInstancesMap

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

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

func GetGongstructInstancesSet

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

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

func GetGongstructInstancesSetFromPointerType

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

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

func GetGongstructName

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

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

func GetPointerReverseMap

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

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

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

func GetPointerToGongstructName

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

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

func GetSliceOfPointersReverseMap

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

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

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

func GongGetMap

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

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

func GongGetSet

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

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

func 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 {
	CreateORMCircle(Circle *Circle)
	CreateORMDivIcon(DivIcon *DivIcon)
	CreateORMLayerGroup(LayerGroup *LayerGroup)
	CreateORMLayerGroupUse(LayerGroupUse *LayerGroupUse)
	CreateORMMapOptions(MapOptions *MapOptions)
	CreateORMMarker(Marker *Marker)
	CreateORMUserClick(UserClick *UserClick)
	CreateORMVLine(VLine *VLine)
	CreateORMVisualTrack(VisualTrack *VisualTrack)
}

swagger:ignore

type AllModelsStructDeleteInterface

type AllModelsStructDeleteInterface interface {
	DeleteORMCircle(Circle *Circle)
	DeleteORMDivIcon(DivIcon *DivIcon)
	DeleteORMLayerGroup(LayerGroup *LayerGroup)
	DeleteORMLayerGroupUse(LayerGroupUse *LayerGroupUse)
	DeleteORMMapOptions(MapOptions *MapOptions)
	DeleteORMMarker(Marker *Marker)
	DeleteORMUserClick(UserClick *UserClick)
	DeleteORMVLine(VLine *VLine)
	DeleteORMVisualTrack(VisualTrack *VisualTrack)
}

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
	CommitCircle(circle *Circle)
	CheckoutCircle(circle *Circle)
	CommitDivIcon(divicon *DivIcon)
	CheckoutDivIcon(divicon *DivIcon)
	CommitLayerGroup(layergroup *LayerGroup)
	CheckoutLayerGroup(layergroup *LayerGroup)
	CommitLayerGroupUse(layergroupuse *LayerGroupUse)
	CheckoutLayerGroupUse(layergroupuse *LayerGroupUse)
	CommitMapOptions(mapoptions *MapOptions)
	CheckoutMapOptions(mapoptions *MapOptions)
	CommitMarker(marker *Marker)
	CheckoutMarker(marker *Marker)
	CommitUserClick(userclick *UserClick)
	CheckoutUserClick(userclick *UserClick)
	CommitVLine(vline *VLine)
	CheckoutVLine(vline *VLine)
	CommitVisualTrack(visualtrack *VisualTrack)
	CheckoutVisualTrack(visualtrack *VisualTrack)
	GetLastCommitFromBackNb() uint
	GetLastPushFromFrontNb() uint
}

type Circle

type Circle struct {
	Lat, Lng float64
	Name     string

	Radius float64

	ColorEnum     ColorEnum
	DashStyleEnum DashStyleEnum

	// LayerGroup the object belongs to
	LayerGroup *LayerGroup

	// swagger:ignore
	// access to the models instance that contains the original information
	Circle CircleInterface `gorm:"-"`
}

Circle provides all necessary elements to the front to display a track

swagger:model Circle

func CopyBranchCircle

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

insertion point for stage branch per struct

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

insertion point for cumulative sub template with model space calls 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

func (*Circle) UpdateCircle

func (VisualCircle *Circle) UpdateCircle()

type CircleInterface

type CircleInterface interface {
	GetLat() (lat float64)
	GetLng() (lng float64)
	GetRadius() (lng float64)

	GetName() (name string)
}

type Circle_WOP

type Circle_WOP struct {
	// insertion point
	Lat           float64
	Lng           float64
	Name          string
	Radius        float64
	ColorEnum     ColorEnum
	DashStyleEnum DashStyleEnum
}

insertion point

type ColorEnum

type ColorEnum string

ColorEnum .. swagger:enum ColorEnum

const (
	LIGHT_BROWN_8D6E63 ColorEnum = "LIGHT_BROWN_8D6E63" //
	RED                ColorEnum = "RED"
	GREY               ColorEnum = "GREY"
	GREEN              ColorEnum = "GREEN"
	BLUE               ColorEnum = "BLUE"
	NONE               ColorEnum = "NONE"
)

func (ColorEnum) CodeValues

func (colorenum ColorEnum) CodeValues() (res []string)

func (ColorEnum) Codes

func (colorenum ColorEnum) Codes() (res []string)

func (*ColorEnum) FromCodeString

func (colorenum *ColorEnum) FromCodeString(input string) (err error)

func (*ColorEnum) FromString

func (colorenum *ColorEnum) FromString(input string) (err error)

func (*ColorEnum) ToCodeString

func (colorenum *ColorEnum) ToCodeString() (res string)

func (ColorEnum) ToString

func (colorenum ColorEnum) ToString() (res string)

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

type DashStyleEnum string

DashStyleEnum .. swagger:enum DashStyleEnum

const (
	FIVE_TEN    DashStyleEnum = "FIVE_TEN"
	FIVE_TWENTY DashStyleEnum = "FIVE_TWENTY"
)

func (DashStyleEnum) CodeValues

func (dashstyleenum DashStyleEnum) CodeValues() (res []string)

func (DashStyleEnum) Codes

func (dashstyleenum DashStyleEnum) Codes() (res []string)

func (*DashStyleEnum) FromCodeString

func (dashstyleenum *DashStyleEnum) FromCodeString(input string) (err error)

func (*DashStyleEnum) FromString

func (dashstyleenum *DashStyleEnum) FromString(input string) (err error)

func (*DashStyleEnum) ToCodeString

func (dashstyleenum *DashStyleEnum) ToCodeString() (res string)

func (DashStyleEnum) ToString

func (dashstyleenum DashStyleEnum) ToString() (res string)

Utility function for DashStyleEnum 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 DivIcon

type DivIcon struct {
	Name string

	SVG string // the SVG description

	// swagger:ignore
	// access to the models instance that contains the original information
	DivIconInterface DivIconInterface `gorm:"-"`
}

DivIcon is the go implementation of the leaflet DivIcon object

swagger:model DivIcon

func CopyBranchDivIcon

func CopyBranchDivIcon(mapOrigCopy map[any]any, diviconFrom *DivIcon) (diviconTo *DivIcon)

func (*DivIcon) Checkout

func (divicon *DivIcon) Checkout(stage *StageStruct) *DivIcon

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

func (*DivIcon) Commit

func (divicon *DivIcon) Commit(stage *StageStruct) *DivIcon

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

func (*DivIcon) CommitVoid

func (divicon *DivIcon) CommitVoid(stage *StageStruct)

func (*DivIcon) CopyBasicFields

func (from *DivIcon) CopyBasicFields(to *DivIcon)

func (*DivIcon) GetName

func (divicon *DivIcon) GetName() (res string)

for satisfaction of GongStruct interface

func (*DivIcon) Stage

func (divicon *DivIcon) Stage(stage *StageStruct) *DivIcon

Stage puts divicon to the model stage

func (*DivIcon) Unstage

func (divicon *DivIcon) Unstage(stage *StageStruct) *DivIcon

Unstage removes divicon off the model stage

func (*DivIcon) UnstageVoid

func (divicon *DivIcon) UnstageVoid(stage *StageStruct)

UnstageVoid removes divicon off the model stage

func (*DivIcon) UpdateVisualIcon

func (divIcon *DivIcon) UpdateVisualIcon()

type DivIconInterface

type DivIconInterface interface {
	GetIconName() (name string)
	GetSVG() (name string)
}

type DivIcon_WOP

type DivIcon_WOP struct {
	// insertion point
	Name string
	SVG  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
	Circle | DivIcon | LayerGroup | LayerGroupUse | MapOptions | Marker | UserClick | VLine | VisualTrack
}

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 | ColorEnum | DashStyleEnum | Start_To_End_Enum | TransmittingEnum
	Codes() []string
	CodeValues() []string
}

type GongstructMapString

type GongstructMapString interface {
	map[any]any |

		map[string]*Circle |
		map[string]*DivIcon |
		map[string]*LayerGroup |
		map[string]*LayerGroupUse |
		map[string]*MapOptions |
		map[string]*Marker |
		map[string]*UserClick |
		map[string]*VLine |
		map[string]*VisualTrack |
		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[*Circle]any |
		map[*DivIcon]any |
		map[*LayerGroup]any |
		map[*LayerGroupUse]any |
		map[*MapOptions]any |
		map[*Marker]any |
		map[*UserClick]any |
		map[*VLine]any |
		map[*VisualTrack]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 LayerGroup

type LayerGroup struct {
	Name string

	DisplayName string

	// swagger:ignore
	// access to the models instance that contains the original information
	LayerGroupInterface LayerGroupInterface `gorm:"-"`
}

LayerGroup is the gong version of the leaflet LayerGroup

swagger:model LayerGroup

var DefaultLayerGroup *LayerGroup

func ComputeLayerGroupFromLayerGroupName

func ComputeLayerGroupFromLayerGroupName(gongleafletStage *StageStruct, layerGroupName string) (layerGroup *LayerGroup)

little simple algo for the visual layer computation

func CopyBranchLayerGroup

func CopyBranchLayerGroup(mapOrigCopy map[any]any, layergroupFrom *LayerGroup) (layergroupTo *LayerGroup)

func (*LayerGroup) Checkout

func (layergroup *LayerGroup) Checkout(stage *StageStruct) *LayerGroup

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

func (*LayerGroup) Commit

func (layergroup *LayerGroup) Commit(stage *StageStruct) *LayerGroup

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

func (*LayerGroup) CommitVoid

func (layergroup *LayerGroup) CommitVoid(stage *StageStruct)

func (*LayerGroup) CopyBasicFields

func (from *LayerGroup) CopyBasicFields(to *LayerGroup)

func (*LayerGroup) GetName

func (layergroup *LayerGroup) GetName() (res string)

for satisfaction of GongStruct interface

func (*LayerGroup) Stage

func (layergroup *LayerGroup) Stage(stage *StageStruct) *LayerGroup

Stage puts layergroup to the model stage

func (*LayerGroup) Unstage

func (layergroup *LayerGroup) Unstage(stage *StageStruct) *LayerGroup

Unstage removes layergroup off the model stage

func (*LayerGroup) UnstageVoid

func (layergroup *LayerGroup) UnstageVoid(stage *StageStruct)

UnstageVoid removes layergroup off the model stage

func (*LayerGroup) UpdateLayerGroup

func (LayerGroup *LayerGroup) UpdateLayerGroup()

type LayerGroupInterface

type LayerGroupInterface interface {
	GetLayerName() (name string)
}

type LayerGroupUse

type LayerGroupUse struct {
	Name string

	// indicate wether to display the layer
	IsDisplayed bool

	LayerGroup *LayerGroup
}

LayerGroupUse allows a MANY-MANY asociation to LayerGroup

swagger:model layerGroupUse

func CopyBranchLayerGroupUse

func CopyBranchLayerGroupUse(mapOrigCopy map[any]any, layergroupuseFrom *LayerGroupUse) (layergroupuseTo *LayerGroupUse)

func (*LayerGroupUse) Checkout

func (layergroupuse *LayerGroupUse) Checkout(stage *StageStruct) *LayerGroupUse

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

func (*LayerGroupUse) Commit

func (layergroupuse *LayerGroupUse) Commit(stage *StageStruct) *LayerGroupUse

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

func (*LayerGroupUse) CommitVoid

func (layergroupuse *LayerGroupUse) CommitVoid(stage *StageStruct)

func (*LayerGroupUse) CopyBasicFields

func (from *LayerGroupUse) CopyBasicFields(to *LayerGroupUse)

func (*LayerGroupUse) GetName

func (layergroupuse *LayerGroupUse) GetName() (res string)

for satisfaction of GongStruct interface

func (*LayerGroupUse) Stage

func (layergroupuse *LayerGroupUse) Stage(stage *StageStruct) *LayerGroupUse

Stage puts layergroupuse to the model stage

func (*LayerGroupUse) Unstage

func (layergroupuse *LayerGroupUse) Unstage(stage *StageStruct) *LayerGroupUse

Unstage removes layergroupuse off the model stage

func (*LayerGroupUse) UnstageVoid

func (layergroupuse *LayerGroupUse) UnstageVoid(stage *StageStruct)

UnstageVoid removes layergroupuse off the model stage

type LayerGroupUse_WOP

type LayerGroupUse_WOP struct {
	// insertion point
	Name        string
	IsDisplayed bool
}

type LayerGroup_WOP

type LayerGroup_WOP struct {
	// insertion point
	Name        string
	DisplayName string
}

type LineInterface

type LineInterface interface {
	GetStartLat() (lat float64)
	GetStartLng() (lng float64)

	GetEndLat() (lat float64)
	GetEndLng() (lng float64)

	GetName() (name string)

	GetLayerGroupName() string

	// transmission
	GetIsTransmitting() bool // display the message displacement
	GetMessage() string      // message to display

	GetIsTransmittingBackward() bool // display the message displacement
	GetMessageBackward() string      // message to display

}

type MapOptions

type MapOptions struct {
	Lat, Lng  float64 // map center
	Name      string
	ZoomLevel float64 // zoom level at the initialisation

	UrlTemplate        string
	Attribution        string
	MaxZoom            int
	ZoomControl        bool
	AttributionControl bool
	ZoomSnap           int

	// swagger:ignore
	// access to the models instance that contains the original information
	MapOptionsInterface MapOptionsInterface `gorm:"-"`

	// List of LayerGroups that can be displayed for this map
	LayerGroupUses []*LayerGroupUse
}

MapOptions provides all necessary elements to the front to display a track

swagger:model MapOptions

func CopyBranchMapOptions

func CopyBranchMapOptions(mapOrigCopy map[any]any, mapoptionsFrom *MapOptions) (mapoptionsTo *MapOptions)

func (*MapOptions) Checkout

func (mapoptions *MapOptions) Checkout(stage *StageStruct) *MapOptions

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

func (*MapOptions) Commit

func (mapoptions *MapOptions) Commit(stage *StageStruct) *MapOptions

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

func (*MapOptions) CommitVoid

func (mapoptions *MapOptions) CommitVoid(stage *StageStruct)

func (*MapOptions) CopyBasicFields

func (from *MapOptions) CopyBasicFields(to *MapOptions)

func (*MapOptions) GetName

func (mapoptions *MapOptions) GetName() (res string)

for satisfaction of GongStruct interface

func (*MapOptions) Stage

func (mapoptions *MapOptions) Stage(stage *StageStruct) *MapOptions

Stage puts mapoptions to the model stage

func (*MapOptions) Unstage

func (mapoptions *MapOptions) Unstage(stage *StageStruct) *MapOptions

Unstage removes mapoptions off the model stage

func (*MapOptions) UnstageVoid

func (mapoptions *MapOptions) UnstageVoid(stage *StageStruct)

UnstageVoid removes mapoptions off the model stage

type MapOptionsInterface

type MapOptionsInterface interface {
	GetLat() (lat float64)
	GetLng() (lng float64)
	GetName() (name string)

	GetZoomLevel() (lng float64)
}

type MapOptions_WOP

type MapOptions_WOP struct {
	// insertion point
	Lat                float64
	Lng                float64
	Name               string
	ZoomLevel          float64
	UrlTemplate        string
	Attribution        string
	MaxZoom            int
	ZoomControl        bool
	AttributionControl bool
	ZoomSnap           int
}

type Marker

type Marker struct {
	Lat, Lng float64
	Name     string

	ColorEnum ColorEnum

	// LayerGroup the object belongs to
	LayerGroup *LayerGroup

	// DivIcon
	DivIcon *DivIcon

	// swagger:ignore
	// access to the models instance that contains the original information
	MarkerInteface MarkerInterface `gorm:"-"`

	// the Stage_ of the visual track
	Stage_ *StageStruct
}

Marker provides all necessary elements to the front to display a track

L.Marker is used to display clickable/draggable icons on the map. Extends Layer.

swagger:model Marker

func AttachMarker

func AttachMarker(
	gongleafletStage *StageStruct,
	markerInterface MarkerInterface,
	colorEnum ColorEnum,
	divIcon *DivIcon) (marker *Marker)

attach visual center to center

func CopyBranchMarker

func CopyBranchMarker(mapOrigCopy map[any]any, markerFrom *Marker) (markerTo *Marker)

func (*Marker) Checkout

func (marker *Marker) Checkout(stage *StageStruct) *Marker

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

func (*Marker) Commit

func (marker *Marker) Commit(stage *StageStruct) *Marker

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

func (*Marker) CommitVoid

func (marker *Marker) CommitVoid(stage *StageStruct)

func (*Marker) CopyBasicFields

func (from *Marker) CopyBasicFields(to *Marker)

func (*Marker) GetName

func (marker *Marker) GetName() (res string)

for satisfaction of GongStruct interface

func (*Marker) Stage

func (marker *Marker) Stage(stage *StageStruct) *Marker

Stage puts marker to the model stage

func (*Marker) Unstage

func (marker *Marker) Unstage(stage *StageStruct) *Marker

Unstage removes marker off the model stage

func (*Marker) UnstageVoid

func (marker *Marker) UnstageVoid(stage *StageStruct)

UnstageVoid removes marker off the model stage

func (*Marker) UpdateMarker

func (marker *Marker) UpdateMarker()

type MarkerInterface

type MarkerInterface interface {
	GetLat() (lat float64)
	GetLng() (lng float64)
	GetName() (name string)
	GetLayerGroupName() string
}

type Marker_WOP

type Marker_WOP struct {
	// insertion point
	Lat       float64
	Lng       float64
	Name      string
	ColorEnum ColorEnum
}

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 PointerToGongstruct

type PointerToGongstruct interface {
	*Circle | *DivIcon | *LayerGroup | *LayerGroupUse | *MapOptions | *Marker | *UserClick | *VLine | *VisualTrack
	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 {
	*ColorEnum | *DashStyleEnum | *Start_To_End_Enum | *TransmittingEnum
	FromCodeString(input string) (err error)
}

type ReverseField

type ReverseField struct {
	GongstructName string
	Fieldname      string
}

func GetReverseFields

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

type StageStruct

type StageStruct struct {

	// insertion point for definition of arrays registering instances
	Circles           map[*Circle]any
	Circles_mapString map[string]*Circle

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

	DivIcons           map[*DivIcon]any
	DivIcons_mapString map[string]*DivIcon

	OnAfterDivIconCreateCallback OnAfterCreateInterface[DivIcon]
	OnAfterDivIconUpdateCallback OnAfterUpdateInterface[DivIcon]
	OnAfterDivIconDeleteCallback OnAfterDeleteInterface[DivIcon]
	OnAfterDivIconReadCallback   OnAfterReadInterface[DivIcon]

	LayerGroups           map[*LayerGroup]any
	LayerGroups_mapString map[string]*LayerGroup

	OnAfterLayerGroupCreateCallback OnAfterCreateInterface[LayerGroup]
	OnAfterLayerGroupUpdateCallback OnAfterUpdateInterface[LayerGroup]
	OnAfterLayerGroupDeleteCallback OnAfterDeleteInterface[LayerGroup]
	OnAfterLayerGroupReadCallback   OnAfterReadInterface[LayerGroup]

	LayerGroupUses           map[*LayerGroupUse]any
	LayerGroupUses_mapString map[string]*LayerGroupUse

	OnAfterLayerGroupUseCreateCallback OnAfterCreateInterface[LayerGroupUse]
	OnAfterLayerGroupUseUpdateCallback OnAfterUpdateInterface[LayerGroupUse]
	OnAfterLayerGroupUseDeleteCallback OnAfterDeleteInterface[LayerGroupUse]
	OnAfterLayerGroupUseReadCallback   OnAfterReadInterface[LayerGroupUse]

	MapOptionss           map[*MapOptions]any
	MapOptionss_mapString map[string]*MapOptions

	// insertion point for slice of pointers maps
	MapOptions_LayerGroupUses_reverseMap map[*LayerGroupUse]*MapOptions

	OnAfterMapOptionsCreateCallback OnAfterCreateInterface[MapOptions]
	OnAfterMapOptionsUpdateCallback OnAfterUpdateInterface[MapOptions]
	OnAfterMapOptionsDeleteCallback OnAfterDeleteInterface[MapOptions]
	OnAfterMapOptionsReadCallback   OnAfterReadInterface[MapOptions]

	Markers           map[*Marker]any
	Markers_mapString map[string]*Marker

	OnAfterMarkerCreateCallback OnAfterCreateInterface[Marker]
	OnAfterMarkerUpdateCallback OnAfterUpdateInterface[Marker]
	OnAfterMarkerDeleteCallback OnAfterDeleteInterface[Marker]
	OnAfterMarkerReadCallback   OnAfterReadInterface[Marker]

	UserClicks           map[*UserClick]any
	UserClicks_mapString map[string]*UserClick

	OnAfterUserClickCreateCallback OnAfterCreateInterface[UserClick]
	OnAfterUserClickUpdateCallback OnAfterUpdateInterface[UserClick]
	OnAfterUserClickDeleteCallback OnAfterDeleteInterface[UserClick]
	OnAfterUserClickReadCallback   OnAfterReadInterface[UserClick]

	VLines           map[*VLine]any
	VLines_mapString map[string]*VLine

	OnAfterVLineCreateCallback OnAfterCreateInterface[VLine]
	OnAfterVLineUpdateCallback OnAfterUpdateInterface[VLine]
	OnAfterVLineDeleteCallback OnAfterDeleteInterface[VLine]
	OnAfterVLineReadCallback   OnAfterReadInterface[VLine]

	VisualTracks           map[*VisualTrack]any
	VisualTracks_mapString map[string]*VisualTrack

	OnAfterVisualTrackCreateCallback OnAfterCreateInterface[VisualTrack]
	OnAfterVisualTrackUpdateCallback OnAfterUpdateInterface[VisualTrack]
	OnAfterVisualTrackDeleteCallback OnAfterDeleteInterface[VisualTrack]
	OnAfterVisualTrackReadCallback   OnAfterReadInterface[VisualTrack]

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

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

insertion point for stage per struct

func (*StageStruct) IsStagedDivIcon

func (stage *StageStruct) IsStagedDivIcon(divicon *DivIcon) (ok bool)

func (*StageStruct) IsStagedLayerGroup

func (stage *StageStruct) IsStagedLayerGroup(layergroup *LayerGroup) (ok bool)

func (*StageStruct) IsStagedLayerGroupUse

func (stage *StageStruct) IsStagedLayerGroupUse(layergroupuse *LayerGroupUse) (ok bool)

func (*StageStruct) IsStagedMapOptions

func (stage *StageStruct) IsStagedMapOptions(mapoptions *MapOptions) (ok bool)

func (*StageStruct) IsStagedMarker

func (stage *StageStruct) IsStagedMarker(marker *Marker) (ok bool)

func (*StageStruct) IsStagedUserClick

func (stage *StageStruct) IsStagedUserClick(userclick *UserClick) (ok bool)

func (*StageStruct) IsStagedVLine

func (stage *StageStruct) IsStagedVLine(vline *VLine) (ok bool)

func (*StageStruct) IsStagedVisualTrack

func (stage *StageStruct) IsStagedVisualTrack(visualtrack *VisualTrack) (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) StageBranchCircle

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

insertion point for stage branch per struct

func (*StageStruct) StageBranchDivIcon

func (stage *StageStruct) StageBranchDivIcon(divicon *DivIcon)

func (*StageStruct) StageBranchLayerGroup

func (stage *StageStruct) StageBranchLayerGroup(layergroup *LayerGroup)

func (*StageStruct) StageBranchLayerGroupUse

func (stage *StageStruct) StageBranchLayerGroupUse(layergroupuse *LayerGroupUse)

func (*StageStruct) StageBranchMapOptions

func (stage *StageStruct) StageBranchMapOptions(mapoptions *MapOptions)

func (*StageStruct) StageBranchMarker

func (stage *StageStruct) StageBranchMarker(marker *Marker)

func (*StageStruct) StageBranchUserClick

func (stage *StageStruct) StageBranchUserClick(userclick *UserClick)

func (*StageStruct) StageBranchVLine

func (stage *StageStruct) StageBranchVLine(vline *VLine)

func (*StageStruct) StageBranchVisualTrack

func (stage *StageStruct) StageBranchVisualTrack(visualtrack *VisualTrack)

func (*StageStruct) Unstage

func (stage *StageStruct) Unstage()

func (*StageStruct) UnstageBranchCircle

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

insertion point for unstage branch per struct

func (*StageStruct) UnstageBranchDivIcon

func (stage *StageStruct) UnstageBranchDivIcon(divicon *DivIcon)

func (*StageStruct) UnstageBranchLayerGroup

func (stage *StageStruct) UnstageBranchLayerGroup(layergroup *LayerGroup)

func (*StageStruct) UnstageBranchLayerGroupUse

func (stage *StageStruct) UnstageBranchLayerGroupUse(layergroupuse *LayerGroupUse)

func (*StageStruct) UnstageBranchMapOptions

func (stage *StageStruct) UnstageBranchMapOptions(mapoptions *MapOptions)

func (*StageStruct) UnstageBranchMarker

func (stage *StageStruct) UnstageBranchMarker(marker *Marker)

func (*StageStruct) UnstageBranchUserClick

func (stage *StageStruct) UnstageBranchUserClick(userclick *UserClick)

func (*StageStruct) UnstageBranchVLine

func (stage *StageStruct) UnstageBranchVLine(vline *VLine)

func (*StageStruct) UnstageBranchVisualTrack

func (stage *StageStruct) UnstageBranchVisualTrack(visualtrack *VisualTrack)

type Start_To_End_Enum

type Start_To_End_Enum string

Start_To_End_Enum .. swagger:enum Start_To_End_Enum

const (
	FORWARD_START_TO_END  Start_To_End_Enum = "FORWARD_START_TO_END"
	BACKWARD_END_TO_START Start_To_End_Enum = "BACKWARD_START_TO_END"
)

state

func (Start_To_End_Enum) CodeValues

func (start_to_end_enum Start_To_End_Enum) CodeValues() (res []string)

func (Start_To_End_Enum) Codes

func (start_to_end_enum Start_To_End_Enum) Codes() (res []string)

func (*Start_To_End_Enum) FromCodeString

func (start_to_end_enum *Start_To_End_Enum) FromCodeString(input string) (err error)

func (*Start_To_End_Enum) FromString

func (start_to_end_enum *Start_To_End_Enum) FromString(input string) (err error)

func (*Start_To_End_Enum) ToCodeString

func (start_to_end_enum *Start_To_End_Enum) ToCodeString() (res string)

func (Start_To_End_Enum) ToString

func (start_to_end_enum Start_To_End_Enum) ToString() (res string)

Utility function for Start_To_End_Enum 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 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 TransmittingEnum

type TransmittingEnum string

TransmittingEnum .. swagger:enum TransmittingEnum

const (
	IS_TRANSMITTING     TransmittingEnum = "IS_TRANSMITTING"
	IS_NOT_TRANSMITTING TransmittingEnum = "IS_NOT_TRANSMITTING"
)

state

func (TransmittingEnum) CodeValues

func (transmittingenum TransmittingEnum) CodeValues() (res []string)

func (TransmittingEnum) Codes

func (transmittingenum TransmittingEnum) Codes() (res []string)

func (*TransmittingEnum) FromCodeString

func (transmittingenum *TransmittingEnum) FromCodeString(input string) (err error)

func (*TransmittingEnum) FromString

func (transmittingenum *TransmittingEnum) FromString(input string) (err error)

func (*TransmittingEnum) ToCodeString

func (transmittingenum *TransmittingEnum) ToCodeString() (res string)

func (TransmittingEnum) ToString

func (transmittingenum TransmittingEnum) ToString() (res string)

Utility function for TransmittingEnum 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 UserClick

type UserClick struct {
	Name        string
	Lat, Lng    float64
	TimeOfClick time.Time
}

func CopyBranchUserClick

func CopyBranchUserClick(mapOrigCopy map[any]any, userclickFrom *UserClick) (userclickTo *UserClick)

func (*UserClick) Checkout

func (userclick *UserClick) Checkout(stage *StageStruct) *UserClick

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

func (*UserClick) Commit

func (userclick *UserClick) Commit(stage *StageStruct) *UserClick

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

func (*UserClick) CommitVoid

func (userclick *UserClick) CommitVoid(stage *StageStruct)

func (*UserClick) CopyBasicFields

func (from *UserClick) CopyBasicFields(to *UserClick)

func (*UserClick) GetName

func (userclick *UserClick) GetName() (res string)

for satisfaction of GongStruct interface

func (*UserClick) Stage

func (userclick *UserClick) Stage(stage *StageStruct) *UserClick

Stage puts userclick to the model stage

func (*UserClick) Unstage

func (userclick *UserClick) Unstage(stage *StageStruct) *UserClick

Unstage removes userclick off the model stage

func (*UserClick) UnstageVoid

func (userclick *UserClick) UnstageVoid(stage *StageStruct)

UnstageVoid removes userclick off the model stage

type UserClick_WOP

type UserClick_WOP struct {
	// insertion point
	Name        string
	Lat         float64
	Lng         float64
	TimeOfClick time.Time
}

type VLine

type VLine struct {
	StartLat, StartLng float64
	EndLat, EndLng     float64
	Name               string

	ColorEnum     ColorEnum
	DashStyleEnum DashStyleEnum

	// LayerGroup the object belongs to
	LayerGroup *LayerGroup

	IsTransmitting TransmittingEnum // display the message displacement
	Message        string           // message to display

	IsTransmittingBackward TransmittingEnum // display the message displacement on the return path
	MessageBackward        string           // message to display

	// swagger:ignore
	// access to the models instance that contains the original information
	LineInterface LineInterface `gorm:"-"`
	// contains filtered or unexported fields
}

VLine provides all necessary elements to the front to display a line in leaflet

back to VLine because if Line breacks the chrome navigator (to be investigated)

swagger:model VLine

func AttachLine

func AttachLine(
	gongleafletStage *StageStruct,
	visualLineInterface LineInterface,
	DashStyleEnum DashStyleEnum) (visualLine *VLine)

attach visual line to line

func CopyBranchVLine

func CopyBranchVLine(mapOrigCopy map[any]any, vlineFrom *VLine) (vlineTo *VLine)

func (*VLine) Checkout

func (vline *VLine) Checkout(stage *StageStruct) *VLine

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

func (*VLine) Commit

func (vline *VLine) Commit(stage *StageStruct) *VLine

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

func (*VLine) CommitVoid

func (vline *VLine) CommitVoid(stage *StageStruct)

func (*VLine) CopyBasicFields

func (from *VLine) CopyBasicFields(to *VLine)

func (*VLine) GetName

func (vline *VLine) GetName() (res string)

for satisfaction of GongStruct interface

func (*VLine) Stage

func (vline *VLine) Stage(stage *StageStruct) *VLine

Stage puts vline to the model stage

func (*VLine) Unstage

func (vline *VLine) Unstage(stage *StageStruct) *VLine

Unstage removes vline off the model stage

func (*VLine) UnstageVoid

func (vline *VLine) UnstageVoid(stage *StageStruct)

UnstageVoid removes vline off the model stage

func (*VLine) UpdateLine

func (visualLine *VLine) UpdateLine()

type VLine_WOP

type VLine_WOP struct {
	// insertion point
	StartLat               float64
	StartLng               float64
	EndLat                 float64
	EndLng                 float64
	Name                   string
	ColorEnum              ColorEnum
	DashStyleEnum          DashStyleEnum
	IsTransmitting         TransmittingEnum
	Message                string
	IsTransmittingBackward TransmittingEnum
	MessageBackward        string
}

type VisualTrack

type VisualTrack struct {
	Lat, Lng, Heading, Level, Speed, VerticalSpeed float64
	Name                                           string

	ColorEnum ColorEnum

	// LayerGroup the object belongs to
	LayerGroup *LayerGroup

	// access to the models instance that contains the original information
	// swagger:ignore
	// a moving object has to implement this interface to
	// be displayed as a visual interface
	//
	VisualTrackInterface VisualTrackInterface `gorm:"-"`

	DivIcon *DivIcon

	// if true display dots from the trajectory
	DisplayTrackHistory bool

	// if true, display level and speed below the icon
	DisplayLevelAndSpeed bool

	// the Stage_ of the visual track
	Stage_ *StageStruct
}

VisualTrack provides all necessary elements to the front to display a track

In leaflet, it is translated into a MovingMarker

swagger:model VisualTrack

func AttachVisualTrack

func AttachVisualTrack(
	gongleafletStage *StageStruct,
	track VisualTrackInterface,
	divIcon *DivIcon,
	colorEnum ColorEnum,
	displayTrackHistory bool,
	displayLevelAndSpeed bool) (visualTrack *VisualTrack)

AttachVisualTrack attaches an object that match the visualTrackInterface to a visual track the visual track will request information from the object in order to display the track

func CopyBranchVisualTrack

func CopyBranchVisualTrack(mapOrigCopy map[any]any, visualtrackFrom *VisualTrack) (visualtrackTo *VisualTrack)

func (*VisualTrack) Checkout

func (visualtrack *VisualTrack) Checkout(stage *StageStruct) *VisualTrack

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

func (*VisualTrack) Commit

func (visualtrack *VisualTrack) Commit(stage *StageStruct) *VisualTrack

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

func (*VisualTrack) CommitVoid

func (visualtrack *VisualTrack) CommitVoid(stage *StageStruct)

func (*VisualTrack) CopyBasicFields

func (from *VisualTrack) CopyBasicFields(to *VisualTrack)

func (*VisualTrack) GetName

func (visualtrack *VisualTrack) GetName() (res string)

for satisfaction of GongStruct interface

func (*VisualTrack) Stage

func (visualtrack *VisualTrack) Stage(stage *StageStruct) *VisualTrack

Stage puts visualtrack to the model stage

func (*VisualTrack) Unstage

func (visualtrack *VisualTrack) Unstage(stage *StageStruct) *VisualTrack

Unstage removes visualtrack off the model stage

func (*VisualTrack) UnstageVoid

func (visualtrack *VisualTrack) UnstageVoid(stage *StageStruct)

UnstageVoid removes visualtrack off the model stage

func (*VisualTrack) UpdateTrack

func (visualTrack *VisualTrack) UpdateTrack()

type VisualTrackInterface

type VisualTrackInterface interface {

	// position
	GetLat() (lat float64)
	GetLng() (lng float64)

	// cinemetic
	GetHeading() (heading float64)
	GetSpeed() (speed float64)
	GetVerticalSpeed() (verticalSpeed float64)
	GetLevel() (level float64)

	GetName() (name string)
	GetLayerGroupName() string
}

type VisualTrack_WOP

type VisualTrack_WOP struct {
	// insertion point
	Lat                  float64
	Lng                  float64
	Heading              float64
	Level                float64
	Speed                float64
	VerticalSpeed        float64
	Name                 string
	ColorEnum            ColorEnum
	DisplayTrackHistory  bool
	DisplayLevelAndSpeed bool
}

Jump to

Keyboard shortcuts

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