validation

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package validation enforces Game Protocol 1 common semantic bounds. Domain consumers remain responsible for authorization and state validation.

Index

Constants

View Source
const (
	MaximumTextBytes        = 4096
	MaximumSafeMessageBytes = 512
	MinimumCoordinate       = -1_048_576
	MaximumCoordinate       = 1_048_575
)

Variables

View Source
var (
	ErrInvalidBound = errors.New("game protocol value violates a semantic bound")
)

Functions

func ContentID

func ContentID(value *gamev1.ContentId) error

func Digest

func Digest(value []byte) error

func Opaque16

func Opaque16(value []byte) error

func ResourceID

func ResourceID(value *gamev1.ResourceId) error

func Text

func Text(value string, maximum int) error

func TilePosition

func TilePosition(value *gamev1.TilePosition) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL