Implement SCUM direct data plane
This commit is contained in:
@@ -85,6 +85,33 @@ type SCUMObservationResult struct {
|
||||
Rows []map[string]any
|
||||
}
|
||||
|
||||
type SCUMDataSet string
|
||||
|
||||
const (
|
||||
SCUMDataSetUsers SCUMDataSet = "scum_users"
|
||||
SCUMDataSetSquads SCUMDataSet = "scum_squads"
|
||||
SCUMDataSetMembers SCUMDataSet = "scum_squad_members"
|
||||
SCUMDataSetVehicles SCUMDataSet = "scum_vehicles"
|
||||
SCUMDataSetFlags SCUMDataSet = "scum_flags"
|
||||
SCUMDataSetActivity SCUMDataSet = "scum_activity_events"
|
||||
SCUMDataSetGifts SCUMDataSet = "scum_gift_catalogs"
|
||||
SCUMDataSetMapPoints SCUMDataSet = "scum_map_points"
|
||||
)
|
||||
|
||||
type SCUMDataRow struct {
|
||||
ID string
|
||||
ServerInstanceID string
|
||||
TargetTable SCUMDataSet
|
||||
UpsertKey string
|
||||
Fields map[string]any
|
||||
Payload map[string]any
|
||||
PluginID string
|
||||
QueryKey string
|
||||
Freshness SCUMProjectionFreshnessState
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type SCUMProjectionFreshnessState struct {
|
||||
Status SCUMProjectionFreshness
|
||||
ObservationID string
|
||||
@@ -232,6 +259,19 @@ func CopySCUMObservationResult(value SCUMObservationResult) SCUMObservationResul
|
||||
return value
|
||||
}
|
||||
|
||||
func CopySCUMRowTargetDeclaration(value SCUMRowTargetDeclaration) SCUMRowTargetDeclaration {
|
||||
value.UpsertKeys = CopyStringSlice(value.UpsertKeys)
|
||||
value.ColumnMappings = CopyStringMap(value.ColumnMappings)
|
||||
return value
|
||||
}
|
||||
|
||||
func CopySCUMDataRow(value SCUMDataRow) SCUMDataRow {
|
||||
value.Fields = CopyGameClientBridgePayload(value.Fields)
|
||||
value.Payload = CopyGameClientBridgePayload(value.Payload)
|
||||
value.Freshness = CopySCUMProjectionFreshnessState(value.Freshness)
|
||||
return value
|
||||
}
|
||||
|
||||
func CopyGameClientBridgeRows(values []map[string]any) []map[string]any {
|
||||
if values == nil {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user