Versions in this module Expand all Collapse all v0 v0.1.1 Sep 19, 2018 Changes in this version + func ErrPostTooOften(author types.AccountKey) sdk.Error type PostManager + func (pm PostManager) UpdateLastActivityAt(ctx sdk.Context, permlink types.Permlink) sdk.Error v0.1.0 Aug 15, 2018 Changes in this version + var TestAccountKVStoreKey = sdk.NewKVStoreKey("account") + var TestDeveloperKVStoreKey = sdk.NewKVStoreKey("developer") + var TestGlobalKVStoreKey = sdk.NewKVStoreKey("global") + var TestParamKVStoreKey = sdk.NewKVStoreKey("param") + var TestPostKVStoreKey = sdk.NewKVStoreKey("post") + func ErrAccountNotFound(author types.AccountKey) sdk.Error + func ErrCannotDonateToSelf(user types.AccountKey) sdk.Error + func ErrCommentAndRepostConflict() sdk.Error + func ErrCreatePostSourceInvalid(permlink types.Permlink) sdk.Error + func ErrDeveloperNotFound(fromApp types.AccountKey) sdk.Error + func ErrDonatePostIsDeleted(permlink types.Permlink) sdk.Error + func ErrGetSourcePost(permlink types.Permlink) sdk.Error + func ErrIdentifierLengthTooLong() sdk.Error + func ErrInvalidMemo() sdk.Error + func ErrInvalidPostRedistributionSplitRate() sdk.Error + func ErrInvalidTarget() sdk.Error + func ErrNoAuthor() sdk.Error + func ErrNoPostID() sdk.Error + func ErrNoUsername() sdk.Error + func ErrPostAlreadyExist(permlink types.Permlink) sdk.Error + func ErrPostContentExceedMaxLength() sdk.Error + func ErrPostIDTooLong() sdk.Error + func ErrPostNotFound(permlink types.Permlink) sdk.Error + func ErrPostTitleExceedMaxLength() sdk.Error + func ErrProcessDonation(permlink types.Permlink) sdk.Error + func ErrProcessSourceDonation(permlink types.Permlink) sdk.Error + func ErrRedistributionSplitRateLengthTooLong() sdk.Error + func ErrReportOrUpvoteAlreadyExist(permlink types.Permlink) sdk.Error + func ErrReportOrUpvoteTooOften() sdk.Error + func ErrTooManyURL() sdk.Error + func ErrURLLengthTooLong() sdk.Error + func ErrUpdatePostIsDeleted(permlink types.Permlink) sdk.Error + func InitGlobalManager(ctx sdk.Context, gm global.GlobalManager) error + func NewHandler(pm PostManager, am acc.AccountManager, gm global.GlobalManager, ...) sdk.Handler + func RegisterWire(cdc *wire.Codec) + type CreatePostMsg struct + Author types.AccountKey + Content string + Links []types.IDToURLMapping + ParentAuthor types.AccountKey + ParentPostID string + PostID string + RedistributionSplitRate string + SourceAuthor types.AccountKey + SourcePostID string + Title string + func NewCreatePostMsg(...) CreatePostMsg + func (msg CreatePostMsg) GetConsumeAmount() types.Coin + func (msg CreatePostMsg) GetPermission() types.Permission + func (msg CreatePostMsg) GetSignBytes() []byte + func (msg CreatePostMsg) GetSigners() []sdk.AccAddress + func (msg CreatePostMsg) String() string + func (msg CreatePostMsg) Type() string + func (msg CreatePostMsg) ValidateBasic() sdk.Error + type DeletePostMsg struct + Author types.AccountKey + PostID string + func NewDeletePostMsg(author, postID string) DeletePostMsg + func (msg DeletePostMsg) GetConsumeAmount() types.Coin + func (msg DeletePostMsg) GetPermission() types.Permission + func (msg DeletePostMsg) GetSignBytes() []byte + func (msg DeletePostMsg) GetSigners() []sdk.AccAddress + func (msg DeletePostMsg) String() string + func (msg DeletePostMsg) Type() string + func (msg DeletePostMsg) ValidateBasic() sdk.Error + type DonateMsg struct + Amount types.LNO + Author types.AccountKey + FromApp types.AccountKey + Memo string + PostID string + Username types.AccountKey + func NewDonateMsg(user string, amount types.LNO, author string, postID string, fromApp string, ...) DonateMsg + func (msg DonateMsg) GetConsumeAmount() types.Coin + func (msg DonateMsg) GetPermission() types.Permission + func (msg DonateMsg) GetSignBytes() []byte + func (msg DonateMsg) GetSigners() []sdk.AccAddress + func (msg DonateMsg) String() string + func (msg DonateMsg) Type() string + func (msg DonateMsg) ValidateBasic() sdk.Error + type PostManager struct + func NewPostManager(key sdk.StoreKey, holder param.ParamHolder) PostManager + func (pm PostManager) AddComment(ctx sdk.Context, permlink types.Permlink, commentAuthor types.AccountKey, ...) sdk.Error + func (pm PostManager) AddDonation(ctx sdk.Context, permlink types.Permlink, donator types.AccountKey, ...) sdk.Error + func (pm PostManager) AddOrUpdateViewToPost(ctx sdk.Context, permlink types.Permlink, user types.AccountKey) sdk.Error + func (pm PostManager) CreatePost(ctx sdk.Context, author types.AccountKey, postID string, ...) sdk.Error + func (pm PostManager) DeletePost(ctx sdk.Context, permlink types.Permlink) sdk.Error + func (pm PostManager) DoesPostExist(ctx sdk.Context, permlink types.Permlink) bool + func (pm PostManager) GetCreatedTimeAndReward(ctx sdk.Context, permlink types.Permlink) (int64, types.Coin, sdk.Error) + func (pm PostManager) GetPenaltyScore(ctx sdk.Context, permlink types.Permlink) (sdk.Rat, sdk.Error) + func (pm PostManager) GetRedistributionSplitRate(ctx sdk.Context, permlink types.Permlink) (sdk.Rat, sdk.Error) + func (pm PostManager) GetReportOrUpvoteInterval(ctx sdk.Context) (int64, sdk.Error) + func (pm PostManager) GetSourcePost(ctx sdk.Context, permlink types.Permlink) (types.AccountKey, string, sdk.Error) + func (pm PostManager) IsDeleted(ctx sdk.Context, permlink types.Permlink) (bool, sdk.Error) + func (pm PostManager) ReportOrUpvoteToPost(ctx sdk.Context, permlink types.Permlink, user types.AccountKey, ...) sdk.Error + func (pm PostManager) UpdatePost(ctx sdk.Context, author types.AccountKey, postID, title, content string, ...) sdk.Error + type ReportOrUpvoteMsg struct + Author types.AccountKey + IsReport bool + PostID string + Username types.AccountKey + func NewReportOrUpvoteMsg(user, author, postID string, isReport bool) ReportOrUpvoteMsg + func (msg ReportOrUpvoteMsg) GetConsumeAmount() types.Coin + func (msg ReportOrUpvoteMsg) GetPermission() types.Permission + func (msg ReportOrUpvoteMsg) GetSignBytes() []byte + func (msg ReportOrUpvoteMsg) GetSigners() []sdk.AccAddress + func (msg ReportOrUpvoteMsg) String() string + func (msg ReportOrUpvoteMsg) Type() string + func (msg ReportOrUpvoteMsg) ValidateBasic() sdk.Error + type RewardEvent struct + Consumer types.AccountKey + Evaluate types.Coin + Friction types.Coin + FromApp types.AccountKey + Original types.Coin + PostAuthor types.AccountKey + PostID string + func (event RewardEvent) Execute(ctx sdk.Context, pm PostManager, am acc.AccountManager, ...) sdk.Error + type UpdatePostMsg struct + Author types.AccountKey + Content string + Links []types.IDToURLMapping + PostID string + RedistributionSplitRate string + Title string + func NewUpdatePostMsg(author, postID, title, content string, links []types.IDToURLMapping, ...) UpdatePostMsg + func (msg UpdatePostMsg) GetConsumeAmount() types.Coin + func (msg UpdatePostMsg) GetPermission() types.Permission + func (msg UpdatePostMsg) GetSignBytes() []byte + func (msg UpdatePostMsg) GetSigners() []sdk.AccAddress + func (msg UpdatePostMsg) String() string + func (msg UpdatePostMsg) Type() string + func (msg UpdatePostMsg) ValidateBasic() sdk.Error + type ViewMsg struct + Author types.AccountKey + PostID string + Username types.AccountKey + func NewViewMsg(user, author string, postID string) ViewMsg + func (msg ViewMsg) GetConsumeAmount() types.Coin + func (msg ViewMsg) GetPermission() types.Permission + func (msg ViewMsg) GetSignBytes() []byte + func (msg ViewMsg) GetSigners() []sdk.AccAddress + func (msg ViewMsg) String() string + func (msg ViewMsg) Type() string + func (msg ViewMsg) ValidateBasic() sdk.Error