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

memba_appstore_v1 state

Back to all declarations

SetRegistrationFee

func(fee int64)

SetRegistrationFee sets the flat listing fee in ugnot (0..MaxRegistrationFee). Zero is allowed (a fee waiver). Owner only.

Open
OID
070717…e055:3
SetRegistrationFee details

Inspect func

SetTreasury

func(addr .uverse.address)

SetTreasury repoints the fee recipient. Must be non-empty (an empty treasury would fail-close RegisterApp). Owner only. Keep this in sync with memba\_market\_config.GetTreasury().

Open
OID
070717…e055:5
SetTreasury details

Inspect func

AddCurator

func(addr .uverse.address)

AddCurator grants the curate role (approve pending listings). Owner only.

Open
OID
070717…e055:6
AddCurator details

Inspect func

RemoveCurator

func(addr .uverse.address)

RemoveCurator revokes the curate role. Owner only.

Open
OID
070717…e055:7
RemoveCurator details

Inspect func

Pause

func(state bool)

Pause is the kill switch: while paused, RegisterApp aborts (reads stay available). Owner only.

Open
OID
070717…e055:8
Pause details

Inspect func

TransferOwnership

func(newOwner .uverse.address)

TransferOwnership stages a new owner; it takes effect only after AcceptOwnership is called BY that address (2-step, so a typo can't brick admin).

Open
OID
070717…e055:9
TransferOwnership details

Inspect func

AcceptOwnership

func()

AcceptOwnership completes the handoff. Only the staged pendingOwner may call it.

Open
OID
070717…e055:10
AcceptOwnership details

Inspect func

AdminAddress

untyped string

AdminAddress is the samcrew-core 2-of-2 multisig (same as the fee spine's admin/ treasury). It is the initial owner AND the initial treasury.

Value

"g10kw7e55e9wc8j8v6904ck29dqwr9fm9u280juh"

DefaultRegistrationFee

int64

Value

1000000

MaxRegistrationFee

int64

Value

100000000

MaxNameLen

untyped bigint

Value

(80 <untyped> bigint)

MaxTaglineLen

untyped bigint

Value

(140 <untyped> bigint)

MaxDescrLen

untyped bigint

Value

(2000 <untyped> bigint)

MaxURLLen

untyped bigint

Value

(400 <untyped> bigint)

MaxPkgPathLen

untyped bigint

Value

(200 <untyped> bigint)

MaxCIDLen

untyped bigint

Value

(100 <untyped> bigint)

FlagHideThreshold

untyped bigint

Value

(5 <untyped> bigint)

StatusPending

untyped string

StatusPending / StatusLive / StatusDelisted are the listing lifecycle states.

Value

"pending"

StatusLive

untyped string

StatusPending / StatusLive / StatusDelisted are the listing lifecycle states.

Value

"live"

StatusDelisted

untyped string

StatusPending / StatusLive / StatusDelisted are the listing lifecycle states.

Value

"delisted"

Listing

type

Listing is one app. PkgPath (the realm/package path) is the unique key.

Value

memba_appstore_v1.Listing

owner

.uverse.address

Value

<gnolang.StringValue>

pendingOwner

.uverse.address

Value

<zero>

treasury

.uverse.address

Value

<gnolang.StringValue>

registrationFee

int64

Value

1000000

paused

bool

Value

false

curators

*avl.Tree

// address string -> bool

Open
OID
070717…e055:18
curators details

Inspect pointer

flaggedBy

*avl.Tree

// pkgPath + "\\x00" + addr -> bool (one flag per addr)

Open
OID
070717…e055:24
flaggedBy details

Inspect pointer

nextId

uint64

Value

1

RegisterApp

func(pkgPath string, name string, tagline string, descr string, category string, iconCID string, appURL string) uint64

RegisterApp lists a new app. The caller pays EXACTLY registrationFee ugnot with the call; the whole fee is forwarded to the treasury (no custody). The listing starts \`pending\` and is not shown live until a curator approves it.

Open
OID
070717…e055:32
RegisterApp details

Inspect func

ApproveApp

func(pkgPath string)

ApproveApp flips a pending listing live. Curator-only.

Open
OID
070717…e055:33
ApproveApp details

Inspect func

DelistApp

func(pkgPath string)

DelistApp removes a listing from public view. The publisher or a curator may do it.

Open
OID
070717…e055:34
DelistApp details

Inspect func

RestoreApp

func(pkgPath string)

RestoreApp brings a delisted app back to \`pending\` (re-curation required before it shows live again). Curator-only — this is the reverse of DelistApp, so a mistaken or contested delist is recoverable.

Open
OID
070717…e055:35
RestoreApp details

Inspect func

FlagApp

func(pkgPath string)

FlagApp lets any user flag a LIVE listing once. At FlagHideThreshold distinct flags the listing stops appearing live; a curator then DelistApp's it or leaves it for review (a delisted app can be brought back with RestoreApp).

Open
OID
070717…e055:36
FlagApp details

Inspect func

isVisible

func(l *memba_appstore_v1.Listing) bool

isVisible reports whether a listing shows in the live list.

Open
OID
070717…e055:37
isVisible details

Inspect func

GetRegistrationFee

func() int64

GetRegistrationFee returns the current flat listing fee in ugnot.

Open
OID
070717…e055:38
GetRegistrationFee details

Inspect func

GetTreasury

func() .uverse.address
Open
OID
070717…e055:39
GetTreasury details

Inspect func

AppCount

func() int

AppCount returns the total number of registered listings (any status).

Open
OID
070717…e055:41
AppCount details

Inspect func

GetStatsJSON

func() string

GetStatsJSON returns a small stats object for a status header.

Open
OID
070717…e055:42
GetStatsJSON details

Inspect func

isCurator

func(a .uverse.address) bool
Open
OID
070717…e055:43
isCurator details

Inspect func

mustGet

func(pkgPath string) *memba_appstore_v1.Listing
Open
OID
070717…e055:44
mustGet details

Inspect func

validatePkgPath

func(p string) string

validatePkgPath normalizes + sanity-checks a realm/package path.

Open
OID
070717…e055:45
validatePkgPath details

Inspect func

hasPrefix

func(s string, pre string) bool
Open
OID
070717…e055:46
hasPrefix details

Inspect func

DefaultPageSize

untyped bigint

// default JSON window

Value

(20 <untyped> bigint)

MaxPageLimit

untyped bigint

// hard cap on any JSON read window (read-DoS guard)

Value

(100 <untyped> bigint)

clampLimit

func(limit int) int
Open
OID
070717…e055:49
clampLimit details

Inspect func

jsonEscape

func(s string) string

jsonEscape escapes a string for embedding in a JSON string literal — every listing text field is attacker-supplied, so this is the only thing between a malicious name/tagline and a broken/injected JSON payload on the read path.

Open
OID
070717…e055:51
jsonEscape details

Inspect func

listingJSON

func(l *memba_appstore_v1.Listing, full bool) string

listingJSON renders one listing. \`full\` adds the (large) description — omitted from list windows so a bounded page stays small.

Open
OID
070717…e055:52
listingJSON details

Inspect func

ListLiveJSON

func(offset int, limit int) string

ListLiveJSON returns a bounded JSON array of the visible (live, un-hidden) listings: skip \`offset\`, take up to clamped \`limit\`. Iteration stops as soon as the window is filled, so the scan is bounded by offset+limit regardless of catalog size.

Open
OID
070717…e055:53
ListLiveJSON details

Inspect func

GetListingJSON

func(pkgPath string) string

GetListingJSON returns a single listing (any status) with its description, or the JSON literal \`null\` if the package path is not registered.

Open
OID
070717…e055:54
GetListingJSON details

Inspect func

RenderMaxRows

untyped bigint

RenderMaxRows bounds the Render() output so a large catalog can never make the realm render-DoS (mirrors the feed's live-only bounded render).

Value

(100 <untyped> bigint)

Render

func(path string) string

Render shows the live catalog (bounded) — a read-only trust surface for gnoweb. The frontend reads structured data via the getters, not this markdown.

Open
OID
070717…e055:55
Render details

Inspect func

esc

func(s string) string

esc neutralizes the markdown/table metachars that could break the table or inject layout from an attacker-supplied listing field.

Open
OID
070717…e055:58
esc details

Inspect func
SetRegistrationFee : func(fee int64) Inspect
SetTreasury : func(addr .uverse.address) Inspect
AddCurator : func(addr .uverse.address) Inspect
RemoveCurator : func(addr .uverse.address) Inspect
Pause : func(state bool) Inspect
TransferOwnership : func(newOwner .uverse.address) Inspect
AcceptOwnership : func() Inspect
boolStr : func(b bool) string Inspect
AdminAddress : untyped string ="g10kw7e55e9wc8j8v6904ck29dqwr9fm9u280juh"
DefaultRegistrationFee : int64 =1000000
MaxRegistrationFee : int64 =100000000
MaxNameLen : untyped bigint =(80 <untyped> bigint)
MaxTaglineLen : untyped bigint =(140 <untyped> bigint)
MaxDescrLen : untyped bigint =(2000 <untyped> bigint)
MaxURLLen : untyped bigint =(400 <untyped> bigint)
MaxPkgPathLen : untyped bigint =(200 <untyped> bigint)
MaxCIDLen : untyped bigint =(100 <untyped> bigint)
FlagHideThreshold : untyped bigint =(5 <untyped> bigint)
StatusPending : untyped string ="pending"
StatusLive : untyped string ="live"
StatusDelisted : untyped string ="delisted"
Listing : type =memba_appstore_v1.Listing
owner : .uverse.address =<gnolang.StringValue>
pendingOwner : .uverse.address =<zero>
treasury : .uverse.address =<gnolang.StringValue>
registrationFee : int64 =1000000
paused : bool =false
curators : *avl.Tree Inspect
listings : *avl.Tree Inspect
flaggedBy : *avl.Tree Inspect
nextId : uint64 =1
init.31 : func() Inspect
caller : func() .uverse.address Inspect
assertOwner : func() Inspect
assertNotPaused : func() Inspect
RegisterApp : func(pkgPath string, name string, tagline string, descr string, category string, iconCID string, appURL string) uint64 Inspect
ApproveApp : func(pkgPath string) Inspect
DelistApp : func(pkgPath string) Inspect
RestoreApp : func(pkgPath string) Inspect
FlagApp : func(pkgPath string) Inspect
isVisible : func(l *memba_appstore_v1.Listing) bool Inspect
GetRegistrationFee : func() int64 Inspect
GetTreasury : func() .uverse.address Inspect
GetOwner : func() .uverse.address Inspect
AppCount : func() int Inspect
GetStatsJSON : func() string Inspect
isCurator : func(a .uverse.address) bool Inspect
mustGet : func(pkgPath string) *memba_appstore_v1.Listing Inspect
validatePkgPath : func(p string) string Inspect
hasPrefix : func(s string, pre string) bool Inspect
itoa : func(n int) string Inspect
itoa64 : func(n uint64) string Inspect
DefaultPageSize : untyped bigint =(20 <untyped> bigint)
MaxPageLimit : untyped bigint =(100 <untyped> bigint)
clampLimit : func(limit int) int Inspect
jsonEscape : func(s string) string Inspect
listingJSON : func(l *memba_appstore_v1.Listing, full bool) string Inspect
ListLiveJSON : func(offset int, limit int) string Inspect
GetListingJSON : func(pkgPath string) string Inspect
RenderMaxRows : untyped bigint =(100 <untyped> bigint)
Render : func(path string) string Inspect
moreNote : func(live int) string Inspect
esc : func(s string) string Inspect