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

v1 state

Back to all declarations

cEvents

untyped string

// P(id) -> event record

Value

"tickets/events"

cTickets

untyped string

// P((id-1)/16) -> 16 ticket records

Value

"tickets/tickets"

cByArtist

untyped string

// P(artist)/P(event) -> ""

Value

"tickets/byartist"

cUpcoming

untyped string

// T(start)/P(event) -> "" (not cancelled, not hidden)

Value

"tickets/upcoming"

cAhead

untyped string

// P(artist)/T(start)/P(event) -> "" (not cancelled)

Value

"tickets/ahead"

cOwned

untyped string

// address -> packed ticket ids held

Value

"tickets/owned"

cBuyers

untyped string

// P(event)/address -> tickets bought

Value

"tickets/buyers"

cAttended

untyped string

// address -> concerts checked in at

Value

"tickets/attended"

cMeta

untyped string

// "n" -> Rec(events, tickets)

Value

"tickets/meta"

cConfig

untyped string

// admin, fee

Value

"tickets/config"

cPresent

untyped string

// P(ticket) -> Rec(holder, unix time, door code) of its last Present

Value

"tickets/present"

setup

func(holder .uverse.address)

setup makes the collections and the first settings, once: a later release finds them made (it is not the writer in its init).

Open
OID
0fb62b…2dc7:5
setup details

Inspect func

save

func(ops v0.Ops)

save writes ops in one call: data.Set or data.Remove for one op, else one data.Batch.

Open
OID
0fb62b…2dc7:7
save details

Inspect func

aheadKey

func(e *v1.Event) string
Open
OID
0fb62b…2dc7:10
aheadKey details

Inspect func

idOf

func(k string) int

idOf reads the event id at the end of an index key.

Open
OID
0fb62b…2dc7:11
idOf details

Inspect func

count

func(c string, start string, end string) int

count is the number of keys of c with start \<= key \< end.

Open
OID
0fb62b…2dc7:12
count details

Inspect func

mEvents

untyped bigint

Value

(0 <untyped> bigint)

mTickets

untyped bigint

Value

(1 <untyped> bigint)

metaCount

func(m string, i int) int
Open
OID
0fb62b…2dc7:14
metaCount details

Inspect func

decode

func(id int, rec string) *v1.Event

decode reads an event record ("" gives nil).

Open
OID
0fb62b…2dc7:15
decode details

Inspect func

record

func(e *v1.Event) string

record encodes an event in the order of nft.E\*.

Open
OID
0fb62b…2dc7:16
record details

Inspect func

visible

func(e *v1.Event) bool

visible: not hidden by moderation, and its artist profile is visible.

Open
OID
0fb62b…2dc7:18
visible details

Inspect func

mustEvent

func(id int) *v1.Event
Open
OID
0fb62b…2dc7:19
mustEvent details

Inspect func

chunks

type

chunks reads ticket records, each chunk once per call.

Value

v1.chunks

getTicket

func(id int) *v1.Ticket
Open
OID
0fb62b…2dc7:20
getTicket details

Inspect func

mustTicket

func(id int) *v1.Ticket
Open
OID
0fb62b…2dc7:21
mustTicket details

Inspect func

ticketRecord

func(tk *v1.Ticket) string
Open
OID
0fb62b…2dc7:22
ticketRecord details

Inspect func

own

func(ops v0.Ops, addr .uverse.address, id int, add bool) v0.Ops

own adds id to addr's list (remove: takes it out) as an op.

Open
OID
0fb62b…2dc7:23
own details

Inspect func

TicketOwner

func(ticketID int) .uverse.address
Open
OID
0fb62b…2dc7:24
TicketOwner details

Inspect func

EventInfo

func(id int) (v1.Event, bool)

EventInfo returns a copy of a visible concert; ok is false otherwise.

Open
OID
0fb62b…2dc7:26
EventInfo details

Inspect func

HiddenNote

func(eventID int) string

HiddenNote says why a concert is hidden: "Removed by moderation: \<reason>", or "".

Open
OID
0fb62b…2dc7:27
HiddenNote details

Inspect func

TicketInfo

func(id int) (v1.Ticket, bool)

TicketInfo returns a copy of a ticket.

Open
OID
0fb62b…2dc7:28
TicketInfo details

Inspect func

Attended

func(holder .uverse.address) int

