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

definition package

Functions

DeleteAll

func DeleteAll(cur realm)

DeleteAll removes all definitions so an administrator can reload the catalog.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/beta/definition" -func "DeleteAll" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "http://127.0.0.1:26657" ADDRESSgnokey query -remote "http://127.0.0.1:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/beta/definition" -func "DeleteAll" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://127.0.0.1:26657" call.tx
  

Get

func Get(key string) []map[string]string

Get returns ordered field records. An empty list means the key is absent; stored definitions always contain at least one field.

Param

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/akkadia/beta/definition.Get()"

Result

GetField

func GetField(key, fieldKey string) map[string]string

GetField includes "value" even when it is empty. An empty map means absent.

Params

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/akkadia/beta/definition.GetField(,)"

Result

GetKeyCount

func GetKeyCount() int

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/akkadia/beta/definition.GetKeyCount()"

Result

ListKeys

func ListKeys(page, count int) []string

Params

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/akkadia/beta/definition.ListKeys(,)"

Result

Render

func Render(path string) string

Param

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/akkadia/beta/definition.Render()"

Result

SetDefinitions

func SetDefinitions(cur realm, keys, values string)

SetDefinitions accepts URL-escaped keys and query-encoded field objects as paired comma-separated strings, so MsgCall can pass a batch without realm DTOs.

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/beta/definition" -func "SetDefinitions" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "http://127.0.0.1:26657" ADDRESSgnokey query -remote "http://127.0.0.1:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/beta/definition" -func "SetDefinitions" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://127.0.0.1:26657" call.tx