asobi_ops_tournaments (asobi v0.84.0)
View SourceTournament reads for the ops plane: the list, and one tournament.
The public route answers a player's question - what can I enter - and returns
a bare list with a fixed order and no total. An operator's question is
whether a tournament that says it is running actually is, which is the live
flag: a row can be status => "active" with no process behind it after a
node restart, and that difference is invisible to every other read.
live is read from the global registry, never by calling the tournament
process. A list of forty tournaments must not be forty gen_server:calls,
and a lookup must not be able to hang on one busy tournament.
Summary
Functions
Positive allowlist of the fields a tournament may carry off this endpoint,
plus the live flag.
Wire-name to column mapping this endpoint accepts in ?sort=.
Functions
Positive allowlist of the fields a tournament may carry off this endpoint,
plus the live flag.
Narrower than the public asobi_tournament_controller:show/1, which returns
the whole row: metadata is game-authored and does not leave. entry_fee
and rewards do - they are the operator's own configuration and the point of
the screen.
-spec query(asobi_ops_params:params()) -> {ok, #kura_query{from :: atom() | module() | undefined, select :: [atom() | term()] | {exprs, [term()]}, wheres :: [term()], joins :: [term()], order_bys :: [term()], group_bys :: [atom()], havings :: [term()], limit :: non_neg_integer() | undefined, offset :: non_neg_integer() | undefined, distinct :: boolean() | [atom()], lock :: binary() | undefined, prefix :: binary() | undefined, preloads :: [atom() | {atom(), list()}], ctes :: [{binary(), #kura_query{}}], combinations :: [{union | union_all | intersect | except, #kura_query{}}], include_deleted :: boolean()}} | {error, {unknown_sort, binary()} | {unknown_order, binary()} | {invalid_filter, binary()}}.
-spec sortable() -> asobi_ops_params:sort_allowlist().
Wire-name to column mapping this endpoint accepts in ?sort=.