Attended returns how many concerts a holder checked in at.

Open
OID
0fb62b…2dc7:31
Attended details

Inspect func

PresentedAt

func(ticketID int, code string) int64

PresentedAt is when the ticket's current holder last presented it at the door (Present) with this door code, unix seconds; 0 when they did not, or it changed hands since, or it was checked in. CheckIn takes it for 10 minutes.

Open
OID
0fb62b…2dc7:32
PresentedAt details

Inspect func

ServiceFee

func() int64

ServiceFee returns the per-ticket service fee in ugnot (0 while no treasury is set).

Open
OID
0fb62b…2dc7:33
ServiceFee details

Inspect func

PendingAdmin

func() .uverse.address
Open
OID
0fb62b…2dc7:35
PendingAdmin details

Inspect func

TicketsOf

func(owner .uverse.address, offset int, limit int) []int

TicketsOf returns up to limit ticket ids held by owner, newest first.

Open
OID
0fb62b…2dc7:36
TicketsOf details

Inspect func

ArtistEvents

func(artistID int, limit int) []int

ArtistEvents returns up to limit visible concert ids of an artist, newest first.

Open
OID
0fb62b…2dc7:37
ArtistEvents details

Inspect func

Upcoming

func(n int) []v1.Event

Upcoming returns up to n visible, not cancelled future concerts, soonest first.

Open
OID
0fb62b…2dc7:38
Upcoming details

Inspect func

PastEvents

func(offset int, limit int) (ids []int, total int)

PastEvents returns up to limit (1-100) ids of the concerts that have started, were not cancelled and are not hidden, latest first from offset, and how many there are. The start-time index pages them: cancelled or hidden concerts take no room, however many there are.

Open
OID
0fb62b…2dc7:39
PastEvents details

Inspect func

eachUpcoming

func(want int, fn func(...))

eachUpcoming walks the visible future concerts, soonest first, until fn returns true or maxScan index entries were read; want sizes the first page. Past entries are skipped by starting the walk at now.

Open
OID
0fb62b…2dc7:40
eachUpcoming details

Inspect func

EventSVG

func(id int) string

EventSVG returns the specimen ticket of a visible concert as a markdown image, or "" when the concert is not visible.

Open
OID
0fb62b…2dc7:41
EventSVG details

Inspect func

TicketSVG

func(id int) string

TicketSVG returns a ticket as a markdown image, or "" if unknown.

Open
OID
0fb62b…2dc7:42
TicketSVG details

Inspect func

eventJSON

func(e *v1.Event, fee string) string
Open
OID
0fb62b…2dc7:43
eventJSON details

Inspect func

EventsJSON

func(offset int, limit int, upcoming bool) string

EventsJSON pages through concerts, newest first (limit \<= 50): offset and limit count stored concerts, hidden ones are left out of the page, and "next" gives the offset of the following page (0 at the end). upcoming=true lists future, not cancelled, visible concerts instead, soonest first, with offset and limit counting listed concerts ("next" is then a listed-concert offset, 0 when the scan ended).

Open
OID
0fb62b…2dc7:44
EventsJSON details

Inspect func

TicketsOfJSON

func(owner .uverse.address) string

TicketsOfJSON lists the tickets held by owner, newest first (\<= 50).

Open
OID
0fb62b…2dc7:45
TicketsOfJSON details

Inspect func

FeesJSON

func() string

FeesJSON returns the ticket service fee and where it goes.

Open
OID
0fb62b…2dc7:46
FeesJSON details

Inspect func

denom

untyped string

Value

"ugnot"

ugnot

untyped bigint

Value

(1000000 <untyped> bigint)

minPrice

untyped bigint

// 0.1 GNOT

Value

(100000 <untyped> bigint)

maxTicketPrice

untyped bigint

Value

(10000000000 <untyped> bigint)

maxCapacity

untyped bigint

Value

(10000 <untyped> bigint)

maxPerBuyer

untyped bigint

Value

(4 <untyped> bigint)

maxPerArtist

untyped bigint

// concerts ever created

Value

(500 <untyped> bigint)

maxOpenAhead

untyped bigint

// future, not cancelled concerts per artist

Value

(10 <untyped> bigint)

checkInWindow

untyped bigint

// check-in opens 12h before the concert

Value

(43200 <untyped> bigint)

