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"
collections
[]string- OID
- 0fb62b…2dc7:4
collections details
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).
- OID
- 0fb62b…2dc7:5
setup details
save
func(ops v0.Ops)save writes ops in one call: data.Set or data.Remove for one op, else one data.Batch.
- OID
- 0fb62b…2dc7:7
save details
get
func(c string, k string) string- OID
- 0fb62b…2dc7:8
get details
upKey
func(e *v1.Event) string- OID
- 0fb62b…2dc7:9
upKey details
aheadKey
func(e *v1.Event) string- OID
- 0fb62b…2dc7:10
aheadKey details
idOf
func(k string) intidOf reads the event id at the end of an index key.
- OID
- 0fb62b…2dc7:11
idOf details
count
func(c string, start string, end string) intcount is the number of keys of c with start \<= key \< end.
- OID
- 0fb62b…2dc7:12
count details
mEvents
untyped bigintValue
(0 <untyped> bigint)
mTickets
untyped bigintValue
(1 <untyped> bigint)
meta
func() string- OID
- 0fb62b…2dc7:13
meta details
metaCount
func(m string, i int) int- OID
- 0fb62b…2dc7:14
metaCount details
decode
func(id int, rec string) *v1.Eventdecode reads an event record ("" gives nil).
- OID
- 0fb62b…2dc7:15
decode details
record
func(e *v1.Event) stringrecord encodes an event in the order of nft.E\*.
- OID
- 0fb62b…2dc7:16
record details
getEvent
func(id int) *v1.Event- OID
- 0fb62b…2dc7:17
getEvent details
visible
func(e *v1.Event) boolvisible: not hidden by moderation, and its artist profile is visible.
- OID
- 0fb62b…2dc7:18
visible details
mustEvent
func(id int) *v1.Event- OID
- 0fb62b…2dc7:19
mustEvent details
chunks
typechunks reads ticket records, each chunk once per call.
Value
v1.chunks
getTicket
func(id int) *v1.Ticket- OID
- 0fb62b…2dc7:20
getTicket details
mustTicket
func(id int) *v1.Ticket- OID
- 0fb62b…2dc7:21
mustTicket details
ticketRecord
func(tk *v1.Ticket) string- OID
- 0fb62b…2dc7:22
ticketRecord details
own
func(ops v0.Ops, addr .uverse.address, id int, add bool) v0.Opsown adds id to addr's list (remove: takes it out) as an op.
- OID
- 0fb62b…2dc7:23
own details
TicketOwner
func(ticketID int) .uverse.address- OID
- 0fb62b…2dc7:24
TicketOwner details
EventInfo
func(id int) (v1.Event, bool)EventInfo returns a copy of a visible concert; ok is false otherwise.
- OID
- 0fb62b…2dc7:26
EventInfo details
TicketInfo
func(id int) (v1.Ticket, bool)TicketInfo returns a copy of a ticket.
- OID
- 0fb62b…2dc7:28
TicketInfo details
EventCount
func() int- OID
- 0fb62b…2dc7:29
EventCount details
TicketCount
func() int- OID
- 0fb62b…2dc7:30
TicketCount details
Attended
func(holder .uverse.address) intAttended returns how many concerts a holder checked in at.
- OID
- 0fb62b…2dc7:31
Attended details
PresentedAt
func(ticketID int, code string) int64PresentedAt 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.
- OID
- 0fb62b…2dc7:32
PresentedAt details
ServiceFee
func() int64ServiceFee returns the per-ticket service fee in ugnot (0 while no treasury is set).
- OID
- 0fb62b…2dc7:33
ServiceFee details
Admin
func() .uverse.address- OID
- 0fb62b…2dc7:34
Admin details
PendingAdmin
func() .uverse.address- OID
- 0fb62b…2dc7:35
PendingAdmin details
TicketsOf
func(owner .uverse.address, offset int, limit int) []intTicketsOf returns up to limit ticket ids held by owner, newest first.
- OID
- 0fb62b…2dc7:36
TicketsOf details
ArtistEvents
func(artistID int, limit int) []intArtistEvents returns up to limit visible concert ids of an artist, newest first.
- OID
- 0fb62b…2dc7:37
ArtistEvents details
Upcoming
func(n int) []v1.EventUpcoming returns up to n visible, not cancelled future concerts, soonest first.
- OID
- 0fb62b…2dc7:38
Upcoming details
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.
- OID
- 0fb62b…2dc7:39
PastEvents details
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.
- OID
- 0fb62b…2dc7:40
eachUpcoming details
EventSVG
func(id int) stringEventSVG returns the specimen ticket of a visible concert as a markdown image, or "" when the concert is not visible.
- OID
- 0fb62b…2dc7:41
EventSVG details
TicketSVG
func(id int) stringTicketSVG returns a ticket as a markdown image, or "" if unknown.
- OID
- 0fb62b…2dc7:42
TicketSVG details
eventJSON
func(e *v1.Event, fee string) string- OID
- 0fb62b…2dc7:43
eventJSON details
EventsJSON
func(offset int, limit int, upcoming bool) stringEventsJSON 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).
- OID
- 0fb62b…2dc7:44
EventsJSON details
TicketsOfJSON
func(owner .uverse.address) stringTicketsOfJSON lists the tickets held by owner, newest first (\<= 50).
- OID
- 0fb62b…2dc7:45
TicketsOfJSON details
FeesJSON
func() stringFeesJSON returns the ticket service fee and where it goes.
- OID
- 0fb62b…2dc7:46
FeesJSON details
denom
untyped stringValue
"ugnot"
ugnot
untyped bigintValue
(1000000 <untyped> bigint)
minPrice
untyped bigint// 0.1 GNOT
Value
(100000 <untyped> bigint)
maxTicketPrice
untyped bigintValue
(10000000000 <untyped> bigint)
maxCapacity
untyped bigintValue
(10000 <untyped> bigint)
maxPerBuyer
untyped bigintValue
(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 bigintValue
(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 stringValue
"gno.land/r/nym-alexiscolin000/gnoradio/tickets/nft"
Event
typeEvent is a concert.
Value
v1.Event
Ticket
typeTicket 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
- OID
- 0fb62b…2dc7:80
admin details
init.75
func()- OID
- 0fb62b…2dc7:49
init.75 details
CreateEvent
func(title string, venue string, link string, start string, price string, capacity int) intCreateEvent 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).
- OID
- 0fb62b…2dc7:51
CreateEvent details
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.
- OID
- 0fb62b…2dc7:52
CancelEvent details
BuyTicket
func(eventID int) intBuyTicket 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.
- OID
- 0fb62b…2dc7:53
BuyTicket details
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.
- OID
- 0fb62b…2dc7:54
TransferTicket details
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.
- OID
- 0fb62b…2dc7:55
Present details
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.
- OID
- 0fb62b…2dc7:56
CheckIn details
mustDoorCode
func(code string)mustDoorCode refuses a door code that is not 4 to 8 digits.
- OID
- 0fb62b…2dc7:57
mustDoorCode details
mustDoorOpen
func(e *v1.Event, tk *v1.Ticket)mustDoorOpen refuses a ticket the door cannot take now.
- OID
- 0fb62b…2dc7:58
mustDoorOpen details
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.
- OID
- 0fb62b…2dc7:59
HideEvent details
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.
- OID
- 0fb62b…2dc7:60
RefreshArtist details
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.
- OID
- 0fb62b…2dc7:61
RefreshArtistPast details
reindex
func(artistID int, keys []string)reindex re-files an artist's concerts (their cAhead keys) in the Upcoming index by visibility.
- OID
- 0fb62b…2dc7:62
reindex details
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.
- OID
- 0fb62b…2dc7:63
SetServiceFee details
Ready
func()Ready tells the data realm that this release is on chain (see data.Propose). Anyone may call it.
- OID
- 0fb62b…2dc7:64
Ready details
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.
- OID
- 0fb62b…2dc7:65
OfferAdmin details
AcceptAdmin
func()- OID
- 0fb62b…2dc7:66
AcceptAdmin details
RenounceAdmin
func()RenounceAdmin gives the admin role up for good, for this release and the next ones.
- OID
- 0fb62b…2dc7:67
RenounceAdmin details
Render
func(string) stringRender points gnoweb visitors to the GnoRadio site; a retired release says which realm took over.
- OID
- 0fb62b…2dc7:68
Render details
now
func() int64- OID
- 0fb62b…2dc7:69
now details
userCaller
func() .uverse.address- OID
- 0fb62b…2dc7:70
userCaller details
adminAddr
func() .uverse.address- OID
- 0fb62b…2dc7:71
adminAddr details
syncAdmin
func()syncAdmin adopts the mirror when the previous release changed it after this one's init (during the release's delay).
- OID
- 0fb62b…2dc7:72
syncAdmin details
onlyAdmin
func()- OID
- 0fb62b…2dc7:73
onlyAdmin details
noPayment
func()- OID
- 0fb62b…2dc7:74
noPayment details
paid
func() int64paid returns the ugnot attached to the call; anything else is refused.
- OID
- 0fb62b…2dc7:75
paid details
serviceFee
func() int64serviceFee is the stored fee, 0 while no treasury is set: the fee has nowhere to go, so buyers never pay it.
- OID
- 0fb62b…2dc7:76
serviceFee details
mustArtistOf
func(addr .uverse.address) int- OID
- 0fb62b…2dc7:77
mustArtistOf details
mustText
func(field string, s string, min int, max int)- OID
- 0fb62b…2dc7:78
mustText details
parseGNOT
func(s string) (int64, bool)parseGNOT parses a decimal GNOT amount ("10", "2.5") into ugnot.
- OID
- 0fb62b…2dc7:79