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

v0 state

Back to all declarations

resolveName

func(name string) (.uverse.address, bool)
Open
OID
07bdfd…3e5f:11
resolveName details

Inspect func

Register

func(pkgPath string, repo string, commit string, dir string, ref string)

Register records that pkgPath was built from dir of repo at commit. Calling it again for the same path replaces the caller's own claim and nobody else's, so moving a claim to a new commit after a redeploy is one call with no read first. ref is optional and is never the thing verified: a ref moves, a commit does not. It is recorded so a reader can tell a claim pinned to a released tag from one pinned to a commit on nobody's branch, and so a verifier can report a commit that has since been orphaned by a force-push. dir is empty when the package sits at the repository root.

Open
OID
07bdfd…3e5f:12
Register details

Inspect func

Withdraw

func(pkgPath string)

Withdraw removes the caller's own claim about pkgPath.

Open
OID
07bdfd…3e5f:13
Withdraw details

Inspect func

PackageCount

func() int

PackageCount is how many package paths carry at least one claim.

Open
OID
07bdfd…3e5f:14
PackageCount details

Inspect func

ClaimCount

func() int

ClaimCount is the total number of claims across every path.

Open
OID
07bdfd…3e5f:15
ClaimCount details

Inspect func

HasClaims

func(pkgPath string) bool

HasClaims reports whether anything has been said about pkgPath. Cheap enough for another realm or an indexer to ask per package.

Open
OID
07bdfd…3e5f:16
HasClaims details

Inspect func

OwnerClaim

func(pkgPath string) (repo string, commit string, dir string, ok bool)

OwnerClaim returns the repository, commit and directory claimed by the party that owns pkgPath's namespace, and whether such a claim exists. This is the only read that filters, and it filters on the one signal the chain can actually prove. Everything else a caller wants is in Render or in the events.

Open
OID
07bdfd…3e5f:17
OwnerClaim details

Inspect func

pageSize

untyped bigint

pageSize bounds every listing: a Render that walks unbounded state is a Render that eventually stops rendering.

Value

(20 <untyped> bigint)

Render

func(path string) string

Render routes gnoweb paths: / every claimed package path /<package path> the claims about one package /help what this realm is, and how to write to it

Open
OID
07bdfd…3e5f:18
Render details

Inspect func

pkgURL

func(pkgPath string) string
Open
OID
07bdfd…3e5f:21
pkgURL details

Inspect func

join

func(blocks []string) string

join glues blocks with exactly one blank line between them. gno collapses two consecutive blank lines inside an example's // Output: block, exactly as Go does, so a Render that ever emits them cannot be pinned by an example at all. Appending "\\n" by hand as sections are built is how a Render acquires them; assembling a list of blocks and joining once is how it stops. Every block arrives without its own leading or trailing blank.

Open
OID
07bdfd…3e5f:23
join details

Inspect func

notFound

func(why string) string

notFound echoes the requested path, which is the only untrusted string this file handles: it comes from the URL and has already failed validation by the time we are here. It is escaped rather than dropped, because "that is not a package path" without saying which one is an unhelpful error.

Open
OID
07bdfd…3e5f:25
notFound details

Inspect func

renderHome

func(page int) string
Open
OID
07bdfd…3e5f:26
renderHome details

Inspect func

pager

func(page int, rows int) string
Open
OID
07bdfd…3e5f:27
pager details

Inspect func

renderPackage

func(pkgPath string) string
Open
OID
07bdfd…3e5f:28
renderPackage details

Inspect func

claimBlock

func(c *v0.Claim) string
Open
OID
07bdfd…3e5f:29
claimBlock details

Inspect func
reg : *v0.Registry Inspect
caller : func() .uverse.address Inspect
must : func(err .uverse.error) Inspect
resolveName : func(name string) (.uverse.address, bool) Inspect
Register : func(pkgPath string, repo string, commit string, dir string, ref string) Inspect
Withdraw : func(pkgPath string) Inspect
PackageCount : func() int Inspect
ClaimCount : func() int Inspect
HasClaims : func(pkgPath string) bool Inspect
OwnerClaim : func(pkgPath string) (repo string, commit string, dir string, ok bool) Inspect
pageSize : untyped bigint =(20 <untyped> bigint)
Render : func(path string) string Inspect
base : func() string Inspect
pkgURL : func(pkgPath string) string Inspect
join : func(blocks []string) string Inspect
pageOf : func(req *v0.Request) int Inspect
notFound : func(why string) string Inspect
renderHome : func(page int) string Inspect
pager : func(page int, rows int) string Inspect
renderPackage : func(pkgPath string) string Inspect
claimBlock : func(c *v0.Claim) string Inspect
renderHelp : func() string Inspect