Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

store package

Overview

Package store keeps Gnogolf's data (every record, best, board, standing, round in play and hole) apart from its rules, so a new version of the rules takes the data on instead of starting empty. It knows nothing of golf: a few ordered collections of string keys to string values, written only by the one realm it names as its writer (the rules: golf/v2 at the launch), read by anyone. A new writer takes over three days after its code is on chain and says so (the owner proposes it, it calls Ready), on its own; the owner can stop every write at once (Pause), start the same rules again at once (Resume), and renounce the role for good.

Function

Index

func Index(name, key string) int

Index is how many keys of a collection sort before key: its place, from 0 (O(log n) a step of a binary search, as golf v1's boards).

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-alexiscolin000/gnogolf/store.Index(,)"

Result