choice
typechoice is what a court's moderators decided: which server, and who said so. THE SETTER IS STORED, not only emitted. The event carries it too, and the event is the history — but kourt.xyz reads this realm over qeval and has no indexer, so a service that recorded "listed, signed by" from the event alone would need one. Reading it back is one lookup on a page that already does one.
Value
guilds.choice
guildOf
*v0.BPTreeguildOf is court slug -> choice. One server per court: a court with two is a court whose readers are told different things by the same page. A bptree rather than an avl tree because kourtv2 uses one for every ordered map it keeps, and Courts() wants slug order.
- OID
- 071e41…a173:4
guildOf details
Set
func(courtSlug string, guildID string)Set records the guild for a court, or clears it when guildID is empty. THE CALLER IS THE MODERATOR, NOT THIS REALM. cur.Previous().Address() is who asked, and kourt.IsCourtMod is the only thing consulted — so a moderator removed by the court loses this at the same moment, with no state here to keep in step. IsCourtMod panics on a court that does not exist, which is the answer we want: there is nothing to bind.
- OID
- 071e41…a173:6
Set details
GuildOf
func(courtSlug string) stringGuildOf is the court's chosen server, or "" if it has none. Never panics: the service asks this about every court it knows, including ones that never chose.
- OID
- 071e41…a173:8
GuildOf details
Chosen
func(courtSlug string) (guildID string, by string)Chosen is the whole record: the server, and the address that chose it. ONE READ AND NOT TWO, and this exists for that reason alone. kourt.xyz asks both questions together and acts on the pair — it publishes the guild AND records the setter as who signed for it — and two qeval calls can straddle a change. A moderator re-aiming the binding between them hands one decision's guild to another decision's signer, which is then written into the site's database as fact. A pair that cannot be read atomically should not be read as a pair. BOTH EMPTY OR NEITHER. A court that never chose answers ("", ""), which is the commonest answer and is not an error. THE SETTER IS WHO ASKED, NOT WHO MODERATES NOW. A court that replaces its moderators does not change this — the choice was made by whoever made it, and rewriting that would destroy the only record of who did. Whether they STILL moderate is a separate question, and kourtv2 is the one to ask it. STRINGS AND NOT AN address, because the caller is a machine reading qeval's printed output: an address prints as \`("g1…" .uverse.address)\` and a string as \`("g1…" string)\`, and the second is the one a parser can hold to.
- OID
- 071e41…a173:9
Chosen details
Courts
func() []stringCourts lists every court that has chosen a server, in slug order — so the service can reconcile the whole set without knowing what to ask for.
- OID
- 071e41…a173:10
Courts details
Render
func(path string) string- OID
- 071e41…a173:11