Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

directory source realm

Package directory is a Remix Lab "community-directory" app generated from a project configuration. Entries are submit...

Overview

Package directory is a Remix Lab "community-directory" app generated from a project configuration. Entries are submitted through a fixed form; reviewers accept or reject them, and accepted entries are listed publicly.

Every submission is public chain data, including entries that are later rejected. Rejected entries are not shown on the rendered pages.

Authority model: every write derives the actor from cur.Previous(), the immediate caller. An intermediary realm calling on a user's behalf acts as itself and gains none of that user's roles. Block state lives in unexported variables and only inert views leave the realm.

Functions 20

func Accept

crossing Action
1func Accept(cur realm, id uint64)
source

Accept lists a submitted entry publicly. Review decisions are final.

func Descriptor

Action
1func Descriptor() core.AppDescriptor
source

Descriptor identifies this app's recipe and components.

func Entries

Action
1func Entries(offset, limit int) []core.SubmissionView
source

Entries pages through accepted entries in submission order.

func Entry

Action
1func Entry(id uint64) (core.SubmissionView, bool)
source

Entry returns an inert copy of entry id in any status.

func Invite

crossing Action
1func Invite(cur realm, addr address, role string)
source

Invite lets addr join with role. Inviting a reviewer or owner also requires the members.set_role permission.

func Invites

Action
1func Invites(offset, limit int) []core.MemberView
source

Invites returns up to limit pending invitations (at most 25) starting at offset, with the role each one grants.

func Join

crossing Action
1func Join(cur realm)
source

Join accepts the caller's pending invitation.

func Leave

crossing Action
1func Leave(cur realm)
source

Leave removes the caller from the membership.

func Members

Action
1func Members(offset, limit int) []core.MemberView
source

Members pages through members ordered by address.

func Queue

Action
1func Queue(offset, limit int) []core.SubmissionView
source

Queue pages through entries awaiting review in submission order.

func Reject

crossing Action
1func Reject(cur realm, id uint64)
source

Reject declines a submitted entry. Review decisions are final.

func Render

1func Render(path string) string
source

Render serves the native pages: overview, accepted entries, a single entry, the review queue, members and rules.

func RevokeInvite

crossing Action
1func RevokeInvite(cur realm, addr address)
source

RevokeInvite cancels a pending invitation. Revoking an invitation for a reviewer or owner also requires the members.set_role permission.

func Rules

Action
1func Rules() []policies.RuleView
source

Rules lists every operation's current rule.

func SetRole

crossing Action
1func SetRole(cur realm, addr address, role string)
source

SetRole changes addr's role.

func SetRule

crossing Action
1func SetRule(cur realm, op string, rule string)
source

SetRule changes the rule for an operation, within that operation's floor.

func Submit

crossing Action
1func Submit(cur realm, name string, link string, category string, since string, summary string) uint64
source

Submit stores an entry for review and returns its ID. Every answer is public. Leave optional fields empty.

  • name: required text, at most 80 bytes
  • link: required text, at most 200 bytes
  • category: required, one of the field's 4 choices
  • since: optional integer from 2000 to 2100
  • summary: optional multi-line text, at most 500 bytes

Dependencies

Source Files 4