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

/events package

Overview

Package events allows you to upload data about specific IRL/online events It includes dynamic support for updating rendering events based on their status, ie if they are upcoming, in progress, or in the past.

Functions

AddEvent

func AddEvent(cur realm, name, description, link, location, startTime, endTime string) (string, error)

AddEvent adds auth new event Start time & end time need to be specified in RFC3339, ie 2024-08-08T12:00:00+02:00

Params

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/devrels/events" -func "AddEvent" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/devrels/events" -func "AddEvent" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

DeleteEvent

func DeleteEvent(cur realm, id string)

DeleteEvent deletes an event with auth given ID

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/devrels/events" -func "DeleteEvent" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/devrels/events" -func "DeleteEvent" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

EditEvent

func EditEvent(cur realm, id string, name, description, link, location, startTime, endTime string)

EditEvent edits an event with auth given ID It only updates values corresponding to non-empty arguments sent with the call Note: if you need to update the start time or end time, you need to provide both every time

Params

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/devrels/events" -func "EditEvent" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/devrels/events" -func "EditEvent" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

Render

func Render(path string) string

Render is the main rendering entry point

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/devrels/events.Render()"

Result

RenderEventWidget

func RenderEventWidget(eventsToRender int) (string, error)

RenderEventWidget shows up to eventsToRender of the latest events to a caller

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/devrels/events.RenderEventWidget()"

Result

GetEventByID

func GetEventByID(id string) (*Event, int, error)

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/devrels/events.GetEventByID()"

Result