checkInClose

untyped bigint

// and closes 12h after its start

Value

(43200 <untyped> bigint)

presentFor

untyped bigint

// a Present admits its ticket for 10 minutes

Value

(600 <untyped> bigint)

maxServiceFee

untyped bigint

Value

(10000000 <untyped> bigint)

maxOwned

untyped bigint

// tickets one wallet holds

Value

(1000 <untyped> bigint)

maxGifted

untyped bigint

// a wallet takes gifts while it holds fewer: gifts never block buying

Value

(500 <untyped> bigint)

maxScan

untyped bigint

// upcoming index entries one read walks

Value

(1000 <untyped> bigint)

nftPath

untyped string

Value

"gno.land/r/nym-alexiscolin000/gnoradio/tickets/nft"

Event

type

Event is a concert.

Value

v1.Event

Ticket

type

Ticket is one NFT ticket.

Value

v1.Ticket

self

string

// this realm's path

Value

"gno.land/r/nym-alexiscolin000/gnoradio/tickets/v1"

admin

*v0.Role

// the moderator; nil when a release before renounced it

Open
OID
0fb62b…2dc7:80
admin details

Inspect pointer

CreateEvent

func(title string, venue string, link string, start string, price string, capacity int) int

CreateEvent announces a concert by the caller's artist profile. start is "YYYY-MM-DD HH:MM" in UTC; price is in GNOT ("0" for free, "2.5"); link is an optional https URL (stream or venue page, public).

Open
OID
0fb62b…2dc7:51
CreateEvent details

Inspect func

CancelEvent

func(eventID int)

CancelEvent stops ticket sales. GnoRadio never held the payments: they went straight to the artist, who handles refunds directly. Artist owner only.

Open
OID
0fb62b…2dc7:52
CancelEvent details

Inspect func

BuyTicket

func(eventID int) int

BuyTicket mints a ticket to the caller. A paid ticket needs the exact price plus the service fee attached: the price goes straight to the artist, the fee to the GnoRadio treasury.

Open
OID
0fb62b…2dc7:53
BuyTicket details

Inspect func

TransferTicket

func(to .uverse.address, ticketID int)

TransferTicket gives one of the caller's tickets to someone else. There is no built-in resale market.

Open
OID
0fb62b…2dc7:54
TransferTicket details

Inspect func

Present

func(ticketID int, code string)

Present shows a ticket at the door: its holder signs from their own wallet, with the door code the staff's screen shows after scanning the ticket's QR. A QR built from public data (the ticket id and its holder) cannot do that for them, and a stranger with a copied QR gets another code: the holder's Present does not admit them. CheckIn then admits the ticket with that code for 10 minutes. Only while the door is open: from 12h before the concert to 12h after its start.

Open
OID
0fb62b…2dc7:55
Present details

Inspect func

CheckIn

func(ticketID int, code string)

CheckIn marks a ticket as used at the door; its holder earns the "I was there" stamp. The concert's artist owner only, while the door is open, and only for a ticket its current holder presented (Present) with this door code in the last 10 minutes.

Open
OID
0fb62b…2dc7:56
CheckIn details

Inspect func

mustDoorCode

func(code string)

mustDoorCode refuses a door code that is not 4 to 8 digits.

Open
OID
0fb62b…2dc7:57
mustDoorCode details

Inspect func

mustDoorOpen

func(e *v1.Event, tk *v1.Ticket)

mustDoorOpen refuses a ticket the door cannot take now.

Open
OID
0fb62b…2dc7:58
mustDoorOpen details

Inspect func

HideEvent

func(eventID int, hidden bool, reason string)

HideEvent hides or restores a concert. Admin only; hiding takes a public reason (4-200 characters). Tickets stay with their holders.

Open
OID
0fb62b…2dc7:59
HideEvent details

Inspect func

RefreshArtist

func(artistID int)

RefreshArtist re-reads an artist's visibility in the catalog and updates the Upcoming index for its future concerts (at most maxOpenAhead): once moderators hide a profile, its concerts stop taking places in the Upcoming scan; a restored artist's come back. Anyone may call it.

Open
OID
0fb62b…2dc7:60
RefreshArtist details

Inspect func

RefreshArtistPast

func(artistID int, offset int)

