Documentation
¶
Index ¶
Constants ¶
const ( // ModuleName is the name of the module ModuleName = "community" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for routing msgs RouterKey = ModuleName // QuerierRoute to be used for querierer msgs QuerierRoute = ModuleName )
const ( // DefaultParamspace for params keeper DefaultParamspace = ModuleName )
Variables ¶
var ( PostPrefix = []byte{0x00} // prefix for keys that store posts LikePrefix = []byte{0x01} // prefix for keys that store likes FollowersPrefix = []byte{0x02} // prefix for store followers )
Key prefixes
var (
DefaultModerators = []string{}
)
var ModuleCdc = codec.New()
ModuleCdc is the codec for the module
var ParamModeratorsKey = []byte("ParamModerators")
ParamModerators is store's key for ParamModerators
Functions ¶
func IsPreviewImageValid ¶
func ParamKeyTable ¶ added in v1.0.0
ParamKeyTable type declaration for parameters
func RegisterCodec ¶
RegisterCodec registers concrete types on codec
Types ¶
type Like ¶
type Like struct { Owner sdk.AccAddress `json:"owner"` PostOwner sdk.AccAddress `json:"postOwner"` PostUUID uuid.UUID `json:"postUuid"` Weight LikeWeight `json:"weight"` }
type LikeWeight ¶
type LikeWeight int8
const ( LikeWeightUp LikeWeight = 1 LikeWeightZero LikeWeight = 0 LikeWeightDown LikeWeight = -1 )
type MsgCreatePost ¶
type MsgCreatePost struct { UUID string `json:"uuid"` Owner sdk.AccAddress `json:"owner"` Title string `json:"title"` Category Category `json:"category"` PreviewImage string `json:"previewImage"` Text string `json:"text"` }
MsgCreatePost defines a CreatePost message
func NewMsgCreatePost ¶
func NewMsgCreatePost(title string, category Category, previewImage string, text string, owner sdk.AccAddress) MsgCreatePost
NewMsgCreatePost is a constructor function for MsgCreatePost
func (MsgCreatePost) GetSignBytes ¶
func (msg MsgCreatePost) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgCreatePost) GetSigners ¶
func (msg MsgCreatePost) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgCreatePost) Route ¶
func (msg MsgCreatePost) Route() string
Route should return the name of the module
func (MsgCreatePost) ValidateBasic ¶
func (msg MsgCreatePost) ValidateBasic() error
ValidateBasic runs stateless checks on the message
type MsgDeletePost ¶
type MsgDeletePost struct { PostUUID string `json:"postUUID"` PostOwner sdk.AccAddress `json:"postOwner"` Owner sdk.AccAddress `json:"owner"` }
MsgDeletePost defines a DeletePost message
func NewMsgDeletePost ¶
func NewMsgDeletePost(owner sdk.AccAddress, postUUID uuid.UUID, postOwner sdk.AccAddress) MsgDeletePost
NewMsgDeletePost is a constructor function for MsgDeletePost
func (MsgDeletePost) GetSignBytes ¶
func (msg MsgDeletePost) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgDeletePost) GetSigners ¶
func (msg MsgDeletePost) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgDeletePost) Route ¶
func (msg MsgDeletePost) Route() string
Route should return the name of the module
func (MsgDeletePost) ValidateBasic ¶
func (msg MsgDeletePost) ValidateBasic() error
ValidateBasic runs stateless checks on the message
type MsgFollow ¶ added in v1.0.3
type MsgFollow struct { Owner sdk.AccAddress `json:"owner"` Whom sdk.AccAddress `json:"whom"` }
MsgFollow defines a MsgFollow message
func NewMsgFollow ¶ added in v1.0.3
func NewMsgFollow(owner, whom sdk.AccAddress) MsgFollow
NewMsgFollow is a constructor function for MsgFollow
func (MsgFollow) GetSignBytes ¶ added in v1.0.3
GetSignBytes encodes the message for signing
func (MsgFollow) GetSigners ¶ added in v1.0.3
func (msg MsgFollow) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgFollow) ValidateBasic ¶ added in v1.0.3
ValidateBasic runs stateless checks on the message
type MsgSetLike ¶
type MsgSetLike struct { PostOwner sdk.AccAddress `json:"postOwner"` PostUUID string `json:"postUuid"` Owner sdk.AccAddress `json:"owner"` Weight LikeWeight `json:"weight"` }
MsgSetLike defines a SetLike message
func NewMsgSetLike ¶
func NewMsgSetLike(postOwner sdk.AccAddress, postUUID uuid.UUID, owner sdk.AccAddress, weight LikeWeight) MsgSetLike
NewMsgSetLike is a constructor function for MsgSetLike
func (MsgSetLike) GetSignBytes ¶
func (msg MsgSetLike) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgSetLike) GetSigners ¶
func (msg MsgSetLike) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgSetLike) Route ¶
func (msg MsgSetLike) Route() string
Route should return the name of the module
func (MsgSetLike) ValidateBasic ¶
func (msg MsgSetLike) ValidateBasic() error
ValidateBasic runs stateless checks on the message
type MsgUnfollow ¶ added in v1.0.3
type MsgUnfollow struct { Owner sdk.AccAddress `json:"owner"` Whom sdk.AccAddress `json:"whom"` }
MsgUnfollow defines a MsgUnfollow message
func NewMsgUnfollow ¶ added in v1.0.3
func NewMsgUnfollow(owner, whom sdk.AccAddress) MsgUnfollow
NewMsgUnfollow is a constructor function for MsgUnfollow
func (MsgUnfollow) GetSignBytes ¶ added in v1.0.3
func (msg MsgUnfollow) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgUnfollow) GetSigners ¶ added in v1.0.3
func (msg MsgUnfollow) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgUnfollow) Route ¶ added in v1.0.3
func (msg MsgUnfollow) Route() string
Route should return the name of the module
func (MsgUnfollow) Type ¶ added in v1.0.3
func (msg MsgUnfollow) Type() string
Type should return the action
func (MsgUnfollow) ValidateBasic ¶ added in v1.0.3
func (msg MsgUnfollow) ValidateBasic() error
ValidateBasic runs stateless checks on the message