oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package runnerproto
2
3import "unicode/utf8"
4
5const MaxCoordinatorTextBytes = 32 << 10
6const MaxCoordinatorTextEvents = 1024
7
8// CoordinatorText is a replaceable draft, never proof of delivery.
9// Snapshots make HTTP retries idempotent without duplicating text.
10type CoordinatorText struct {
11 Text string `json:"text"`
12}
13
14func (v CoordinatorText) Validate() error {
15 if len(v.Text) == 0 || len(v.Text) > MaxCoordinatorTextBytes || !utf8.ValidString(v.Text) {
16 return ErrInvalid
17 }
18 return nil
19}
20