PathrockNetwork Gno Explorer
HomeBlocksTransactionsRealmsPackagesValidators

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/p/gnoland/boards/v0

Package
Open in gnoweb ↗

Overview

Kind
Pure package
Name
v0
Namespace
gnoland / boards
Files
22 (gnomod.toml)
Exported functions
n/a — not supported for pure packages by the node (vm/qfuncs)
Module
gno.land/p/gnoland/boards/v0
gno
0.9

Files (22)

  • gnomod.tomltoml
  • board.gnogno
  • flag_storage.gnogno
  • id.gnogno
  • permission_set.gnogno
  • permissions.gnogno
  • post_storage.gnogno
  • post.gnogno
  • reply.gnogno
  • repost_storage.gnogno
  • storage.gnogno
  • thread.gnogno
  • board_test.gnogno
  • flag_storage_test.gnogno
  • id_test.gnogno
  • permission_set_test.gnogno
  • post_storage_test.gnogno
  • post_test.gnogno
  • reply_test.gnogno
  • repost_storage_test.gnogno
  • storage_test.gnogno
  • thread_test.gnogno
  • id.gnogno
    1package boards23import (4	"strconv"5	"strings"67	"gno.land/p/nt/seqid/v0"8)910const paddedStringLen = 101112// ID defines a type for unique identifiers.13type ID uint641415// String returns the ID as a string.16func (id ID) String() string {17	return strconv.FormatUint(uint64(id), 10)18}1920// PaddedString returns the ID as a 10 character string padded with zeroes.21// This value can be used for indexing by ID.22func (id ID) PaddedString() string {23	s := id.String()24	return strings.Repeat("0", paddedStringLen-len(s)) + s25}2627// Key returns the ID as a string which can be used to index by ID.28func (id ID) Key() string {29	return seqid.ID(id).String()30}3132// IdentifierGenerator defines an interface for sequential unique identifier generators.33type IdentifierGenerator interface {34	// Current returns the last generated ID.35	Last() ID3637	// Next generates a new ID or panics if increasing ID overflows.38	Next() ID39}4041// NewIdentifierGenerator creates a new sequential unique identifier generator.42func NewIdentifierGenerator() IdentifierGenerator {43	return &idGenerator{}44}4546type idGenerator struct {47	last seqid.ID48}4950// Current returns the last generated ID.51func (g idGenerator) Last() ID {52	return ID(g.last)53}5455// Next generates a new ID or panics if increasing ID overflows.56func (g *idGenerator) Next() ID {57	return ID(g.last.Next())58}59

    Functions

    not supported for pure packages by the node (vm/qfuncs)

    Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.