RefreshArtistPast does the same for up to 50 of an artist's past concerts from offset (oldest first; the 500 an artist may have take ten calls), so a hidden profile's past concerts leave the past-concerts index too. Anyone may call it.

Open
OID
0fb62b…2dc7:61
RefreshArtistPast details

Inspect func

reindex

func(artistID int, keys []string)

reindex re-files an artist's concerts (their cAhead keys) in the Upcoming index by visibility.

Open
OID
0fb62b…2dc7:62
reindex details

Inspect func

SetServiceFee

func(ugnot int64)

SetServiceFee sets the per-ticket service fee in ugnot (0..10 GNOT), paid by buyers of paid tickets on top of the price and forwarded to the GnoRadio treasury. Admin only.

Open
OID
0fb62b…2dc7:63
SetServiceFee details

Inspect func

Ready

func()

Ready tells the data realm that this release is on chain (see data.Propose). Anyone may call it.

Open
OID
0fb62b…2dc7:64
Ready details

Inspect func

OfferAdmin

func(to .uverse.address)

OfferAdmin offers the admin role to an address (offering it to the admin cancels the offer); AcceptAdmin takes it. Each change is mirrored to the data realm, so the next release keeps the admin.

Open
OID
0fb62b…2dc7:65
OfferAdmin details

Inspect func

RenounceAdmin

func()

RenounceAdmin gives the admin role up for good, for this release and the next ones.

Open
OID
0fb62b…2dc7:67
RenounceAdmin details

Inspect func

Render

func(string) string

Render points gnoweb visitors to the GnoRadio site; a retired release says which realm took over.

Open
OID
0fb62b…2dc7:68
Render details

Inspect func

userCaller

func() .uverse.address
Open
OID
0fb62b…2dc7:70
userCaller details

Inspect func

adminAddr

func() .uverse.address
Open
OID
0fb62b…2dc7:71
adminAddr details

Inspect func

syncAdmin

func()

syncAdmin adopts the mirror when the previous release changed it after this one's init (during the release's delay).

Open
OID
0fb62b…2dc7:72
syncAdmin details

Inspect func

paid

func() int64

paid returns the ugnot attached to the call; anything else is refused.

Open
OID
0fb62b…2dc7:75
paid details

Inspect func

serviceFee

func() int64

serviceFee is the stored fee, 0 while no treasury is set: the fee has nowhere to go, so buyers never pay it.

Open
OID
0fb62b…2dc7:76
serviceFee details

Inspect func

mustArtistOf

func(addr .uverse.address) int
Open
OID
0fb62b…2dc7:77
mustArtistOf details

Inspect func

mustText

func(field string, s string, min int, max int)
Open
OID
0fb62b…2dc7:78
mustText details

Inspect func

parseGNOT

func(s string) (int64, bool)

parseGNOT parses a decimal GNOT amount ("10", "2.5") into ugnot.

Open
OID
0fb62b…2dc7:79
parseGNOT details

