forum

package
v0.0.0-...-b2c0fe3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AN = potato.AN
View Source
var ActN = potato.ActN
View Source
var ForumAN = AN("potato.forum")
View Source
var PN = potato.PN

Functions

func NewCleanProposal

func NewCleanProposal(cleaner potato.AccountName, proposalName potato.Name, maxCount uint64) *potato.Action

CleanProposal is an action to flush proposal and allow RAM used by it.

func NewExpire

func NewExpire(proposer potato.AccountName, proposalName potato.Name) *potato.Action

NewExpire is an action to expire a proposal ahead of its natural death.

func NewPost

func NewPost(poster potato.AccountName, postUUID, content string, replyToPoster potato.AccountName, replyToPostUUID string, certify bool, jsonMetadata string) *potato.Action

NewPost is an action representing a simple message to be posted through the chain network.

func NewPropose

func NewPropose(proposer potato.AccountName, proposalName potato.Name, title string, proposalJSON string, expiresAt potato.JSONTime) *potato.Action

NewPropose is an action to submit a proposal for vote.

func NewStatus

func NewStatus(account potato.AccountName, content string) *potato.Action

Status is an action to set a status update for a given account on the forum contract.

func NewUnPost

func NewUnPost(poster potato.AccountName, postUUID string) *potato.Action

NewUnPost is an action undoing a post that is active

func NewUnVote

func NewUnVote(voter potato.AccountName, proposalName potato.Name) *potato.Action

NewUnVote is an action representing the action to undoing a current vote

func NewVote

func NewVote(voter potato.AccountName, proposalName potato.Name, voteValue uint8, voteJSON string) *potato.Action

NewVote is an action representing a simple vote to be broadcast through the chain network.

Types

type CleanProposal

type CleanProposal struct {
	ProposalName potato.Name `json:"proposal_name"`
	MaxCount     uint64      `json:"max_count"`
}

CleanProposal represents the `poc.forum::clnproposal` action.

type Expire

type Expire struct {
	ProposalName potato.Name `json:"proposal_name"`
}

Expire represents the `poc.forum::propose` action.

type Post

type Post struct {
	Poster          potato.AccountName `json:"poster"`
	PostUUID        string             `json:"post_uuid"`
	Content         string             `json:"content"`
	ReplyToPoster   potato.AccountName `json:"reply_to_poster"`
	ReplyToPostUUID string             `json:"reply_to_post_uuid"`
	Certify         bool               `json:"certify"`
	JSONMetadata    string             `json:"json_metadata"`
}

Post represents the `poc.forum::post` action.

type Propose

type Propose struct {
	Proposer     potato.AccountName `json:"proposer"`
	ProposalName potato.Name        `json:"proposal_name"`
	Title        string             `json:"title"`
	ProposalJSON string             `json:"proposal_json"`
	ExpiresAt    potato.JSONTime    `json:"expires_at"`
}

Propose represents the `poc.forum::propose` action.

type Status

type Status struct {
	Account potato.AccountName `json:"account_name"`
	Content string             `json:"content"`
}

Status represents the `poc.forum::status` action.

type UnPost

type UnPost struct {
	Poster   potato.AccountName `json:"poster"`
	PostUUID string             `json:"post_uuid"`
}

UnPost represents the `poc.forum::unpost` action.

type UnVote

type UnVote struct {
	Voter        potato.AccountName `json:"voter"`
	ProposalName potato.Name        `json:"proposal_name"`
}

UnVote represents the `poc.forum::unvote` action.

type Vote

type Vote struct {
	Voter        potato.AccountName `json:"voter"`
	ProposalName potato.Name        `json:"proposal_name"`
	Vote         uint8              `json:"vote"`
	VoteJSON     string             `json:"vote_json"`
}

Vote represents the `poc.forum::vote` action.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL