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 state

Back to all declarations

DELAY

untyped bigint

// seconds of block time

Value

(259200 <untyped> bigint)

maxKey

untyped bigint

The bounds of every call: none can be made to run, or to store, unbounded.

Value

(256 <untyped> bigint)

maxValue

untyped bigint

The bounds of every call: none can be made to run, or to store, unbounded.

Value

(65536 <untyped> bigint)

maxPage

untyped bigint

The bounds of every call: none can be made to run, or to store, unbounded.

Value

(300 <untyped> bigint)

maxOps

untyped bigint

The bounds of every call: none can be made to run, or to store, unbounded.

Value

(64 <untyped> bigint)

maxName

untyped bigint

The bounds of every call: none can be made to run, or to store, unbounded.

Value

(32 <untyped> bigint)

self

string

Value

"gno.land/r/nym-alexiscolin000/gnogolf/store"

writer

string

Value

"gno.land/r/nym-alexiscolin000/gnogolf/golf/v2"

proposed

string

Value

""

at

int64

Value

0

paused

string

Value

""

owner

.uverse.address

Value

<gnolang.StringValue>

pending

.uverse.address

Value

<zero>

standard

[]string (len=17)

the collections v2 keeps its data in, made at deploy: a first save never pays a whole new tree

Open
OID
093f99…7910:13
standard details (len=17)

+17 more Inspect slice

seeded

func() *v0.BPTree

seeded is a collection whose first leaf the deployer pays, not its first player: its key "", which no write can make (checkKey) and no read shows, sorts before every other.

Open
OID
093f99…7910:16
seeded details

Inspect func

Writer

func() string

Writer is the realm whose writes store takes now: the proposed one once its delay is over ("" while paused).

Open
OID
093f99…7910:17
Writer details

Inspect func

Proposed

func() (string, int64)

Proposed is the writer proposed and when it takes over (unix seconds; 0 while its code has not called Ready), or "" and 0.

Open
OID
093f99…7910:19
Proposed details

Inspect func

settle

func()

settle makes a proposed writer whose delay is over the writer, as it is already for every read (Writer).

Open
OID
093f99…7910:20
settle details

Inspect func

gate

func()

gate lets the writer through, and only it: the immediate caller's pkgpath, never the signer (an account, a MsgRun script or another realm is refused). A proposed writer whose delay is over becomes the writer at its first write.

Open
OID
093f99…7910:22
gate details

Inspect func

Propose

func(pkgpath string)

Propose names the next writer, a realm's pkgpath under gno.land/r/. Only the owner can; a new proposal replaces the last. Its delay starts when that realm, on chain, calls Ready: its code can then be read, as it will run.

Open
OID
093f99…7910:24
Propose details

Inspect func

Ready

func()

Ready is the proposed writer's own call, once it is on chain: it takes over DELAY later, with no transaction to send. Only that realm can, once.

Open
OID
093f99…7910:25
Ready details

Inspect func

validPkgPath

func(p string) bool

validPkgPath is golf v1's: gno.land/r/, up to 100 of a-z, 0-9 and \_-/., no "", "." or ".." segment.

Open
OID
093f99…7910:26
validPkgPath details

Inspect func

Cancel

func()

Cancel drops the proposed writer before it takes over. Only the owner can.

Open
OID
093f99…7910:27
Cancel details

Inspect func

Pause

func()

Pause stops every write at once (the reads go on), and drops any proposal. Only the owner can: for a bug in the rules, or one feared. Resume starts the same rules again at once; new rules take their delay.

Open
OID
093f99…7910:28
Pause details

Inspect func

Resume

func()

Resume starts again, at once, the rules a Pause stopped: their code was in force already, so nothing new runs. Only the owner can.

Open
OID
093f99…7910:29
Resume details

Inspect func

drop

func()

drop forgets a proposal not in force, and says so.

Open
OID
093f99…7910:30
drop details

Inspect func

Transfer

func(to .uverse.address)

Transfer offers the owner's role, which the address offered takes with Accept.

Open
OID
093f99…7910:31
Transfer details

Inspect func

Accept

func()

Accept takes the role offered.

Open
OID
093f99…7910:32
Accept details

Inspect func

Renounce

func()

Renounce gives the role up for good: the writer can then never change, nor be paused; a proposal not yet in force is dropped. Only the owner can, and not while paused: no rules could ever write again.

Open
OID
093f99…7910:33
Renounce details

Inspect func

set

func(name string, k string, v string)

(a string is a value: what store keeps is its own, never the caller's slice)

Open
OID
093f99…7910:36
set details

Inspect func

Set

func(name string, key string, value string)

Set keeps value under key in a collection. The writer only.

Open
OID
093f99…7910:37
Set details

Inspect func

Remove

func(name string, key string) bool

Remove drops a key from a collection, reporting whether it was there. The writer only.

Open
OID
093f99…7910:38
Remove details

Inspect func

Batch

func(ops []string)

Batch applies a save's writes in one call: ops is "set", collection, key, value or "del", collection, key, "" (four strings an op), at most 64 ops. A transaction is all or nothing: a bad op undoes the whole batch.

Open
OID
093f99…7910:39
Batch details

Inspect func

Make

func(name string)

Make adds a collection, for rules that need one more. The writer only.

Open
OID
093f99…7910:40
Make details

Inspect func

Get

func(name string, key string) (string, bool)

Get is a key's value in a collection, and whether it is there.

Open
OID
093f99…7910:41
Get details

Inspect func

Has

func(name string, key string) bool

Has reports whether a collection holds a key.

Open
OID
093f99…7910:42
Has details

Inspect func

Size

func(name string) int

Size is how many keys a collection holds.

Open
OID
093f99…7910:43
Size details

Inspect func

Index

func(name string, 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).

Open
OID
093f99…7910:44
Index details

Inspect func

At

func(name string, i int) (string, string)

At is the key and value at a place in a collection's order.

Open
OID
093f99…7910:45
At details

Inspect func

Page

func(name string, start string, end string, limit int) string

Page is up to limit keys of a collection from start (included) to end (excluded; "" to its end), in order, as rows one after another: each the key's length, ":", the key, the value's length, ":", the value (no separator to escape: the lengths say where each ends). limit is 1 to 300.

Open
OID
093f99…7910:46
Page details

Inspect func

PageBack

func(name string, start string, end string, limit int) string

PageBack is Page from end (kept, as bptree's back walk) down to start.

Open
OID
093f99…7910:47
PageBack details

Inspect func

PageAt

func(name string, offset int, limit int) string

PageAt is up to limit keys from the offset-th of a collection (from 0), as Page's rows.

Open
OID
093f99…7910:48
PageAt details

Inspect func

page

func(name string, start string, end string, limit int, back bool) string
Open
OID
093f99…7910:49
page details

Inspect func

row

func(sb *strings.Builder, k string, v string)

row writes one key and its value into a page.

Open
OID
093f99…7910:50
row details

Inspect func

Render

func(path string) string

Render says who writes, what is proposed and who may change it.

Open
OID
093f99…7910:51
Render details

Inspect func
DELAY : untyped bigint =(259200 <untyped> bigint)
maxKey : untyped bigint =(256 <untyped> bigint)
maxValue : untyped bigint =(65536 <untyped> bigint)
maxPage : untyped bigint =(300 <untyped> bigint)
maxOps : untyped bigint =(64 <untyped> bigint)
maxName : untyped bigint =(32 <untyped> bigint)
self : string ="gno.land/r/nym-alexiscolin000/gnogolf/store"
writer : string ="gno.land/r/nym-alexiscolin000/gnogolf/golf/v2"
proposed : string =""
at : int64 =0
paused : string =""
owner : .uverse.address =<gnolang.StringValue>
pending : .uverse.address =<zero>
colls : map[string]*v0.BPTree Inspect
standard : []string (len=17) Inspect
init.15 : func() Inspect
seeded : func() *v0.BPTree Inspect
Writer : func() string Inspect
matured : func() bool Inspect
Proposed : func() (string, int64) Inspect
settle : func() Inspect
Owner : func() .uverse.address Inspect
gate : func() Inspect
onlyOwner : func(what string) Inspect
Propose : func(pkgpath string) Inspect
Ready : func() Inspect
validPkgPath : func(p string) bool Inspect
Cancel : func() Inspect
Pause : func() Inspect
Resume : func() Inspect
drop : func() Inspect
Transfer : func(to .uverse.address) Inspect
Accept : func() Inspect
Renounce : func() Inspect
coll : func(name string) *v0.BPTree Inspect
checkKey : func(k string) Inspect
set : func(name string, k string, v string) Inspect
Set : func(name string, key string, value string) Inspect
Remove : func(name string, key string) bool Inspect
Batch : func(ops []string) Inspect
Make : func(name string) Inspect
Get : func(name string, key string) (string, bool) Inspect
Has : func(name string, key string) bool Inspect
Size : func(name string) int Inspect
Index : func(name string, key string) int Inspect
At : func(name string, i int) (string, string) Inspect
Page : func(name string, start string, end string, limit int) string Inspect
PageBack : func(name string, start string, end string, limit int) string Inspect
PageAt : func(name string, offset int, limit int) string Inspect
page : func(name string, start string, end string, limit int, back bool) string Inspect
row : func(sb *strings.Builder, k string, v string) Inspect
Render : func(path string) string Inspect