v010

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "posts"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GenesisState

type GenesisState struct {
	Posts []Post            `json:"posts"`
	Likes map[string][]Like `json:"likes"`
}

GenesisState contains the data of a v0.1.0 genesis state for the posts module

type Like

type Like struct {
	Created sdk.Int        `json:"created"` // Block height at which the like was created
	Owner   sdk.AccAddress `json:"owner"`   // User that has inserted the like
}

Reaction is a struct of a user like

type Post

type Post struct {
	PostID            PostID         `json:"id"`                 // Unique id
	ParentID          PostID         `json:"parent_id"`          // Post of which this one is a comment
	Message           string         `json:"message"`            // Message contained inside the post
	Created           sdk.Int        `json:"created"`            // Block height at which the post has been created
	LastEdited        sdk.Int        `json:"last_edited"`        // Block height at which the post has been edited the last time
	AllowsComments    bool           `json:"allows_comments"`    // Tells if users can reference this PostID as the parent
	ExternalReference string         `json:"external_reference"` // Used to know when to display this post
	Owner             sdk.AccAddress `json:"owner"`              // Creator of the post
}

Post is a struct of a post

type PostID

type PostID uint64

PostID represents a unique post id

Jump to

Keyboard shortcuts

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