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

v0 state

Back to all declarations

Impl

type

Impl is the contract an implementation realm must satisfy. This interface is the one thing here that can never change: it is compiled into every caller.

Value

v0.Impl

prefix

untyped string

prefix is the only gate. An implementation must live under it. gno ships p/nt/nestedpkg/v0 for exactly this check, but its AssertCallerIsSubPath wants the implementation nested UNDER the facade's own path, and with the version segment last (facade/v0, impl/v0) no sibling is a sub-path of another. IsSameNamespace is the other shipped option and is far too loose: it would let any realm in the whole namespace seize this one. Hence an explicit prefix.

Value

"gno.land/r/moul/x/upgrade/selfreg/impl/"

StageOpen

untyped bigint

// any realm under the prefix takes over by deploying

Value

(0 <untyped> bigint)

StageSealed

untyped bigint

// nothing may register again, the live implementation is final

Value

(1 <untyped> bigint)

livePath

string

Value

"gno.land/r/moul/x/upgrade/selfreg/impl/v1"

stage

int

Value

0

Register

func(impl v0.Impl)

Register makes the calling realm the live implementation. Called from the implementation's own init, so deploying IS the upgrade.

Open
OID
0cf1dd…8f81:6
Register details

Inspect func

Seal

func()

Seal ends this realm's upgradeability, forever. Callable only by the implementation currently serving, because with no owner that is the only actor the facade already trusts. It grants nothing new: whoever could deploy under the prefix could already take the realm over, and this only lets them make that the last word. One-way, and there is no rung above it.

Open
OID
0cf1dd…8f81:8
Seal details

Inspect func

Stage

func() int

Stage is the rung this realm is on. It only ever goes up.

Open
OID
0cf1dd…8f81:9
Stage details

Inspect func

StageName

func() string

StageName is Stage as the word a caller reads in Render.

Open
OID
0cf1dd…8f81:10
StageName details

Inspect func

Live

func() string

Live is the package path currently serving, or "" before the first deploy.

Open
OID
0cf1dd…8f81:11
Live details

Inspect func

Greet

func(name string) string

Greet forwards to the live implementation.

Open
OID
0cf1dd…8f81:12
Greet details

Inspect func

Version

func() string

Version reports the live implementation's own version string.

Open
OID
0cf1dd…8f81:13
Version details

Inspect func
Impl : type =v0.Impl
prefix : untyped string ="gno.land/r/moul/x/upgrade/selfreg/impl/"
StageOpen : untyped bigint =(0 <untyped> bigint)
StageSealed : untyped bigint =(1 <untyped> bigint)
live : v1.greeter Inspect
livePath : string ="gno.land/r/moul/x/upgrade/selfreg/impl/v1"
stage : int =0
Register : func(impl v0.Impl) Inspect
Seal : func() Inspect
Stage : func() int Inspect
StageName : func() string Inspect
Live : func() string Inspect
Greet : func(name string) string Inspect
Version : func() string Inspect
assertLive : func() Inspect
Render : func(string) string Inspect