feat: gamemaster
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package adminpatch
|
||||
|
||||
// Stable error codes returned in `Result.ErrorCode`. The values match
|
||||
// the vocabulary frozen by `gamemaster/README.md §Error Model` and
|
||||
// `gamemaster/api/internal-openapi.yaml`. Service-layer callers (Stage
|
||||
// 19 handlers) import these names rather than redeclare them; renaming
|
||||
// any of them is a contract change.
|
||||
const (
|
||||
// ErrorCodeInvalidRequest reports that the request envelope failed
|
||||
// structural validation (empty GameID/Version, malformed semver).
|
||||
ErrorCodeInvalidRequest = "invalid_request"
|
||||
|
||||
// ErrorCodeRuntimeNotFound reports that no runtime_records row
|
||||
// exists for the requested game id.
|
||||
ErrorCodeRuntimeNotFound = "runtime_not_found"
|
||||
|
||||
// ErrorCodeRuntimeNotRunning reports that the runtime is not in
|
||||
// `running`. Patch is supported only for runtimes RTM can recreate
|
||||
// in place.
|
||||
ErrorCodeRuntimeNotRunning = "runtime_not_running"
|
||||
|
||||
// ErrorCodeEngineVersionNotFound reports that the requested target
|
||||
// version is missing from the engine_versions registry, or that it
|
||||
// is present but `status=deprecated`.
|
||||
ErrorCodeEngineVersionNotFound = "engine_version_not_found"
|
||||
|
||||
// ErrorCodeSemverPatchOnly reports that the requested target
|
||||
// version differs in major or minor from the current one. Patch
|
||||
// upgrades are constrained to same-major.minor.
|
||||
ErrorCodeSemverPatchOnly = "semver_patch_only"
|
||||
|
||||
// ErrorCodeConflict reports that the runtime's status changed
|
||||
// concurrently between the lookup and the post-RTM image rotation
|
||||
// CAS.
|
||||
ErrorCodeConflict = "conflict"
|
||||
|
||||
// ErrorCodeServiceUnavailable reports that a steady-state
|
||||
// dependency (PostgreSQL, Runtime Manager) was unreachable for
|
||||
// this call.
|
||||
ErrorCodeServiceUnavailable = "service_unavailable"
|
||||
|
||||
// ErrorCodeInternal reports an unexpected error not classified by
|
||||
// the other codes.
|
||||
ErrorCodeInternal = "internal_error"
|
||||
)
|
||||
Reference in New Issue
Block a user