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

data package

Overview

Package data keeps GnoRadio's state apart from its rules. It knows nothing of music: ordered collections of string keys to string values, and a vault for the coins of promo budgets (vault.gno).

Each collection belongs to a role, the prefix of its name ("catalog/…"). Only that role's writer realm writes it; anyone reads. A release (new writers for one or more roles) takes over DELAY after every new realm said Ready, all at once, and no data moves. The owner proposes and cancels releases, pauses and resumes roles, passes the role on or renounces it, and can replace the guardian 2x DELAY after saying so. The guardian can only pause and cancel a release. This realm is never replaced: keep it small.

Function

Index

func Index(name, key string) int

Index is the number of keys before key: Index(c, b) - Index(c, a) counts the keys in [a, b) without a counter. O(log² n).

Params

Command

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

Result