Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var MsgsCodec = codec.New()
MsgsCodec is the codec
Functions ¶
func RegisterMessagesCodec ¶
RegisterMessagesCodec registers concrete types on the Amino codec
Types ¶
type MsgAddPostReaction ¶
type MsgAddPostReaction struct { PostID models.PostID `json:"post_id" yaml:"post_id"` // Id of the post to react to Reaction string `json:"reaction" yaml:"reaction"` // Reaction of the reaction User sdk.AccAddress `json:"user" yaml:"user"` // Address of the user reacting to the post }
MsgAddPostReaction defines the message to be used to add a reaction to a post
func NewMsgAddPostReaction ¶
func NewMsgAddPostReaction(postID models.PostID, value string, user sdk.AccAddress) MsgAddPostReaction
NewMsgAddPostReaction is a constructor function for MsgAddPostReaction
func (MsgAddPostReaction) GetSignBytes ¶
func (msg MsgAddPostReaction) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgAddPostReaction) GetSigners ¶
func (msg MsgAddPostReaction) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgAddPostReaction) Route ¶
func (msg MsgAddPostReaction) Route() string
Route should return the name of the module
func (MsgAddPostReaction) Type ¶
func (msg MsgAddPostReaction) Type() string
Type should return the action
func (MsgAddPostReaction) ValidateBasic ¶
func (msg MsgAddPostReaction) ValidateBasic() error
ValidateBasic runs stateless checks on the message
type MsgAnswerPoll ¶
type MsgAnswerPoll struct { PostID models.PostID `json:"post_id" yaml:"post_id"` UserAnswers []models.AnswerID `json:"answers" yaml:"answers"` Answerer sdk.AccAddress `json:"answerer" yaml:"answerer"` }
MsgAnswerPoll defines the AnswerPoll message
func NewMsgAnswerPoll ¶
func NewMsgAnswerPoll(id models.PostID, providedAnswers []models.AnswerID, answerer sdk.AccAddress) MsgAnswerPoll
NewMsgAnswerPoll is the constructor function for MsgAnswerPoll
func (MsgAnswerPoll) GetSignBytes ¶
func (msg MsgAnswerPoll) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgAnswerPoll) GetSigners ¶
func (msg MsgAnswerPoll) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgAnswerPoll) Route ¶
func (msg MsgAnswerPoll) Route() string
Route should return the name of the module
func (MsgAnswerPoll) ValidateBasic ¶
func (msg MsgAnswerPoll) ValidateBasic() error
ValidateBasic runs stateless checks on the message
type MsgCreatePost ¶
type MsgCreatePost struct { ParentID models.PostID `json:"parent_id" yaml:"parent_id"` Message string `json:"message" yaml:"message"` AllowsComments bool `json:"allows_comments" yaml:"allows_comments"` Subspace string `json:"subspace" yaml:"subspace"` OptionalData models.OptionalData `json:"optional_data,omitempty" yaml:"optional_data,omitempty"` Creator sdk.AccAddress `json:"creator" yaml:"creator"` Attachments models.Attachments `json:"attachments,omitempty" yaml:"attachments,omitempty"` PollData *models.PollData `json:"poll_data,omitempty" yaml:"poll_data,omitempty"` }
MsgCreatePost defines a CreatePost message
func NewMsgCreatePost ¶
func NewMsgCreatePost(message string, parentID models.PostID, allowsComments bool, subspace string, optionalData models.OptionalData, owner sdk.AccAddress, attachments models.Attachments, pollData *models.PollData) 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) MarshalJSON ¶
func (msg MsgCreatePost) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Mashaler interface. This is done due to the fact that Amino does not respect omitempty clauses
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 MsgEditPost ¶
type MsgEditPost struct { PostID models.PostID `json:"post_id" yaml:"post_id"` Message string `json:"message" yaml:"message"` Attachments models.Attachments `json:"attachments,omitempty" yaml:"attachments,omitempty"` PollData *models.PollData `json:"poll_data,omitempty" yaml:"poll_data,omitempty"` Editor sdk.AccAddress `json:"editor" yaml:"editor"` }
MsgEditPost defines the EditPostMessage message
func NewMsgEditPost ¶
func NewMsgEditPost(id models.PostID, message string, attachments models.Attachments, pollData *models.PollData, owner sdk.AccAddress) MsgEditPost
NewMsgEditPost is the constructor function for MsgEditPost
func (MsgEditPost) GetSignBytes ¶
func (msg MsgEditPost) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgEditPost) GetSigners ¶
func (msg MsgEditPost) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgEditPost) Route ¶
func (msg MsgEditPost) Route() string
Route should return the name of the module
func (MsgEditPost) ValidateBasic ¶
func (msg MsgEditPost) ValidateBasic() error
ValidateBasic runs stateless checks on the message
type MsgRegisterReaction ¶
type MsgRegisterReaction struct { ShortCode string `json:"shortcode" yaml:"shortcode"` Value string `json:"value" yaml:"value"` Subspace string `json:"subspace" yaml:"subspace"` Creator sdk.AccAddress `json:"creator" yaml:"creator"` }
MsgRegisterReaction represents the message that must be used when wanting to register a new reaction shortCode and the associated value
func NewMsgRegisterReaction ¶
func NewMsgRegisterReaction(creator sdk.AccAddress, shortCode, value, subspace string) MsgRegisterReaction
NewMsgRegisterReaction is a constructor function for MsgRegisterReaction
func (MsgRegisterReaction) GetSignBytes ¶
func (msg MsgRegisterReaction) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgRegisterReaction) GetSigners ¶
func (msg MsgRegisterReaction) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgRegisterReaction) Route ¶
func (msg MsgRegisterReaction) Route() string
Route should return the name of the module
func (MsgRegisterReaction) Type ¶
func (msg MsgRegisterReaction) Type() string
Type should return the action
func (MsgRegisterReaction) ValidateBasic ¶
func (msg MsgRegisterReaction) ValidateBasic() error
ValidateBasic runs stateless checks on the message
type MsgRemovePostReaction ¶
type MsgRemovePostReaction struct { PostID models.PostID `json:"post_id" yaml:"post_id"` // Id of the post to unlike Reaction string `json:"reaction" yaml:"reaction"` // Reaction of the reaction to be removed User sdk.AccAddress `json:"user" yaml:"user"` // Address of the user that has previously liked the post }
MsgRemovePostReaction defines the message to be used when wanting to remove an existing reaction from a specific user having a specific value
func NewMsgRemovePostReaction ¶
func NewMsgRemovePostReaction(postID models.PostID, user sdk.AccAddress, value string) MsgRemovePostReaction
MsgUnlikePostPost is the constructor of MsgRemovePostReaction
func (MsgRemovePostReaction) GetSignBytes ¶
func (msg MsgRemovePostReaction) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgRemovePostReaction) GetSigners ¶
func (msg MsgRemovePostReaction) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgRemovePostReaction) Route ¶
func (msg MsgRemovePostReaction) Route() string
Route should return the name of the module
func (MsgRemovePostReaction) Type ¶
func (msg MsgRemovePostReaction) Type() string
Type should return the action
func (MsgRemovePostReaction) ValidateBasic ¶
func (msg MsgRemovePostReaction) ValidateBasic() error
ValidateBasic runs stateless checks on the message