package dbdoor import "regexp" // ForwardBody is the db door's 409 for an instance a forwarding console can // read in its own region (db region forward spec ยง5.5 step 1). It is // additive to the {"error"} body every CLI reads, so an old CLI prints Error // as it is (DBF-14) and a new one switches to the forwarded read. type ForwardBody struct { Error string `json:"error"` Forward int `json:"forward"` Region string `json:"region"` ForwardOps []string `json:"forward_ops"` } // Forward is a DoorError's marker: where the data is, and which operations // the console forwards there. type Forward struct { Region string Ops []string } // forwardRegion is dbreads.ValidRegion's shape. dbreads imports this // package, so it is repeated here rather than imported. var forwardRegion = regexp.MustCompile(`^[a-z][a-z0-9-]{0,31}$`)