Remove pre-1.0 bridge governance scaffolding
This commit is contained in:
@@ -14,28 +14,10 @@ const (
|
||||
GameClientBridgeCommandExpired GameClientBridgeCommandState = "expired"
|
||||
)
|
||||
|
||||
type GameClientBridgeApprovalState string
|
||||
|
||||
const (
|
||||
GameClientBridgeApprovalNotRequired GameClientBridgeApprovalState = "not_required"
|
||||
GameClientBridgeApprovalPending GameClientBridgeApprovalState = "pending"
|
||||
GameClientBridgeApprovalApproved GameClientBridgeApprovalState = "approved"
|
||||
GameClientBridgeApprovalRejected GameClientBridgeApprovalState = "rejected"
|
||||
)
|
||||
|
||||
type GameClientBridgeApprovalLevel string
|
||||
|
||||
const (
|
||||
GameClientBridgeApprovalLevelNone GameClientBridgeApprovalLevel = "none"
|
||||
GameClientBridgeApprovalLevelOperator GameClientBridgeApprovalLevel = "operator"
|
||||
GameClientBridgeApprovalLevelPlatformAdmin GameClientBridgeApprovalLevel = "platform-admin"
|
||||
)
|
||||
|
||||
type GameClientBridgeCommandDeclaration struct {
|
||||
Type string
|
||||
Title string
|
||||
Permission string
|
||||
ApprovalLevel GameClientBridgeApprovalLevel
|
||||
PayloadSchemaRef string
|
||||
ResultSchemaRef string
|
||||
TimeoutSeconds int
|
||||
@@ -113,57 +95,11 @@ type GameClientBridgeDataPackDeclaration struct {
|
||||
DataRefs []string
|
||||
}
|
||||
|
||||
type GameClientBridgeOperationKind string
|
||||
|
||||
const (
|
||||
GameClientBridgeOperationKindRCON GameClientBridgeOperationKind = "rcon"
|
||||
GameClientBridgeOperationKindSQLiteMutation GameClientBridgeOperationKind = "sqlite-mutation"
|
||||
)
|
||||
|
||||
type GameClientBridgeOperationTemplateDeclaration struct {
|
||||
Key string
|
||||
Title string
|
||||
Permission string
|
||||
ApprovalLevel GameClientBridgeApprovalLevel
|
||||
Kind GameClientBridgeOperationKind
|
||||
TransportKey string
|
||||
TargetKey string
|
||||
PayloadSchemaRef string
|
||||
ResultSchemaRef string
|
||||
ConfirmationSchemaRef string
|
||||
TimeoutSeconds int
|
||||
MaxPayloadBytes int
|
||||
MaxRowsAffected int
|
||||
Mutation GameClientBridgeOperationMutationDeclaration
|
||||
Safety GameClientBridgeOperationSafety
|
||||
}
|
||||
|
||||
type GameClientBridgeOperationMutationDeclaration struct {
|
||||
FieldKey string
|
||||
TableKey string
|
||||
IdentityKey string
|
||||
ValueKey string
|
||||
ConfirmationQueryKey string
|
||||
AllowedValueType string
|
||||
MinValue float64
|
||||
MaxValue float64
|
||||
}
|
||||
|
||||
type GameClientBridgeOperationSafety struct {
|
||||
RequiresApproval bool
|
||||
RequiresOfflinePlayer bool
|
||||
RequiresMaintenanceWindow bool
|
||||
RequiresBeforeValue bool
|
||||
RequiresConfirmation bool
|
||||
BackupRequired bool
|
||||
}
|
||||
|
||||
type GameClientBridgePageContract struct {
|
||||
PageKey string
|
||||
CommandTypes []string
|
||||
SnapshotTypes []string
|
||||
QueryTemplateKeys []string
|
||||
OperationKeys []string
|
||||
FeatureKeys []string
|
||||
}
|
||||
|
||||
@@ -192,16 +128,15 @@ type GameClientBridgeCompanionDeclaration struct {
|
||||
}
|
||||
|
||||
type GameClientBridgeManifest struct {
|
||||
Commands []GameClientBridgeCommandDeclaration
|
||||
Snapshots []GameClientBridgeSnapshotDeclaration
|
||||
QueryTemplates []GameClientBridgeQueryTemplateDeclaration
|
||||
LogProjections []GameClientBridgeLogProjectionDeclaration
|
||||
DataPacks []GameClientBridgeDataPackDeclaration
|
||||
OperationTemplates []GameClientBridgeOperationTemplateDeclaration
|
||||
Retention GameClientBridgeRetention
|
||||
Pages []GameClientBridgePageContract
|
||||
Features []GameClientBridgeFeatureDeclaration
|
||||
Companion GameClientBridgeCompanionDeclaration
|
||||
Commands []GameClientBridgeCommandDeclaration
|
||||
Snapshots []GameClientBridgeSnapshotDeclaration
|
||||
QueryTemplates []GameClientBridgeQueryTemplateDeclaration
|
||||
LogProjections []GameClientBridgeLogProjectionDeclaration
|
||||
DataPacks []GameClientBridgeDataPackDeclaration
|
||||
Retention GameClientBridgeRetention
|
||||
Pages []GameClientBridgePageContract
|
||||
Features []GameClientBridgeFeatureDeclaration
|
||||
Companion GameClientBridgeCompanionDeclaration
|
||||
}
|
||||
|
||||
type GameClientBridgeResultStatus string
|
||||
@@ -224,7 +159,6 @@ type GameClientBridgeCommand struct {
|
||||
IdempotencyKey string
|
||||
Priority int
|
||||
State GameClientBridgeCommandState
|
||||
ApprovalState GameClientBridgeApprovalState
|
||||
RequesterID string
|
||||
Claim GameClientBridgeClaim
|
||||
Cancellation GameClientBridgeCancellation
|
||||
@@ -489,14 +423,12 @@ func CopyGameClientBridgeManifest(value GameClientBridgeManifest) GameClientBrid
|
||||
value.DataPacks[index].ConfigMapRefs = CopyStringSlice(value.DataPacks[index].ConfigMapRefs)
|
||||
value.DataPacks[index].DataRefs = CopyStringSlice(value.DataPacks[index].DataRefs)
|
||||
}
|
||||
value.OperationTemplates = append([]GameClientBridgeOperationTemplateDeclaration(nil), value.OperationTemplates...)
|
||||
value.Pages = append([]GameClientBridgePageContract(nil), value.Pages...)
|
||||
value.Features = append([]GameClientBridgeFeatureDeclaration(nil), value.Features...)
|
||||
for index := range value.Pages {
|
||||
value.Pages[index].CommandTypes = CopyStringSlice(value.Pages[index].CommandTypes)
|
||||
value.Pages[index].SnapshotTypes = CopyStringSlice(value.Pages[index].SnapshotTypes)
|
||||
value.Pages[index].QueryTemplateKeys = CopyStringSlice(value.Pages[index].QueryTemplateKeys)
|
||||
value.Pages[index].OperationKeys = CopyStringSlice(value.Pages[index].OperationKeys)
|
||||
value.Pages[index].FeatureKeys = CopyStringSlice(value.Pages[index].FeatureKeys)
|
||||
}
|
||||
for index := range value.Features {
|
||||
|
||||
@@ -10,9 +10,8 @@ func TestCopyGameClientBridgeDeclarationsCopiesQueryTemplateSlices(t *testing.T)
|
||||
Target: GameClientBridgeLogProjectionTargetDeclaration{Collection: "users", UpsertKeys: []string{"steamId"}, CaptureMappings: map[string]string{"steamId": "steamId"}, FixedValues: map[string]string{"source": "stdout"}, ObservedAtField: "lastLoginAt"},
|
||||
Presence: &GameClientBridgeLogProjectionPresenceDeclaration{TimestampField: "lastLoginAt", ActiveWindowSeconds: 600, ActivityTarget: &GameClientBridgeLogProjectionTargetDeclaration{Collection: "activity", UpsertKeys: []string{"steamId"}, CaptureMappings: map[string]string{"steamId": "steamId"}}},
|
||||
}},
|
||||
DataPacks: []GameClientBridgeDataPackDeclaration{{Key: "db-v1", LogParserRefs: []string{"logs.json"}, ConfigMapRefs: []string{"config.json"}, DataRefs: []string{"data.json"}}},
|
||||
OperationTemplates: []GameClientBridgeOperationTemplateDeclaration{{Key: "player.fame.set"}},
|
||||
Pages: []GameClientBridgePageContract{{PageKey: "players", QueryTemplateKeys: []string{"player.lookup"}, OperationKeys: []string{"player.fame.set"}}},
|
||||
DataPacks: []GameClientBridgeDataPackDeclaration{{Key: "db-v1", LogParserRefs: []string{"logs.json"}, ConfigMapRefs: []string{"config.json"}, DataRefs: []string{"data.json"}}},
|
||||
Pages: []GameClientBridgePageContract{{PageKey: "players", QueryTemplateKeys: []string{"player.lookup"}}},
|
||||
}
|
||||
manifestCopy := CopyGameClientBridgeManifest(manifest)
|
||||
manifestCopy.QueryTemplates[0].Key = "mutated"
|
||||
@@ -22,10 +21,8 @@ func TestCopyGameClientBridgeDeclarationsCopiesQueryTemplateSlices(t *testing.T)
|
||||
manifestCopy.LogProjections[0].Presence.ActivityTarget.CaptureMappings["steamId"] = "mutated"
|
||||
manifestCopy.DataPacks[0].LogParserRefs[0] = "mutated"
|
||||
manifestCopy.DataPacks[0].DataRefs[0] = "mutated"
|
||||
manifestCopy.OperationTemplates[0].Key = "mutated"
|
||||
manifestCopy.Pages[0].QueryTemplateKeys[0] = "mutated"
|
||||
manifestCopy.Pages[0].OperationKeys[0] = "mutated"
|
||||
if manifest.QueryTemplates[0].Key != "player.lookup" || manifest.QueryTemplates[0].RowTarget.ColumnMappings["userId"] != "user_id" || manifest.LogProjections[0].StreamKeys[0] != "process.stdout" || manifest.LogProjections[0].Target.CaptureMappings["steamId"] != "steamId" || manifest.LogProjections[0].Presence.ActivityTarget.CaptureMappings["steamId"] != "steamId" || manifest.DataPacks[0].LogParserRefs[0] != "logs.json" || manifest.DataPacks[0].DataRefs[0] != "data.json" || manifest.OperationTemplates[0].Key != "player.fame.set" || manifest.Pages[0].QueryTemplateKeys[0] != "player.lookup" || manifest.Pages[0].OperationKeys[0] != "player.fame.set" {
|
||||
if manifest.QueryTemplates[0].Key != "player.lookup" || manifest.QueryTemplates[0].RowTarget.ColumnMappings["userId"] != "user_id" || manifest.LogProjections[0].StreamKeys[0] != "process.stdout" || manifest.LogProjections[0].Target.CaptureMappings["steamId"] != "steamId" || manifest.LogProjections[0].Presence.ActivityTarget.CaptureMappings["steamId"] != "steamId" || manifest.DataPacks[0].LogParserRefs[0] != "logs.json" || manifest.DataPacks[0].DataRefs[0] != "data.json" || manifest.Pages[0].QueryTemplateKeys[0] != "player.lookup" {
|
||||
t.Fatalf("manifest copy aliases query template declarations: source=%#v copy=%#v", manifest, manifestCopy)
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ type PluginLifecycleRequest struct {
|
||||
Operation PluginLifecycleOperation
|
||||
TargetVersion string
|
||||
IdempotencyKey string
|
||||
Confirmed bool
|
||||
}
|
||||
|
||||
type PluginLifecycleResult struct {
|
||||
|
||||
@@ -372,7 +372,6 @@ type GamePluginManifestAI struct {
|
||||
type GamePluginProductionLifecycle struct {
|
||||
Operations []string
|
||||
DependencyPolicy string
|
||||
ApprovalRequired []string
|
||||
}
|
||||
|
||||
type GamePluginRemoteAccess struct {
|
||||
@@ -1068,7 +1067,6 @@ const (
|
||||
JobCapabilityRemoteRunDBSQLiteQuery = "remote.run.db.sqlite.query"
|
||||
JobCapabilityRemoteRunLogsTransfer = "remote.run.logs.transfer"
|
||||
JobCapabilityRemoteRunRCONCommand = "remote.run.rcon.command"
|
||||
JobCapabilityRemoteRunProtectedSQL = "remote.run.protected.sql"
|
||||
JobCapabilityRemoteRunProgram = "remote.run.program.command"
|
||||
JobCapabilityRunSelfUpdate = "run.self-update"
|
||||
JobCapabilityDistributionBuild = "distribution.build"
|
||||
@@ -1749,7 +1747,6 @@ func CopyPluginCreateFields(fields []PluginCreateField) []PluginCreateField {
|
||||
|
||||
func CopyGamePluginProductionLifecycle(lifecycle GamePluginProductionLifecycle) GamePluginProductionLifecycle {
|
||||
lifecycle.Operations = CopyStringSlice(lifecycle.Operations)
|
||||
lifecycle.ApprovalRequired = CopyStringSlice(lifecycle.ApprovalRequired)
|
||||
return lifecycle
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user