Inspect func
cEvents : untyped string ="tickets/events"
cTickets : untyped string ="tickets/tickets"
cByArtist : untyped string ="tickets/byartist"
cUpcoming : untyped string ="tickets/upcoming"
cAhead : untyped string ="tickets/ahead"
cOwned : untyped string ="tickets/owned"
cBuyers : untyped string ="tickets/buyers"
cAttended : untyped string ="tickets/attended"
cMeta : untyped string ="tickets/meta"
cConfig : untyped string ="tickets/config"
cPresent : untyped string ="tickets/present"
collections : []string (len=11) Inspect
setup : func(holder .uverse.address) Inspect
save : func(ops v0.Ops) Inspect
get : func(c string, k string) string Inspect
upKey : func(e *v1.Event) string Inspect
aheadKey : func(e *v1.Event) string Inspect
idOf : func(k string) int Inspect
count : func(c string, start string, end string) int Inspect
mEvents : untyped bigint =(0 <untyped> bigint)
mTickets : untyped bigint =(1 <untyped> bigint)
meta : func() string Inspect
metaCount : func(m string, i int) int Inspect
decode : func(id int, rec string) *v1.Event Inspect
record : func(e *v1.Event) string Inspect
getEvent : func(id int) *v1.Event Inspect
visible : func(e *v1.Event) bool Inspect
mustEvent : func(id int) *v1.Event Inspect
chunks : type =v1.chunks
getTicket : func(id int) *v1.Ticket Inspect
mustTicket : func(id int) *v1.Ticket Inspect
ticketRecord : func(tk *v1.Ticket) string Inspect
own : func(ops v0.Ops, addr .uverse.address, id int, add bool) v0.Ops Inspect
TicketOwner : func(ticketID int) .uverse.address Inspect
EventInfo : func(id int) (v1.Event, bool) Inspect
HiddenNote : func(eventID int) string Inspect
TicketInfo : func(id int) (v1.Ticket, bool) Inspect
EventCount : func() int Inspect
TicketCount : func() int Inspect
Attended : func(holder .uverse.address) int Inspect
PresentedAt : func(ticketID int, code string) int64 Inspect
ServiceFee : func() int64 Inspect
Admin : func() .uverse.address Inspect
PendingAdmin : func() .uverse.address Inspect
TicketsOf : func(owner .uverse.address, offset int, limit int) []int Inspect
ArtistEvents : func(artistID int, limit int) []int Inspect
Upcoming : func(n int) []v1.Event Inspect
PastEvents : func(offset int, limit int) (ids []int, total int) Inspect
eachUpcoming : func(want int, fn func(...)) Inspect
EventSVG : func(id int) string Inspect
TicketSVG : func(id int) string Inspect
eventJSON : func(e *v1.Event, fee string) string Inspect
EventsJSON : func(offset int, limit int, upcoming bool) string Inspect
TicketsOfJSON : func(owner .uverse.address) string Inspect
FeesJSON : func() string Inspect
denom : untyped string ="ugnot"
ugnot : untyped bigint =(1000000 <untyped> bigint)
minPrice : untyped bigint =(100000 <untyped> bigint)
maxTicketPrice : untyped bigint =(10000000000 <untyped> bigint)
maxCapacity : untyped bigint =(10000 <untyped> bigint)
maxPerBuyer : untyped bigint =(4 <untyped> bigint)
maxPerArtist : untyped bigint =(500 <untyped> bigint)
maxOpenAhead : untyped bigint =(10 <untyped> bigint)
checkInWindow : untyped bigint =(43200 <untyped> bigint)
checkInClose : untyped bigint =(43200 <untyped> bigint)
presentFor : untyped bigint =(600 <untyped> bigint)
maxServiceFee : untyped bigint =(10000000 <untyped> bigint)
maxOwned : untyped bigint =(1000 <untyped> bigint)
maxGifted : untyped bigint =(500 <untyped> bigint)
maxScan : untyped bigint =(1000 <untyped> bigint)
nftPath : untyped string ="gno.land/r/nym-alexiscolin000/gnoradio/tickets/nft"
Event : type =v1.Event
Ticket : type =v1.Ticket
self : string ="gno.land/r/nym-alexiscolin000/gnoradio/tickets/v1"
admin : *v0.Role Inspect
init.75 : func() Inspect
CreateEvent : func(title string, venue string, link string, start string, price string, capacity int) int Inspect
CancelEvent : func(eventID int) Inspect
BuyTicket : func(eventID int) int Inspect
TransferTicket : func(to .uverse.address, ticketID int) Inspect
Present : func(ticketID int, code string) Inspect
CheckIn : func(ticketID int, code string) Inspect
mustDoorCode : func(code string) Inspect
mustDoorOpen : func(e *v1.Event, tk *v1.Ticket) Inspect
HideEvent : func(eventID int, hidden bool, reason string) Inspect
RefreshArtist : func(artistID int) Inspect
RefreshArtistPast : func(artistID int, offset int) Inspect
reindex : func(artistID int, keys []string) Inspect
SetServiceFee : func(ugnot int64) Inspect
Ready : func() Inspect
OfferAdmin : func(to .uverse.address) Inspect
AcceptAdmin : func() Inspect
RenounceAdmin : func() Inspect
Render : func(string) string Inspect
now : func() int64 Inspect
userCaller : func() .uverse.address Inspect
adminAddr : func() .uverse.address Inspect
syncAdmin : func() Inspect
onlyAdmin : func() Inspect
noPayment : func() Inspect
paid : func() int64 Inspect
serviceFee : func() int64 Inspect
mustArtistOf : func(addr .uverse.address) int Inspect
mustText : func(field string, s string, min int, max int) Inspect
parseGNOT : func(s string) (int64, bool) Inspect