convert

package
v5.0.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package convert provides functions to convert between GORM models and core models

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoreToAce3DeathEvent

func CoreToAce3DeathEvent(e core.Ace3DeathEvent) model.Ace3DeathEvent

CoreToAce3DeathEvent converts a core.Ace3DeathEvent to a GORM model.Ace3DeathEvent.

func CoreToAce3UnconsciousEvent

func CoreToAce3UnconsciousEvent(e core.Ace3UnconsciousEvent) model.Ace3UnconsciousEvent

CoreToAce3UnconsciousEvent converts a core.Ace3UnconsciousEvent to a GORM model.Ace3UnconsciousEvent.

func CoreToChatEvent

func CoreToChatEvent(e core.ChatEvent) model.ChatEvent

CoreToChatEvent converts a core.ChatEvent to a GORM model.ChatEvent.

func CoreToGeneralEvent

func CoreToGeneralEvent(e core.GeneralEvent) model.GeneralEvent

CoreToGeneralEvent converts a core.GeneralEvent to a GORM model.GeneralEvent.

func CoreToKillEvent

func CoreToKillEvent(e core.KillEvent) model.KillEvent

CoreToKillEvent converts a core.KillEvent to a GORM model.KillEvent.

func CoreToMarker

func CoreToMarker(m core.Marker) model.Marker

CoreToMarker converts a core.Marker to a GORM model.Marker.

func CoreToMarkerState

func CoreToMarkerState(s core.MarkerState) model.MarkerState

CoreToMarkerState converts a core.MarkerState to a GORM model.MarkerState.

func CoreToMission

func CoreToMission(m core.Mission) model.Mission

CoreToMission converts a core.Mission to a GORM model.Mission.

func CoreToPlacedObject

func CoreToPlacedObject(p core.PlacedObject) model.PlacedObject

CoreToPlacedObject converts a core.PlacedObject to a GORM model.PlacedObject.

func CoreToPlacedObjectEvent

func CoreToPlacedObjectEvent(e core.PlacedObjectEvent) model.PlacedObjectEvent

CoreToPlacedObjectEvent converts a core.PlacedObjectEvent to a GORM model.PlacedObjectEvent.

func CoreToProjectileEvent

func CoreToProjectileEvent(e core.ProjectileEvent) model.ProjectileEvent

CoreToProjectileEvent converts a core.ProjectileEvent to a GORM model.ProjectileEvent. Converts trajectory points to a LineStringZM geometry and splits unified Hits into separate HitSoldiers and HitVehicles slices.

func CoreToRadioEvent

func CoreToRadioEvent(e core.RadioEvent) model.RadioEvent

CoreToRadioEvent converts a core.RadioEvent to a GORM model.RadioEvent.

func CoreToSoldier

func CoreToSoldier(s core.Soldier) model.Soldier

CoreToSoldier converts a core.Soldier to a GORM model.Soldier. core.Soldier.ID maps to GORM Soldier.ObjectID.

func CoreToSoldierState

func CoreToSoldierState(s core.SoldierState) model.SoldierState

CoreToSoldierState converts a core.SoldierState to a GORM model.SoldierState.

func CoreToTimeState

func CoreToTimeState(t core.TimeState) model.TimeState

CoreToTimeState converts a core.TimeState to a GORM model.TimeState.

func CoreToVehicle

func CoreToVehicle(v core.Vehicle) model.Vehicle

CoreToVehicle converts a core.Vehicle to a GORM model.Vehicle. core.Vehicle.ID maps to GORM Vehicle.ObjectID.

func CoreToVehicleState

func CoreToVehicleState(v core.VehicleState) model.VehicleState

CoreToVehicleState converts a core.VehicleState to a GORM model.VehicleState.

func CoreToWorld

func CoreToWorld(w core.World) model.World

CoreToWorld converts a core.World to a GORM model.World.

Types

This section is empty.

Jump to

Keyboard shortcuts

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