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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

sharedpoll state

Back to all declarations

sharedPath

untyped string

sharedPath is the reviewed shared membership realm this app is bound to.

Value

"gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/remixlab/sharedmembers"

sharedReader

type

sharedReader adapts the shared membership realm to core.MembershipReader. It is read-only: it can look roles up and take snapshots, nothing else.

Value

sharedpoll.sharedReader

electorate

sharedpoll.sharedReader

electorate is the membership source for poll electorates. Tests replace it with a local fake; production code never reassigns it.

Open
OID
07600d…da66:4
electorate details

Inspect ref

Render

func(path string) string

Render serves the overview, the poll list and single polls.

Open
OID
07600d…da66:5
Render details

Inspect func

renderPollTable

func(list []v1.BallotView) string
Open
OID
07600d…da66:8
renderPollTable details

Inspect func

renderPoll

func(v v1.BallotView) string
Open
OID
07600d…da66:9
renderPoll details

Inspect func

pkgPath

untyped string

Value

"gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/remixlab/sharedpoll"

recipeID

untyped string

Value

"shared-poll-demo"

recipeVersion

untyped string

Value

"1.0.0"

pageSize

untyped bigint

Value

(25 <untyped> bigint)

optionSep

untyped string

Value

"|"

configDigest

untyped string

Value

"unset"

opAdmins

untyped string

Value

"admins.manage"

opCreate

untyped string

Value

"poll.create"

opOpen

untyped string

Value

"poll.open"

opPolicy

untyped string

Value

"policy.set"

Descriptor

func() v1.AppDescriptor

Descriptor identifies this app's recipe, components and bindings.

Open
OID
07600d…da66:16
Descriptor details

Inspect func

AddAdmin

func(addr .uverse.address, role string)

AddAdmin grants addr a local administrative role ("reviewer" or "owner").

Open
OID
07600d…da66:17
AddAdmin details

Inspect func

RemoveAdmin

func(addr .uverse.address)

RemoveAdmin removes a local administrator.

Open
OID
07600d…da66:18
RemoveAdmin details

Inspect func

CreatePoll

func(title string, options string, durationSeconds int64) uint64

CreatePoll creates a draft poll. options are separated by "|".

Open
OID
07600d…da66:19
CreatePoll details

Inspect func

CancelPoll

func(id uint64)

CancelPoll deletes a draft poll that was never opened. The poll's creator may cancel it, and so may anyone allowed to open polls.

Open
OID
07600d…da66:20
CancelPoll details

Inspect func

OpenPoll

func(id uint64)

OpenPoll snapshots the shared realm's current members as the electorate.

Open
OID
07600d…da66:21
OpenPoll details

Inspect func

Vote

func(id uint64, choice int)

Vote casts the caller's vote for option index choice.

Open
OID
07600d…da66:22
Vote details

Inspect func

Finalize

func(id uint64)

Finalize commits a poll's result once its deadline has passed.

Open
OID
07600d…da66:23
Finalize details

Inspect func

SetRule

func(op string, rule string)

SetRule changes the rule for an operation, within its floor.

Open
OID
07600d…da66:24
SetRule details

Inspect func

Poll

func(id uint64) (v1.BallotView, bool)

Poll returns an inert summary of poll id.

Open
OID
07600d…da66:25
Poll details

Inspect func

Polls

func(offset int, limit int) []v1.BallotView

Polls pages through polls, newest first.

Open
OID
07600d…da66:26
Polls details

Inspect func

AdminRole

func(addr .uverse.address) string

AdminRole returns addr's local administrative role name ("none" when addr is not an administrator).

Open
OID
07600d…da66:27
AdminRole details

Inspect func

HasVoted

func(id uint64, addr .uverse.address) bool

HasVoted reports whether addr voted in poll id.

Open
OID
07600d…da66:28
HasVoted details

Inspect func

authorize

func(op string) .uverse.address
Open
OID
07600d…da66:29
authorize details

Inspect func
sharedPath : untyped string ="gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/remixlab/sharedmembers"
sharedReader : type =sharedpoll.sharedReader
electorate : sharedpoll.sharedReader Inspect
Render : func(path string) string Inspect
renderHome : func() string Inspect
renderPollTable : func(list []v1.BallotView) string Inspect
renderPoll : func(v v1.BallotView) string Inspect
pkgPath : untyped string ="gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/remixlab/sharedpoll"
recipeID : untyped string ="shared-poll-demo"
recipeVersion : untyped string ="1.0.0"
pageSize : untyped bigint =(25 <untyped> bigint)
optionSep : untyped string ="|"
configDigest : untyped string ="unset"
opAdmins : untyped string ="admins.manage"
opCreate : untyped string ="poll.create"
opOpen : untyped string ="poll.open"
opPolicy : untyped string ="policy.set"
admins : *v1.Set Inspect
policy : *v1.Policy Inspect
polls : *v1.Box Inspect
init.20 : func() Inspect
setup : func(owner .uverse.address) Inspect
Descriptor : func() v1.AppDescriptor Inspect
AddAdmin : func(addr .uverse.address, role string) Inspect
RemoveAdmin : func(addr .uverse.address) Inspect
CreatePoll : func(title string, options string, durationSeconds int64) uint64 Inspect
CancelPoll : func(id uint64) Inspect
OpenPoll : func(id uint64) Inspect
Vote : func(id uint64, choice int) Inspect
Finalize : func(id uint64) Inspect
SetRule : func(op string, rule string) Inspect
Poll : func(id uint64) (v1.BallotView, bool) Inspect
Polls : func(offset int, limit int) []v1.BallotView Inspect
AdminRole : func(addr .uverse.address) string Inspect
HasVoted : func(id uint64, addr .uverse.address) bool Inspect
authorize : func(op string) .uverse.address Inspect
ready : func() Inspect
must : func(err .uverse.error) Inspect