feat(scum): rebuild plugin-owned management data
This commit is contained in:
@@ -69,8 +69,23 @@ type GameClientBridgeQueryTemplateDeclaration struct {
|
||||
TargetKey string
|
||||
ParameterSchemaRef string
|
||||
ResultSchemaRef string
|
||||
SQLRef string
|
||||
MaxRows int
|
||||
TimeoutSeconds int
|
||||
RowTarget *PluginDataRowTargetDeclaration
|
||||
}
|
||||
|
||||
type PluginDataRowTargetDeclaration struct {
|
||||
Collection string
|
||||
UpsertKeys []string
|
||||
ColumnMappings map[string]string
|
||||
}
|
||||
|
||||
type GameClientBridgeDataPackDeclaration struct {
|
||||
Key string
|
||||
DatabaseUserVersion int
|
||||
LogParserRefs []string
|
||||
ConfigMapRefs []string
|
||||
}
|
||||
|
||||
type GameClientBridgeOperationKind string
|
||||
@@ -155,6 +170,7 @@ type GameClientBridgeManifest struct {
|
||||
Commands []GameClientBridgeCommandDeclaration
|
||||
Snapshots []GameClientBridgeSnapshotDeclaration
|
||||
QueryTemplates []GameClientBridgeQueryTemplateDeclaration
|
||||
DataPacks []GameClientBridgeDataPackDeclaration
|
||||
OperationTemplates []GameClientBridgeOperationTemplateDeclaration
|
||||
Retention GameClientBridgeRetention
|
||||
Pages []GameClientBridgePageContract
|
||||
@@ -453,6 +469,17 @@ func CopyGameClientBridgeManifest(value GameClientBridgeManifest) GameClientBrid
|
||||
}
|
||||
value.Snapshots = append([]GameClientBridgeSnapshotDeclaration(nil), value.Snapshots...)
|
||||
value.QueryTemplates = append([]GameClientBridgeQueryTemplateDeclaration(nil), value.QueryTemplates...)
|
||||
for index := range value.QueryTemplates {
|
||||
if value.QueryTemplates[index].RowTarget != nil {
|
||||
copy := CopyPluginDataRowTargetDeclaration(*value.QueryTemplates[index].RowTarget)
|
||||
value.QueryTemplates[index].RowTarget = ©
|
||||
}
|
||||
}
|
||||
value.DataPacks = append([]GameClientBridgeDataPackDeclaration(nil), value.DataPacks...)
|
||||
for index := range value.DataPacks {
|
||||
value.DataPacks[index].LogParserRefs = CopyStringSlice(value.DataPacks[index].LogParserRefs)
|
||||
value.DataPacks[index].ConfigMapRefs = CopyStringSlice(value.DataPacks[index].ConfigMapRefs)
|
||||
}
|
||||
value.OperationTemplates = append([]GameClientBridgeOperationTemplateDeclaration(nil), value.OperationTemplates...)
|
||||
value.Pages = append([]GameClientBridgePageContract(nil), value.Pages...)
|
||||
value.Features = append([]GameClientBridgeFeatureDeclaration(nil), value.Features...)
|
||||
@@ -470,6 +497,12 @@ func CopyGameClientBridgeManifest(value GameClientBridgeManifest) GameClientBrid
|
||||
return value
|
||||
}
|
||||
|
||||
func CopyPluginDataRowTargetDeclaration(value PluginDataRowTargetDeclaration) PluginDataRowTargetDeclaration {
|
||||
value.UpsertKeys = CopyStringSlice(value.UpsertKeys)
|
||||
value.ColumnMappings = CopyStringMap(value.ColumnMappings)
|
||||
return value
|
||||
}
|
||||
|
||||
func copyGameClientBridgePayloadValue(value any) any {
|
||||
switch typed := value.(type) {
|
||||
case map[string]any:
|
||||
|
||||
Reference in New Issue
Block a user