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

home/v1 package

Overview

Package home is the GnoRadio website on gnoweb, release 1. It owns no data: every page is rendered from the catalog, radio and tickets realms, and its two settings (app.gno) live in the data realm, "home/config".

Functions

Ready

func Ready(cur realm)

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

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/home/v1" -func "Ready" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/home/v1" -func "Ready" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

Render

func Render(path string) string

Render serves:

Example
1""                       home: main station on air, stations, new releases, top, concerts
2"stations" "station/<n>" radio stations and their schedule
3"track/<id>"             a track
4"artist/<id|name>"       an artist
5"album/<id>" "playlist/<id>"
6"catalog?p=N&g=G" "artists?p=N" "albums?p=N" "playlists?p=N"
7"concerts?p=N" "event/<id>" "ticket/<id>"
8"listener" "listener/<g1…>" listeners: top curators; one listener's likes, playlists, tickets, badges
9"charts" "join" "about" "moderation?p=N"

Bare entity segments ("track", "artist"…, linked by gnoweb's breadcrumb) open the matching list. Entity pages with long lists take ?p=N too.

Raw path input is never echoed: ids are parsed, names and addresses looked up.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-alexiscolin000/gnoradio/home/v1.Render()"

Result

SetAppURL

func SetAppURL(cur realm, url string)

SetAppURL sets the app link shown on every page: an https URL of at most 100 characters from [A-Za-z0-9-._~/:%], or "" to remove it. Catalog admin only.

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/home/v1" -func "SetAppURL" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/home/v1" -func "SetAppURL" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

SetContact

func SetContact(cur realm, line string)

SetContact sets the contact line shown next to the notice path (a web form, a postal address…): one line of at most 120 characters, or "" to remove it. Catalog admin only.

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/home/v1" -func "SetContact" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/home/v1" -func "SetContact" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx