Remove pre-1.0 audit and protected request scaffolding

This commit is contained in:
npc0-hue
2026-08-20 23:42:02 +08:00
parent 40b35b05c7
commit a7e2e4c6c0
130 changed files with 526 additions and 3767 deletions
+5 -35
View File
@@ -87,7 +87,6 @@ type GameClientBridgeCommandResponse struct {
ResultSummary string `json:"resultSummary,omitempty"`
Result *GameClientBridgeCommandResultResponse `json:"result,omitempty"`
Cancellation *GameClientBridgeCommandCancellationResponse `json:"cancellation,omitempty"`
AuditReferences []string `json:"auditReferences,omitempty"`
ExpiresAt time.Time `json:"expiresAt"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
@@ -111,7 +110,6 @@ type GameClientBridgeSnapshotResponse struct {
ObservedAt time.Time `json:"observedAt"`
Payload map[string]any `json:"payload"`
Retention GameClientBridgeRetentionResponse `json:"retention"`
AuditReferences []string `json:"auditReferences,omitempty"`
CreatedAt time.Time `json:"createdAt"`
ExpiresAt time.Time `json:"expiresAt"`
}
@@ -163,11 +161,10 @@ type GameClientBridgeResultResponse struct {
}
type GameClientBridgeCancelResponse struct {
CommandID string `json:"commandId"`
State string `json:"state"`
Cancellation GameClientBridgeCommandCancellationResponse `json:"cancellation"`
AuditReferences []string `json:"auditReferences,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
CommandID string `json:"commandId"`
State string `json:"state"`
Cancellation GameClientBridgeCommandCancellationResponse `json:"cancellation"`
UpdatedAt time.Time `json:"updatedAt"`
}
type GameClientBridgeSnapshotIngestResponse struct {
@@ -181,19 +178,6 @@ type GameClientBridgeSnapshotIngestResponse struct {
ExpiresAt time.Time `json:"expiresAt"`
}
type GameClientBridgeAuditReferenceResponse struct {
ID string `json:"id"`
CommandID string `json:"commandId,omitempty"`
SnapshotID string `json:"snapshotId,omitempty"`
AuditEventID string `json:"auditEventId"`
CreatedAt time.Time `json:"createdAt"`
}
type GameClientBridgeAuditReferenceListResponse struct {
Items []GameClientBridgeAuditReferenceResponse `json:"items"`
Count int `json:"count"`
}
type GameClientBridgeProfileDeclarationResponse struct {
PluginID string `json:"pluginId"`
ProfileKey string `json:"profileKey"`
@@ -263,7 +247,6 @@ func GameClientBridgeCommandFromDomain(value domain.GameClientBridgeCommand) Gam
ApprovalState: string(value.ApprovalState),
RequesterID: value.RequesterID,
ResultSummary: value.Result.Summary,
AuditReferences: copyStrings(value.AuditReferences),
ExpiresAt: value.ExpiresAt,
CreatedAt: value.CreatedAt,
UpdatedAt: value.UpdatedAt,
@@ -294,7 +277,6 @@ func GameClientBridgeSnapshotFromDomain(value domain.GameClientBridgeSnapshot) G
ObservedAt: value.ObservedAt,
Payload: value.Payload,
Retention: gameClientBridgeRetentionFromDomain(value.Retention),
AuditReferences: copyStrings(value.AuditReferences),
CreatedAt: value.CreatedAt,
ExpiresAt: value.ExpiresAt,
}
@@ -344,25 +326,13 @@ func GameClientBridgeResultFromDomain(value domain.GameClientBridgeCommand) Game
func GameClientBridgeCancelFromDomain(value domain.GameClientBridgeCommand) GameClientBridgeCancelResponse {
value = domain.CopyGameClientBridgeCommand(value)
return GameClientBridgeCancelResponse{CommandID: value.ID, State: string(value.State), Cancellation: gameClientBridgeCommandCancellationFromDomain(value.Cancellation), AuditReferences: copyStrings(value.AuditReferences), UpdatedAt: value.UpdatedAt}
return GameClientBridgeCancelResponse{CommandID: value.ID, State: string(value.State), Cancellation: gameClientBridgeCommandCancellationFromDomain(value.Cancellation), UpdatedAt: value.UpdatedAt}
}
func GameClientBridgeSnapshotIngestFromDomain(value domain.GameClientBridgeSnapshot) GameClientBridgeSnapshotIngestResponse {
return GameClientBridgeSnapshotIngestResponse{SnapshotID: value.ID, ProfileKey: value.ProfileKey, Type: value.Type, SchemaVersion: value.SchemaVersion, StreamKey: value.StreamKey, Sequence: value.Sequence, AcceptedAt: value.CreatedAt, ExpiresAt: value.ExpiresAt}
}
func GameClientBridgeAuditReferenceFromDomain(value domain.GameClientBridgeAuditReference) GameClientBridgeAuditReferenceResponse {
return GameClientBridgeAuditReferenceResponse{ID: value.ID, CommandID: value.CommandID, SnapshotID: value.SnapshotID, AuditEventID: value.AuditEventID, CreatedAt: value.CreatedAt}
}
func GameClientBridgeAuditReferencesFromDomain(values []domain.GameClientBridgeAuditReference) GameClientBridgeAuditReferenceListResponse {
items := make([]GameClientBridgeAuditReferenceResponse, len(values))
for index, value := range values {
items[index] = GameClientBridgeAuditReferenceFromDomain(value)
}
return GameClientBridgeAuditReferenceListResponse{Items: items, Count: len(items)}
}
func GameClientBridgeStatusFromDomain(value domain.GameClientBridgeStatus) GameClientBridgeStatusResponse {
value = domain.CopyGameClientBridgeStatus(value)
profiles := make([]GameClientBridgeProfileDeclarationResponse, len(value.Profiles))