models

package
v0.0.0-...-a8ef27b Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 23 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}}{}).Stage(stage)`
View Source
const MessageSpeed = 1000.0 // in km/h
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 ReplaceOldDeclarationsInFile

func ReplaceOldDeclarationsInFile(pathToFile string) error

ReplaceOldDeclarationsInFile replaces specific text in a file at the given path.

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 {
	CreateORMCivilianAirport(CivilianAirport *CivilianAirport)
	CreateORMLiner(Liner *Liner)
	CreateORMMessage(Message *Message)
	CreateORMOpsLine(OpsLine *OpsLine)
	CreateORMRadar(Radar *Radar)
	CreateORMSatellite(Satellite *Satellite)
	CreateORMScenario(Scenario *Scenario)
}

swagger:ignore

type AllModelsStructDeleteInterface

type AllModelsStructDeleteInterface interface {
	DeleteORMCivilianAirport(CivilianAirport *CivilianAirport)
	DeleteORMLiner(Liner *Liner)
	DeleteORMMessage(Message *Message)
	DeleteORMOpsLine(OpsLine *OpsLine)
	DeleteORMRadar(Radar *Radar)
	DeleteORMSatellite(Satellite *Satellite)
	DeleteORMScenario(Scenario *Scenario)
}

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
	CommitCivilianAirport(civilianairport *CivilianAirport)
	CheckoutCivilianAirport(civilianairport *CivilianAirport)
	CommitLiner(liner *Liner)
	CheckoutLiner(liner *Liner)
	CommitMessage(message *Message)
	CheckoutMessage(message *Message)
	CommitOpsLine(opsline *OpsLine)
	CheckoutOpsLine(opsline *OpsLine)
	CommitRadar(radar *Radar)
	CheckoutRadar(radar *Radar)
	CommitSatellite(satellite *Satellite)
	CheckoutSatellite(satellite *Satellite)
	CommitScenario(scenario *Scenario)
	CheckoutScenario(scenario *Scenario)
	GetLastCommitFromBackNb() uint
	GetLastPushFromFrontNb() uint
}

type CenterConcept

type CenterConcept struct {

	// fixed position
	Lat float64
	Lng float64
}

func (*CenterConcept) GetConcept

func (center *CenterConcept) GetConcept() ConceptEnum

func (*CenterConcept) GetLayerGroupName

func (center *CenterConcept) GetLayerGroupName() (name string)

type CivilianAirport

type CivilianAirport struct {
	CenterConcept // allow for selecting visual objects

	// Agent
	// swagger:ignore
	gongsim_models.Agent

	Name string
}

CivilianAirport

func CopyBranchCivilianAirport

func CopyBranchCivilianAirport(mapOrigCopy map[any]any, civilianairportFrom *CivilianAirport) (civilianairportTo *CivilianAirport)

insertion point for stage branch per struct

func (*CivilianAirport) Checkout

func (civilianairport *CivilianAirport) Checkout(stage *StageStruct) *CivilianAirport

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

func (*CivilianAirport) Commit

func (civilianairport *CivilianAirport) Commit(stage *StageStruct) *CivilianAirport

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

func (*CivilianAirport) CommitVoid

func (civilianairport *CivilianAirport) CommitVoid(stage *StageStruct)

func (*CivilianAirport) CopyBasicFields

func (from *CivilianAirport) CopyBasicFields(to *CivilianAirport)

func (*CivilianAirport) FireNextEvent

func (civilianAirport *CivilianAirport) FireNextEvent()

FireNextEvent fire next Event basicaly, it does nothing (yet to be implemented)

func (*CivilianAirport) GetLat

func (civilianAirport *CivilianAirport) GetLat() float64

functions to satisty the visual interface for center

func (*CivilianAirport) GetLng

func (civilianAirport *CivilianAirport) GetLng() float64

func (*CivilianAirport) GetName

func (civilianairport *CivilianAirport) GetName() (res string)

for satisfaction of GongStruct interface

func (*CivilianAirport) Register

func (civilianAirport *CivilianAirport) Register(engine *gongsim_models.Engine) (res *CivilianAirport)

func (*CivilianAirport) Stage

func (civilianairport *CivilianAirport) Stage(stage *StageStruct) *CivilianAirport

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

func (*CivilianAirport) Unstage

func (civilianairport *CivilianAirport) Unstage(stage *StageStruct) *CivilianAirport

Unstage removes civilianairport off the model stage

func (*CivilianAirport) UnstageVoid

func (civilianairport *CivilianAirport) UnstageVoid(stage *StageStruct)

UnstageVoid removes civilianairport off the model stage

type CivilianAirport_WOP

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

insertion point

type Concept

type Concept struct {
	ConceptEnum ConceptEnum
}

Concept swagger:model concept

type ConceptEnum

type ConceptEnum string

ConceptEnum .. swagger:enum ConceptEnum

const (
	Aircraft_  ConceptEnum = "Aircrafts"
	Satellite_ ConceptEnum = "Satellites"
	Network_   ConceptEnum = "Networks"
	Center_    ConceptEnum = "Centers"
	System_    ConceptEnum = "Systems"
)

available concepts that enable visual filters

func (ConceptEnum) CodeValues

func (conceptenum ConceptEnum) CodeValues() (res []string)

func (ConceptEnum) Codes

func (conceptenum ConceptEnum) Codes() (res []string)

func (*ConceptEnum) FromCodeString

func (conceptenum *ConceptEnum) FromCodeString(input string) (err error)

func (*ConceptEnum) FromString

func (conceptenum *ConceptEnum) FromString(input string) (err error)

func (*ConceptEnum) ToCodeString

func (conceptenum *ConceptEnum) ToCodeString() (res string)

func (ConceptEnum) ToString

func (conceptenum ConceptEnum) ToString() (res string)

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

type ConceptInterface interface {
	GetConcept() ConceptEnum
}

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

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

type GongstructMapString

type GongstructMapString interface {
	map[any]any
}

type GongstructSet

type GongstructSet interface {
	map[any]any
}

type GongtructBasicField

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

type LatLngAgentInterface

type LatLngAgentInterface interface {
	GetName() string
	GetLat() float64
	GetLng() float64
	QueueEvent(gongsim_models.EventInterface)
	TransfertAndQueueEvent(gongsim_models.EventInterface)
}

LatLngAgentInterface is an interface to another agent that have a name, a position and who can queue/fire events usefull for handling message from one agent to another

type Liner

type Liner struct {
	Name string

	MovingObject // concept

	// Agent
	// swagger:ignore
	gongsim_models.Agent

	State LinerStateEnum

	// Control of the aircraft
	TargetHeading     float64
	TargetLocationLat float64
	TargetLocationLng float64
	DistanceToTarget  float64

	// Max rotational speed, in degrees/seconds
	MaxRotationalSpeed float64

	// Vertical Speed
	VerticalSpeed float64

	Timestampstring string

	ReporingLine *OpsLine
	// contains filtered or unexported fields
}

Liner is a moving object swagger:model liner

func CopyBranchLiner

func CopyBranchLiner(mapOrigCopy map[any]any, linerFrom *Liner) (linerTo *Liner)

func (*Liner) Checkout

func (liner *Liner) Checkout(stage *StageStruct) *Liner

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

func (*Liner) Commit

func (liner *Liner) Commit(stage *StageStruct) *Liner

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

func (*Liner) CommitVoid

func (liner *Liner) CommitVoid(stage *StageStruct)

func (*Liner) CopyBasicFields

func (from *Liner) CopyBasicFields(to *Liner)

func (*Liner) FireNextEvent

func (liner *Liner) FireNextEvent()

FireNextEvent fire next Event

func (*Liner) GetDisplay

func (liner *Liner) GetDisplay() bool

func (*Liner) GetHeading

func (liner *Liner) GetHeading() float64

func (*Liner) GetLat

func (liner *Liner) GetLat() float64

functions to satisty the visual interface for track

func (*Liner) GetLatPositions

func (liner *Liner) GetLatPositions() []float64

func (*Liner) GetLayerGroupName

func (*Liner) GetLayerGroupName() (name string)

func (*Liner) GetLevel

func (liner *Liner) GetLevel() float64

func (*Liner) GetLng

func (liner *Liner) GetLng() float64

func (*Liner) GetLngPositions

func (liner *Liner) GetLngPositions() []float64

func (*Liner) GetName

func (liner *Liner) GetName() (res string)

for satisfaction of GongStruct interface

func (*Liner) GetSpeed

func (liner *Liner) GetSpeed() float64

speed is displayed in tens of nautical miles

func (*Liner) GetVerticalSpeed

func (liner *Liner) GetVerticalSpeed() float64

func (*Liner) Register

func (Liner *Liner) Register(engine *gongsim_models.Engine) (res *Liner)

func (*Liner) Stage

func (liner *Liner) Stage(stage *StageStruct) *Liner

Stage puts liner to the model stage

func (*Liner) Unstage

func (liner *Liner) Unstage(stage *StageStruct) *Liner

Unstage removes liner off the model stage

func (*Liner) UnstageVoid

func (liner *Liner) UnstageVoid(stage *StageStruct)

UnstageVoid removes liner off the model stage

type LinerStateEnum

type LinerStateEnum string

LinerStateEnum .. swagger:enum LinerStateEnum

const (
	EN_ROUTE_NOMINAL LinerStateEnum = "EN_ROUTE_NOMINAL"
	LANDED           LinerStateEnum = "LANDED"
)

state

func (LinerStateEnum) CodeValues

func (linerstateenum LinerStateEnum) CodeValues() (res []string)

func (LinerStateEnum) Codes

func (linerstateenum LinerStateEnum) Codes() (res []string)

func (*LinerStateEnum) FromCodeString

func (linerstateenum *LinerStateEnum) FromCodeString(input string) (err error)

func (*LinerStateEnum) FromString

func (linerstateenum *LinerStateEnum) FromString(input string) (err error)

func (*LinerStateEnum) ToCodeString

func (linerstateenum *LinerStateEnum) ToCodeString() (res string)

func (LinerStateEnum) ToString

func (linerstateenum LinerStateEnum) ToString() (res string)

Utility function for LinerStateEnum 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 Liner_WOP

type Liner_WOP struct {
	// insertion point
	Name               string
	Lat                float64
	Lng                float64
	Heading            float64
	Level              float64
	Speed              float64
	State              LinerStateEnum
	TargetHeading      float64
	TargetLocationLat  float64
	TargetLocationLng  float64
	DistanceToTarget   float64
	MaxRotationalSpeed float64
	VerticalSpeed      float64
	Timestampstring    string
}

type Message

type Message struct {
	MovingObject // concept

	// Agent
	// swagger:ignore
	gongsim_models.Agent

	State MessageStateEnum

	Name string

	// Control of the aircraft
	TargetLocationLat float64
	TargetLocationLng float64
	DistanceToTarget  float64

	Timestampstring string

	DurationSinceSimulationStart time.Duration
	Timestampstartstring         string

	From   LatLngAgentInterface `gorm:"-"`
	Source string               // string version of from

	To          LatLngAgentInterface `gorm:"-"`
	Destination string               // string version of to

	Content      string
	About_string string

	Display bool
	// contains filtered or unexported fields
}

Message swagger:model message

func CopyBranchMessage

func CopyBranchMessage(mapOrigCopy map[any]any, messageFrom *Message) (messageTo *Message)

func (*Message) Checkout

func (message *Message) Checkout(stage *StageStruct) *Message

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

func (*Message) Commit

func (message *Message) Commit(stage *StageStruct) *Message

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

func (*Message) CommitVoid

func (message *Message) CommitVoid(stage *StageStruct)

func (*Message) CopyBasicFields

func (from *Message) CopyBasicFields(to *Message)

func (*Message) FireNextEvent

func (message *Message) FireNextEvent()

FireNextEvent fire next Event

func (*Message) GetDisplay

func (message *Message) GetDisplay() bool

func (*Message) GetHeading

func (message *Message) GetHeading() float64

func (*Message) GetLat

func (message *Message) GetLat() float64

functions to satisty the visual interface for track

func (*Message) GetLayerGroupName

func (*Message) GetLayerGroupName() (name string)

func (*Message) GetLevel

func (message *Message) GetLevel() float64

func (*Message) GetLng

func (message *Message) GetLng() float64

func (*Message) GetName

func (message *Message) GetName() (res string)

for satisfaction of GongStruct interface

func (*Message) GetSpeed

func (message *Message) GetSpeed() float64

speed is displayed in tens of nautical miles

func (*Message) GetVerticalSpeed

func (message *Message) GetVerticalSpeed() float64

func (*Message) GetVisualLayerName

func (message *Message) GetVisualLayerName() string

func (*Message) Register

func (Message *Message) Register(engine *gongsim_models.Engine) (res *Message)

func (*Message) Stage

func (message *Message) Stage(stage *StageStruct) *Message

Stage puts message to the model stage

func (*Message) Unstage

func (message *Message) Unstage(stage *StageStruct) *Message

Unstage removes message off the model stage

func (*Message) UnstageVoid

func (message *Message) UnstageVoid(stage *StageStruct)

UnstageVoid removes message off the model stage

type MessageStateEnum

type MessageStateEnum string

MessageStateEnum .. swagger:enum MessageStateEnum

const (
	MESSAGE_EN_ROUTE MessageStateEnum = "MESSAGE_EN_ROUTE"
	MESSAGE_ARRIVED  MessageStateEnum = "MESSAGE_ARRIVED"
)

state

func (MessageStateEnum) CodeValues

func (messagestateenum MessageStateEnum) CodeValues() (res []string)

func (MessageStateEnum) Codes

func (messagestateenum MessageStateEnum) Codes() (res []string)

func (*MessageStateEnum) FromCodeString

func (messagestateenum *MessageStateEnum) FromCodeString(input string) (err error)

func (*MessageStateEnum) FromString

func (messagestateenum *MessageStateEnum) FromString(input string) (err error)

func (*MessageStateEnum) ToCodeString

func (messagestateenum *MessageStateEnum) ToCodeString() (res string)

func (MessageStateEnum) ToString

func (messagestateenum MessageStateEnum) ToString() (res string)

Utility function for MessageStateEnum 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 Message_WOP

type Message_WOP struct {
	// insertion point
	Lat                          float64
	Lng                          float64
	Heading                      float64
	Level                        float64
	Speed                        float64
	State                        MessageStateEnum
	Name                         string
	TargetLocationLat            float64
	TargetLocationLng            float64
	DistanceToTarget             float64
	Timestampstring              string
	DurationSinceSimulationStart time.Duration
	Timestampstartstring         string
	Source                       string
	Destination                  string
	Content                      string
	About_string                 string
	Display                      bool
}

type MovingObject

type MovingObject struct {

	// current position
	Lat float64
	Lng float64

	// heading in degrees
	Heading float64

	// level
	// for instance 210 means 21 000 feets
	Level float64

	// Horizonatl Speed, in km/h
	Speed float64
}

swagger:model MovingObject

func (*MovingObject) GetConcept

func (*MovingObject) GetConcept() ConceptEnum

type MovingObjectInterface

type MovingObjectInterface interface {
	GetName() string
	GetLat() float64
	GetLng() float64
	QueueEvent(gongsim_models.EventInterface)
	TransfertAndQueueEvent(gongsim_models.EventInterface)
}

type Network

type Network struct {
	IsTransmitting      bool   // true if it has to display the message
	TransmissionMessage string // message to display

	IsTransmittingBackward      bool   // true if it has to display the message
	TransmissionMessageBackward string // message to display

	// this interface can be set to override the default behavior of the network
	// which is doing nothing
	NetworkCallbackInterface NetworkCallbackInterface `gorm:"-"`
}

Network is a two-ways message transmitter

func (*Network) GetConcept

func (network *Network) GetConcept() ConceptEnum

func (*Network) GetIsTransmitting

func (network *Network) GetIsTransmitting() bool

func (*Network) GetIsTransmittingBackward

func (network *Network) GetIsTransmittingBackward() bool

func (*Network) GetLayerGroupName

func (network *Network) GetLayerGroupName() (name string)

func (*Network) GetMessage

func (network *Network) GetMessage() (name string)

func (*Network) GetMessageBackward

func (network *Network) GetMessageBackward() (name string)

type NetworkCallbackInterface

type NetworkCallbackInterface interface {
	GetIsTransmittingOverride() bool
	GetMessageOverride() string

	GetIsTransmittingBackwardOverride() bool
	GetMessageBackwardOverride() string
}

type OnAfterCreateInterface

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

OnAfterCreateInterface callback when an instance is updated from the front

type OnAfterDeleteInterface

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

OnAfterDeleteInterface callback when an instance is updated from the front

type OnAfterReadInterface

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

OnAfterReadInterface callback when an instance is updated from the front

type OnAfterUpdateInterface

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

OnAfterUpdateInterface callback when an instance is updated from the front

type OnInitCommitInterface

type OnInitCommitInterface interface {
	BeforeCommit(stage *StageStruct)
}

type OperationalLineStateEnum

type OperationalLineStateEnum string

OperationalLineStateEnum .. swagger:enum OperationalLineStateEnum

const (
	OPS_COM_LINK_OPERATIONAL_LINE_WORKING     OperationalLineStateEnum = "OPS_COM_LINK_OPERATIONAL_LINE_WORKING"
	OPS_COM_LINK_OPERATIONAL_LINE_NOT_WORKING OperationalLineStateEnum = "OPS_COM_LINK_OPERATIONAL_LINE_NOT_WORKING"
)

state

func (OperationalLineStateEnum) CodeValues

func (operationallinestateenum OperationalLineStateEnum) CodeValues() (res []string)

func (OperationalLineStateEnum) Codes

func (operationallinestateenum OperationalLineStateEnum) Codes() (res []string)

func (*OperationalLineStateEnum) FromCodeString

func (operationallinestateenum *OperationalLineStateEnum) FromCodeString(input string) (err error)

func (*OperationalLineStateEnum) FromString

func (operationallinestateenum *OperationalLineStateEnum) FromString(input string) (err error)

func (*OperationalLineStateEnum) ToCodeString

func (operationallinestateenum *OperationalLineStateEnum) ToCodeString() (res string)

func (OperationalLineStateEnum) ToString

func (operationallinestateenum OperationalLineStateEnum) ToString() (res string)

Utility function for OperationalLineStateEnum 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 OpsLine

type OpsLine struct {
	Network // for filtering sake and for handling messages

	// Agent
	// swagger:ignore
	gongsim_models.Agent

	Scenario *Scenario

	State OperationalLineStateEnum

	Name string

	// Authority
	Authority LatLngAgentInterface `gorm:"-"`

	// Subordonate
	Subordonate LatLngAgentInterface `gorm:"-"`
}

OpsLine

An OpsLine is an agent simulating a operational communication between a Aircraft and a Center

swagger:model OpsLine

func CopyBranchOpsLine

func CopyBranchOpsLine(mapOrigCopy map[any]any, opslineFrom *OpsLine) (opslineTo *OpsLine)

func (*OpsLine) Checkout

func (opsline *OpsLine) Checkout(stage *StageStruct) *OpsLine

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

func (*OpsLine) Commit

func (opsline *OpsLine) Commit(stage *StageStruct) *OpsLine

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

func (*OpsLine) CommitVoid

func (opsline *OpsLine) CommitVoid(stage *StageStruct)

func (*OpsLine) CopyBasicFields

func (from *OpsLine) CopyBasicFields(to *OpsLine)

func (*OpsLine) FireNextEvent

func (opsLine *OpsLine) FireNextEvent()

FireNextEvent fire next Event

func (*OpsLine) GetEndLat

func (link *OpsLine) GetEndLat() float64

func (*OpsLine) GetEndLng

func (link *OpsLine) GetEndLng() float64

func (*OpsLine) GetIsTransmittingBackwardOverride

func (link *OpsLine) GetIsTransmittingBackwardOverride() bool

func (*OpsLine) GetIsTransmittingOverride

func (link *OpsLine) GetIsTransmittingOverride() bool

func (*OpsLine) GetMessageBackwardOverride

func (link *OpsLine) GetMessageBackwardOverride() string

func (*OpsLine) GetMessageOverride

func (link *OpsLine) GetMessageOverride() string

func (*OpsLine) GetName

func (opsline *OpsLine) GetName() (res string)

for satisfaction of GongStruct interface

func (*OpsLine) GetStartLat

func (link *OpsLine) GetStartLat() float64

functions to satisty the visual interface for center

func (*OpsLine) GetStartLng

func (link *OpsLine) GetStartLng() float64

func (*OpsLine) Register

func (OpsLine *OpsLine) Register(engine *gongsim_models.Engine) (res *OpsLine)

func (*OpsLine) Stage

func (opsline *OpsLine) Stage(stage *StageStruct) *OpsLine

Stage puts opsline to the model stage

func (*OpsLine) Unstage

func (opsline *OpsLine) Unstage(stage *StageStruct) *OpsLine

Unstage removes opsline off the model stage

func (*OpsLine) UnstageVoid

func (opsline *OpsLine) UnstageVoid(stage *StageStruct)

UnstageVoid removes opsline off the model stage

type OpsLine_WOP

type OpsLine_WOP struct {
	// insertion point
	IsTransmitting              bool
	TransmissionMessage         string
	IsTransmittingBackward      bool
	TransmissionMessageBackward string
	State                       OperationalLineStateEnum
	Name                        string
}

type Order

type Order struct {
	gongsim_models.Event
	OrderMessage string
	Number       int
	Type         OrderEnum

	Target    *Liner // the liner the order is about
	TargetLat float64
	TargetLng float64
}

A Order is the event that will change the operational communication is a non working mode swagger:model Order

type OrderEnum

type OrderEnum string

OrderEnum .. swagger:enum OrderEnum

const (
	TAKE_OFF OrderEnum = "TAKE_OFF"
)

state

func (OrderEnum) CodeValues

func (orderenum OrderEnum) CodeValues() (res []string)

func (OrderEnum) Codes

func (orderenum OrderEnum) Codes() (res []string)

func (*OrderEnum) FromCodeString

func (orderenum *OrderEnum) FromCodeString(input string) (err error)

func (*OrderEnum) FromString

func (orderenum *OrderEnum) FromString(input string) (err error)

func (*OrderEnum) ToCodeString

func (orderenum *OrderEnum) ToCodeString() (res string)

func (OrderEnum) ToString

func (orderenum OrderEnum) ToString() (res string)

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

type PointerToGongstruct

type PointerToGongstruct interface {
	GetName() string
	CommitVoid(*StageStruct)
	UnstageVoid(stage *StageStruct)
	comparable
}

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

type PointerToGongstructEnumIntField

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

type PointerToGongstructEnumStringField

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

type Radar

type Radar struct {
	System // concept

	// Agent
	// swagger:ignore
	gongsim_models.Agent

	State RadarStateEnum

	Name string

	// current position
	Lat float64
	Lng float64

	// range in km
	Range float64
}

Radar swagger:model radar

func CopyBranchRadar

func CopyBranchRadar(mapOrigCopy map[any]any, radarFrom *Radar) (radarTo *Radar)

func (*Radar) Checkout

func (radar *Radar) Checkout(stage *StageStruct) *Radar

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

func (*Radar) Commit

func (radar *Radar) Commit(stage *StageStruct) *Radar

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

func (*Radar) CommitVoid

func (radar *Radar) CommitVoid(stage *StageStruct)

func (*Radar) CopyBasicFields

func (from *Radar) CopyBasicFields(to *Radar)

func (*Radar) FireNextEvent

func (radar *Radar) FireNextEvent()

FireNextEvent fire next Event

func (*Radar) GetLat

func (radar *Radar) GetLat() float64

functions to satisty the visual interface for center

func (*Radar) GetLng

func (radar *Radar) GetLng() float64

func (*Radar) GetName

func (radar *Radar) GetName() (res string)

for satisfaction of GongStruct interface

func (*Radar) GetRadius

func (radar *Radar) GetRadius() float64

functions to satisty the visual interface for circle

func (*Radar) Register

func (Radar *Radar) Register(engine *gongsim_models.Engine) (res *Radar)

func (*Radar) Stage

func (radar *Radar) Stage(stage *StageStruct) *Radar

Stage puts radar to the model stage

func (*Radar) Unstage

func (radar *Radar) Unstage(stage *StageStruct) *Radar

Unstage removes radar off the model stage

func (*Radar) UnstageVoid

func (radar *Radar) UnstageVoid(stage *StageStruct)

UnstageVoid removes radar off the model stage

type RadarStateEnum

type RadarStateEnum string

RadarStateEnum .. swagger:enum RadarStateEnum

const (
	WORKING RadarStateEnum = "WORKING"
)

state

func (RadarStateEnum) CodeValues

func (radarstateenum RadarStateEnum) CodeValues() (res []string)

func (RadarStateEnum) Codes

func (radarstateenum RadarStateEnum) Codes() (res []string)

func (*RadarStateEnum) FromCodeString

func (radarstateenum *RadarStateEnum) FromCodeString(input string) (err error)

func (*RadarStateEnum) FromString

func (radarstateenum *RadarStateEnum) FromString(input string) (err error)

func (*RadarStateEnum) ToCodeString

func (radarstateenum *RadarStateEnum) ToCodeString() (res string)

func (RadarStateEnum) ToString

func (radarstateenum RadarStateEnum) ToString() (res string)

Utility function for RadarStateEnum 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 Radar_WOP

type Radar_WOP struct {
	// insertion point
	State RadarStateEnum
	Name  string
	Lat   float64
	Lng   float64
	Range float64
}

type Report

type Report struct {
	gongsim_models.Event
	ReportMessage string
	Number        int
	Type          ReportEnum
	About         *Liner   // the liner the report is about
	OpsLine       *OpsLine // the reporting line
}

A Report is the event that will change the operational communication is a non working mode swagger:model Report

type ReportEnum

type ReportEnum string

ReportEnum .. swagger:enum ReportEnum

const (
	TAKE_OFF_COMPLETED ReportEnum = "TAKE_OFF_COMPLETED"
)

state

func (ReportEnum) CodeValues

func (reportenum ReportEnum) CodeValues() (res []string)

func (ReportEnum) Codes

func (reportenum ReportEnum) Codes() (res []string)

func (*ReportEnum) FromCodeString

func (reportenum *ReportEnum) FromCodeString(input string) (err error)

func (*ReportEnum) FromString

func (reportenum *ReportEnum) FromString(input string) (err error)

func (*ReportEnum) ToCodeString

func (reportenum *ReportEnum) ToCodeString() (res string)

func (ReportEnum) ToString

func (reportenum ReportEnum) ToString() (res string)

Utility function for ReportEnum 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 ReverseField

type ReverseField struct {
	GongstructName string
	Fieldname      string
}

func GetReverseFields

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

type Satellite

type Satellite struct {
	Name string

	Line1 string
	Line2 string

	MovingObject // concept

	// Agent
	// swagger:ignore
	gongsim_models.Agent

	VerticalSpeed float64

	Timestampstring string
	// contains filtered or unexported fields
}

Satellite is a moving object swagger:model satellite

func CopyBranchSatellite

func CopyBranchSatellite(mapOrigCopy map[any]any, satelliteFrom *Satellite) (satelliteTo *Satellite)

func (*Satellite) Checkout

func (satellite *Satellite) Checkout(stage *StageStruct) *Satellite

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

func (*Satellite) Commit

func (satellite *Satellite) Commit(stage *StageStruct) *Satellite

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

func (*Satellite) CommitVoid

func (satellite *Satellite) CommitVoid(stage *StageStruct)

func (*Satellite) CopyBasicFields

func (from *Satellite) CopyBasicFields(to *Satellite)

func (*Satellite) FireNextEvent

func (satellite *Satellite) FireNextEvent()

FireNextEvent fire next Event

func (*Satellite) GetDisplay

func (satellite *Satellite) GetDisplay() bool

func (*Satellite) GetHeading

func (satellite *Satellite) GetHeading() float64

func (*Satellite) GetLat

func (satellite *Satellite) GetLat() float64

functions to satisty the visual interface for track

func (*Satellite) GetLayerGroupName

func (*Satellite) GetLayerGroupName() (name string)

func (*Satellite) GetLevel

func (satellite *Satellite) GetLevel() float64

func (*Satellite) GetLng

func (satellite *Satellite) GetLng() float64

func (*Satellite) GetName

func (satellite *Satellite) GetName() (res string)

for satisfaction of GongStruct interface

func (*Satellite) GetSpeed

func (satellite *Satellite) GetSpeed() float64

speed is displayed in tens of nautical miles

func (*Satellite) GetVerticalSpeed

func (satellite *Satellite) GetVerticalSpeed() float64

func (*Satellite) InitFromTLE

func (satellite *Satellite) InitFromTLE() (res *Satellite)

func (*Satellite) Register

func (satellite *Satellite) Register(engine *gongsim_models.Engine) (res *Satellite)

func (*Satellite) Stage

func (satellite *Satellite) Stage(stage *StageStruct) *Satellite

Stage puts satellite to the model stage

func (*Satellite) Unstage

func (satellite *Satellite) Unstage(stage *StageStruct) *Satellite

Unstage removes satellite off the model stage

func (*Satellite) UnstageVoid

func (satellite *Satellite) UnstageVoid(stage *StageStruct)

UnstageVoid removes satellite off the model stage

type Satellite_WOP

type Satellite_WOP struct {
	// insertion point
	Name            string
	Line1           string
	Line2           string
	Lat             float64
	Lng             float64
	Heading         float64
	Level           float64
	Speed           float64
	VerticalSpeed   float64
	Timestampstring string
}

type Scenario

type Scenario struct {
	Name string // mandatory

	Lat, Lng  float64 // map center
	ZoomLevel float64 // zoom level at the initialisation

	// Message Visual Speed, in km/h
	// this field can be tweaked by the end user
	MessageVisualSpeed float64
	// contains filtered or unexported fields
}

Scenario holds all infos about a scenario swagger:model Scenario

func CopyBranchScenario

func CopyBranchScenario(mapOrigCopy map[any]any, scenarioFrom *Scenario) (scenarioTo *Scenario)

func (*Scenario) Checkout

func (scenario *Scenario) Checkout(stage *StageStruct) *Scenario

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

func (*Scenario) Commit

func (scenario *Scenario) Commit(stage *StageStruct) *Scenario

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

func (*Scenario) CommitVoid

func (scenario *Scenario) CommitVoid(stage *StageStruct)

func (*Scenario) CopyBasicFields

func (from *Scenario) CopyBasicFields(to *Scenario)

func (*Scenario) GetEnd

func (scenario *Scenario) GetEnd() time.Time

func (*Scenario) GetLat

func (scenario *Scenario) GetLat() float64

func (*Scenario) GetLng

func (scenario *Scenario) GetLng() float64

func (*Scenario) GetName

func (scenario *Scenario) GetName() (res string)

for satisfaction of GongStruct interface

func (*Scenario) GetStart

func (scenario *Scenario) GetStart() time.Time

func (*Scenario) GetZoomLevel

func (scenario *Scenario) GetZoomLevel() float64

func (*Scenario) SetEnd

func (scenario *Scenario) SetEnd(time time.Time)

func (*Scenario) SetStart

func (scenario *Scenario) SetStart(time time.Time)

func (*Scenario) Stage

func (scenario *Scenario) Stage(stage *StageStruct) *Scenario

Stage puts scenario to the model stage

func (*Scenario) Unstage

func (scenario *Scenario) Unstage(stage *StageStruct) *Scenario

Unstage removes scenario off the model stage

func (*Scenario) UnstageVoid

func (scenario *Scenario) UnstageVoid(stage *StageStruct)

UnstageVoid removes scenario off the model stage

type Scenario_WOP

type Scenario_WOP struct {
	// insertion point
	Name               string
	Lat                float64
	Lng                float64
	ZoomLevel          float64
	MessageVisualSpeed float64
}

type StacksNames

type StacksNames string

StacksNames - enumeration of possible 'type' values for an HTML <input> element swagger:enum StacksNames

const (
	// we have three application stacks. All have the same name
	GongflyStackName      StacksNames = "gongfly"
	GongLeafleatStackName StacksNames = "gongleaflet"
	GongsimStackName      StacksNames = "gongsim"
)

values for TableExtraNameEnum

func (StacksNames) CodeValues

func (stacksnames StacksNames) CodeValues() (res []string)

func (StacksNames) Codes

func (stacksnames StacksNames) Codes() (res []string)

func (*StacksNames) FromCodeString

func (stacksnames *StacksNames) FromCodeString(input string) (err error)

func (*StacksNames) FromString

func (stacksnames *StacksNames) FromString(input string) (err error)

func (*StacksNames) ToCodeString

func (stacksnames *StacksNames) ToCodeString() (res string)

func (StacksNames) ToString

func (stacksnames StacksNames) ToString() (res string)

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

type StageStruct

type StageStruct struct {

	// insertion point for definition of arrays registering instances
	CivilianAirports           map[*CivilianAirport]any
	CivilianAirports_mapString map[string]*CivilianAirport

	// insertion point for slice of pointers maps
	OnAfterCivilianAirportCreateCallback OnAfterCreateInterface[CivilianAirport]
	OnAfterCivilianAirportUpdateCallback OnAfterUpdateInterface[CivilianAirport]
	OnAfterCivilianAirportDeleteCallback OnAfterDeleteInterface[CivilianAirport]
	OnAfterCivilianAirportReadCallback   OnAfterReadInterface[CivilianAirport]

	Liners           map[*Liner]any
	Liners_mapString map[string]*Liner

	// insertion point for slice of pointers maps
	OnAfterLinerCreateCallback OnAfterCreateInterface[Liner]
	OnAfterLinerUpdateCallback OnAfterUpdateInterface[Liner]
	OnAfterLinerDeleteCallback OnAfterDeleteInterface[Liner]
	OnAfterLinerReadCallback   OnAfterReadInterface[Liner]

	Messages           map[*Message]any
	Messages_mapString map[string]*Message

	// insertion point for slice of pointers maps
	OnAfterMessageCreateCallback OnAfterCreateInterface[Message]
	OnAfterMessageUpdateCallback OnAfterUpdateInterface[Message]
	OnAfterMessageDeleteCallback OnAfterDeleteInterface[Message]
	OnAfterMessageReadCallback   OnAfterReadInterface[Message]

	OpsLines           map[*OpsLine]any
	OpsLines_mapString map[string]*OpsLine

	// insertion point for slice of pointers maps
	OnAfterOpsLineCreateCallback OnAfterCreateInterface[OpsLine]
	OnAfterOpsLineUpdateCallback OnAfterUpdateInterface[OpsLine]
	OnAfterOpsLineDeleteCallback OnAfterDeleteInterface[OpsLine]
	OnAfterOpsLineReadCallback   OnAfterReadInterface[OpsLine]

	Radars           map[*Radar]any
	Radars_mapString map[string]*Radar

	// insertion point for slice of pointers maps
	OnAfterRadarCreateCallback OnAfterCreateInterface[Radar]
	OnAfterRadarUpdateCallback OnAfterUpdateInterface[Radar]
	OnAfterRadarDeleteCallback OnAfterDeleteInterface[Radar]
	OnAfterRadarReadCallback   OnAfterReadInterface[Radar]

	Satellites           map[*Satellite]any
	Satellites_mapString map[string]*Satellite

	// insertion point for slice of pointers maps
	OnAfterSatelliteCreateCallback OnAfterCreateInterface[Satellite]
	OnAfterSatelliteUpdateCallback OnAfterUpdateInterface[Satellite]
	OnAfterSatelliteDeleteCallback OnAfterDeleteInterface[Satellite]
	OnAfterSatelliteReadCallback   OnAfterReadInterface[Satellite]

	Scenarios           map[*Scenario]any
	Scenarios_mapString map[string]*Scenario

	// insertion point for slice of pointers maps
	OnAfterScenarioCreateCallback OnAfterCreateInterface[Scenario]
	OnAfterScenarioUpdateCallback OnAfterUpdateInterface[Scenario]
	OnAfterScenarioDeleteCallback OnAfterDeleteInterface[Scenario]
	OnAfterScenarioReadCallback   OnAfterReadInterface[Scenario]

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

func (stage *StageStruct) IsStagedCivilianAirport(civilianairport *CivilianAirport) (ok bool)

insertion point for stage per struct

func (*StageStruct) IsStagedLiner

func (stage *StageStruct) IsStagedLiner(liner *Liner) (ok bool)

func (*StageStruct) IsStagedMessage

func (stage *StageStruct) IsStagedMessage(message *Message) (ok bool)

func (*StageStruct) IsStagedOpsLine

func (stage *StageStruct) IsStagedOpsLine(opsline *OpsLine) (ok bool)

func (*StageStruct) IsStagedRadar

func (stage *StageStruct) IsStagedRadar(radar *Radar) (ok bool)

func (*StageStruct) IsStagedSatellite

func (stage *StageStruct) IsStagedSatellite(satellite *Satellite) (ok bool)

func (*StageStruct) IsStagedScenario

func (stage *StageStruct) IsStagedScenario(scenario *Scenario) (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) StageBranchCivilianAirport

func (stage *StageStruct) StageBranchCivilianAirport(civilianairport *CivilianAirport)

insertion point for stage branch per struct

func (*StageStruct) StageBranchLiner

func (stage *StageStruct) StageBranchLiner(liner *Liner)

func (*StageStruct) StageBranchMessage

func (stage *StageStruct) StageBranchMessage(message *Message)

func (*StageStruct) StageBranchOpsLine

func (stage *StageStruct) StageBranchOpsLine(opsline *OpsLine)

func (*StageStruct) StageBranchRadar

func (stage *StageStruct) StageBranchRadar(radar *Radar)

func (*StageStruct) StageBranchSatellite

func (stage *StageStruct) StageBranchSatellite(satellite *Satellite)

func (*StageStruct) StageBranchScenario

func (stage *StageStruct) StageBranchScenario(scenario *Scenario)

func (*StageStruct) Unstage

func (stage *StageStruct) Unstage()

func (*StageStruct) UnstageBranchCivilianAirport

func (stage *StageStruct) UnstageBranchCivilianAirport(civilianairport *CivilianAirport)

insertion point for unstage branch per struct

func (*StageStruct) UnstageBranchLiner

func (stage *StageStruct) UnstageBranchLiner(liner *Liner)

func (*StageStruct) UnstageBranchMessage

func (stage *StageStruct) UnstageBranchMessage(message *Message)

func (*StageStruct) UnstageBranchOpsLine

func (stage *StageStruct) UnstageBranchOpsLine(opsline *OpsLine)

func (*StageStruct) UnstageBranchRadar

func (stage *StageStruct) UnstageBranchRadar(radar *Radar)

func (*StageStruct) UnstageBranchSatellite

func (stage *StageStruct) UnstageBranchSatellite(satellite *Satellite)

func (*StageStruct) UnstageBranchScenario

func (stage *StageStruct) UnstageBranchScenario(scenario *Scenario)

type System

type System struct{}

func (*System) GetConcept

func (system *System) GetConcept() ConceptEnum

func (*System) GetLayerGroupName

func (system *System) GetLayerGroupName() (name 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

Jump to

Keyboard shortcuts

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