types

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypePostCreated         = "post_created"
	EventTypePostEdited          = "post_edited"
	EventTypePostReactionAdded   = "post_reaction_added"
	EventTypePostReactionRemoved = "post_reaction_removed"
	EventTypeAnsweredPoll        = "post_poll_answered"
	EventTypeClosePoll           = "post_poll_closed"
	EventTypeRegisterReaction    = "reaction_registered"

	// Post attributes
	AttributeKeyPostID           = "post_id"
	AttributeKeyPostParentID     = "post_parent_id"
	AttributeKeyPostOwner        = "post_owner"
	AttributeKeyPostEditTime     = "post_edit_time"
	AttributeKeyPostCreationTime = "post_creation_time"

	// Poll attributes
	AttributeKeyPollAnswerer = "poll_answerer"

	// PostReaction attributes
	AttributeKeyPostReactionOwner = "reaction_user"
	AttributeKeyPostReactionValue = "reaction_value"
	AttributeKeyReactionShortCode = "reaction_shortcode"

	// Reaction attributes
	AttributeKeyReactionCreator  = "reaction_creator"
	AttributeKeyReactionSubSpace = "reaction_subspace"
)

Posts module event types

View Source
const (
	ModuleName = "posts"
	RouterKey  = ModuleName
	StoreKey   = ModuleName

	ActionCreatePost         = "create_post"
	ActionEditPost           = "edit_post"
	ActionAnswerPoll         = "answer_poll"
	ActionAddPostReaction    = "add_post_reaction"
	ActionRemovePostReaction = "remove_post_reaction"
	ActionRegisterReaction   = "register_reaction"

	// Queries
	QuerierRoute             = ModuleName
	QueryPost                = "post"
	QueryPosts               = "posts"
	QueryPollAnswers         = "poll-answer"
	QueryRegisteredReactions = "registered-reactions"
	QueryParams              = "params"

	// Sorting
	PostSortByCreationDate  = "created"
	PostSortByID            = "id"
	PostSortOrderAscending  = "ascending"
	PostSortOrderDescending = "descending"
)
View Source
const (
	// Default params space for the params keeper
	DefaultParamSpace = ModuleName
)
View Source
const RootCodespace = "posts"

RootCodespace is the codespace for all errors defined in this package

Variables

View Source
var (
	// ErrInvalidPostID is returned if we cannot parse a post id
	ErrInvalidPostID = sdkerrors.Register(RootCodespace, 1, "invalid post id")

	// ErrInvalidSubspace is returned if a post subspace is not valid
	ErrInvalidSubspace = sdkerrors.Register(RootCodespace, 2, "invalid subspace")

	// ErrInvalidReactionCode is returned if we cannot validate a reaction short code
	ErrInvalidReactionCode = sdkerrors.Register(RootCodespace, 3,
		"invalid reaction shortcode (it must only contains a-z, 0-9, - and _ and must start and end with a ':')")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleAddress = authtypes.NewModuleAddress(ModuleName)

	PostStorePrefix          = []byte("post")
	PostIndexedIDStorePrefix = []byte("p_index")
	PostTotalNumberPrefix    = []byte("number_of_posts")
	PostCommentsStorePrefix  = []byte("comments")
	PostReactionsStorePrefix = []byte("p_reactions")
	ReactionsStorePrefix     = []byte("reactions")
	PollAnswersStorePrefix   = []byte("poll_answers")
)
View Source
var (
	ErrInvalidLengthMsgs        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsgs          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMsgs = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	MaxPostMessageLengthKey            = []byte("MaxPostMessageLength")
	MaxOptionalDataFieldsNumberKey     = []byte("MaxOptionalDataFieldsNumber")
	MaxOptionalDataFieldValueLengthKey = []byte("MaxOptionalDataFieldValueLength")
)

Parameters store keys

View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPolls        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPolls          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPolls = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPosts        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPosts          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPosts = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthReactions        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowReactions          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupReactions = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// ModuleCdc references the global x/posts module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding as Amino is
	// still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/posts and
	// defined at the application level.
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func GetEmojiByShortCodeOrValue

func GetEmojiByShortCodeOrValue(shortCodeOrValue string) (*emoji.Emoji, bool)

GetEmojiByShortCodeOrValue returns the emoji that has either one of their shortcode equals to the given string value, or its UNIX value equals to it. If such emoji is found, returns it along side with `true`. Otherwise, `false` is returned instead.

func GetTags

func GetTags(s string) []string

GetTags matches tags and returns them as an array of strings

The hashtag (#) itself is NOT included as part of the tag string

The function should match the javascript regex: '/([^\S]|^)#([^\s#.,!)]+)(?![^\s.,!)])/g'. Since golang re2 engine does not have positive lookahead, the end of the tag is matched by splitting the input string. The 'tagsSplitter' function defines the end of a tag, and the 'matchTags' regex has a requirement that it must match the end of a string.

func IsNumeric

func IsNumeric(s string) bool

IsNumeric returns whether the given string represents a numeric value or not

func IsValidPostID

func IsValidPostID(value string) bool

IsValidPostID tells whether the given value represents a valid post id or not

func IsValidReactionCode

func IsValidReactionCode(value string) bool

IsValidReactionCode tells whether the given value is a valid emoji shortcode or not

func MustMarshalUserAnswers

func MustMarshalUserAnswers(cdc codec.BinaryMarshaler, answer []UserAnswer) []byte

func ParamKeyTable

func ParamKeyTable() paramstypes.KeyTable

ParamKeyTable Key declaration for parameters

func PollAnswersStoreKey

func PollAnswersStoreKey(id string) []byte

PollAnswersStoreKey turns an id to a key used to store a post's poll answer into the posts store

func PostCommentsStoreKey

func PostCommentsStoreKey(id string) []byte

PostCommentsStoreKey turns an id to a key used to store a post's comments into the posts store

func PostIndexedIDStoreKey

func PostIndexedIDStoreKey(id string) []byte

PostIndexedIDStoreKey turns an id to a key used to store an incremental ID into the posts store

func PostReactionsStoreKey

func PostReactionsStoreKey(id string) []byte

PostCommentsStoreKey turns an id to a key used to store a post's reactions into the posts store

func PostStoreKey

func PostStoreKey(id string) []byte

PostStoreKey turns an id to a key used to store a post into the posts store

func ReactionsStoreKey

func ReactionsStoreKey(shortCode, subspace string) []byte

ReactionsStoreKey turns the combination of shortCode and subspace to a key used to store a reaction into the reaction's store

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateGenesis

func ValidateGenesis(data *GenesisState) error

ValidateGenesis validates the given genesis state and returns an error if something is invalid

func ValidateMaxOptionalDataFieldNumberParam

func ValidateMaxOptionalDataFieldNumberParam(i interface{}) error

func ValidateMaxOptionalDataFieldValueLengthParam

func ValidateMaxOptionalDataFieldValueLengthParam(i interface{}) error

func ValidateMaxPostMessageLengthParam

func ValidateMaxPostMessageLengthParam(i interface{}) error

Types

type Attachment

type Attachment struct {
	URI      string   `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri" yaml:"uri"`
	MimeType string   `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type" yaml:"mime_type"`
	Tags     []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty" yaml:"tags,omitempty"`
}

Attachment contains the information representing any type of file provided with a post. This file can be an image or a multimedia file (vocals, video, documents, etc.).

func NewAttachment

func NewAttachment(uri, mimeType string, tags []string) Attachment

NewAttachment builds a new Attachment instance with the provided data

func (*Attachment) Descriptor

func (*Attachment) Descriptor() ([]byte, []int)

func (*Attachment) Equal

func (this *Attachment) Equal(that interface{}) bool

func (*Attachment) GetMimeType

func (m *Attachment) GetMimeType() string

func (*Attachment) GetTags

func (m *Attachment) GetTags() []string

func (*Attachment) GetURI

func (m *Attachment) GetURI() string

func (*Attachment) Marshal

func (m *Attachment) Marshal() (dAtA []byte, err error)

func (*Attachment) MarshalTo

func (m *Attachment) MarshalTo(dAtA []byte) (int, error)

func (*Attachment) MarshalToSizedBuffer

func (m *Attachment) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Attachment) ProtoMessage

func (*Attachment) ProtoMessage()

func (*Attachment) Reset

func (m *Attachment) Reset()

func (*Attachment) Size

func (m *Attachment) Size() (n int)

func (*Attachment) String

func (m *Attachment) String() string

func (*Attachment) Unmarshal

func (m *Attachment) Unmarshal(dAtA []byte) error

func (Attachment) Validate

func (attachments Attachment) Validate() error

Validate implements validator

func (*Attachment) XXX_DiscardUnknown

func (m *Attachment) XXX_DiscardUnknown()

func (*Attachment) XXX_Marshal

func (m *Attachment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Attachment) XXX_Merge

func (m *Attachment) XXX_Merge(src proto.Message)

func (*Attachment) XXX_Size

func (m *Attachment) XXX_Size() int

func (*Attachment) XXX_Unmarshal

func (m *Attachment) XXX_Unmarshal(b []byte) error

type Attachments

type Attachments []Attachment

Attachments represents a slice of Attachment object

func NewAttachments

func NewAttachments(attachments ...Attachment) Attachments

NewAttachments builds a new Attachments from the given attachments

func (Attachments) AppendIfMissing

func (attachments Attachments) AppendIfMissing(otherAttachment Attachment) Attachments

AppendIfMissing appends the given otherAttachment to the atts slice if it does not exist inside it yet. It returns a new slice of Attachments containing such otherAttachment.

func (Attachments) Equal

func (attachments Attachments) Equal(other Attachments) bool

Equals returns true iff the atts slice contains the same data in the same order of the other slice

type CommentIDs

type CommentIDs struct {
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
}

CommentIDs wraps the list of comments of a post

func (CommentIDs) AppendIfMissing

func (ids CommentIDs) AppendIfMissing(id string) (CommentIDs, bool)

AppendIfMissing appends the given id to the ids slice, if not present yet. If appended, returns the new slice and true. Otherwise, returns the original slice and false.

func (*CommentIDs) Descriptor

func (*CommentIDs) Descriptor() ([]byte, []int)

func (*CommentIDs) GetIds

func (m *CommentIDs) GetIds() []string

func (*CommentIDs) Marshal

func (m *CommentIDs) Marshal() (dAtA []byte, err error)

func (*CommentIDs) MarshalTo

func (m *CommentIDs) MarshalTo(dAtA []byte) (int, error)

func (*CommentIDs) MarshalToSizedBuffer

func (m *CommentIDs) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CommentIDs) ProtoMessage

func (*CommentIDs) ProtoMessage()

func (*CommentIDs) Reset

func (m *CommentIDs) Reset()

func (*CommentIDs) Size

func (m *CommentIDs) Size() (n int)

func (*CommentIDs) String

func (m *CommentIDs) String() string

func (*CommentIDs) Unmarshal

func (m *CommentIDs) Unmarshal(dAtA []byte) error

func (*CommentIDs) XXX_DiscardUnknown

func (m *CommentIDs) XXX_DiscardUnknown()

func (*CommentIDs) XXX_Marshal

func (m *CommentIDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommentIDs) XXX_Merge

func (m *CommentIDs) XXX_Merge(src proto.Message)

func (*CommentIDs) XXX_Size

func (m *CommentIDs) XXX_Size() int

func (*CommentIDs) XXX_Unmarshal

func (m *CommentIDs) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	Posts               []Post               `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts"`
	UsersPollAnswers    []UserAnswersEntry   `protobuf:"bytes,2,rep,name=users_poll_answers,json=usersPollAnswers,proto3" json:"users_poll_answers"`
	PostsReactions      []PostReactionsEntry `protobuf:"bytes,3,rep,name=posts_reactions,json=postsReactions,proto3" json:"posts_reactions"`
	RegisteredReactions []RegisteredReaction `protobuf:"bytes,4,rep,name=registered_reactions,json=registeredReactions,proto3" json:"registered_reactions"`
	Params              Params               `protobuf:"bytes,5,opt,name=params,proto3" json:"params"`
}

GenesisState contains the data of the genesis state for the posts module

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a default GenesisState

func NewGenesisState

func NewGenesisState(
	posts []Post, userPollAnswers []UserAnswersEntry,
	postReactions []PostReactionsEntry, registeredReactions []RegisteredReaction, params Params,
) *GenesisState

NewGenesisState creates a new genesis state

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPosts

func (m *GenesisState) GetPosts() []Post

func (*GenesisState) GetPostsReactions

func (m *GenesisState) GetPostsReactions() []PostReactionsEntry

func (*GenesisState) GetRegisteredReactions

func (m *GenesisState) GetRegisteredReactions() []RegisteredReaction

func (*GenesisState) GetUsersPollAnswers

func (m *GenesisState) GetUsersPollAnswers() []UserAnswersEntry

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgAddPostReaction

type MsgAddPostReaction struct {
	PostId   string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
	Reaction string `protobuf:"bytes,2,opt,name=reaction,proto3" json:"reaction,omitempty" yaml:"reaction"`
	User     string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty" yaml:"user"`
}

MsgAddPostReaction represents the message to be used to add a reaction to a post

func NewMsgAddPostReaction

func NewMsgAddPostReaction(postID string, value string, user string) *MsgAddPostReaction

NewMsgAddPostReaction is a constructor function for MsgAddPostReaction

func (*MsgAddPostReaction) Descriptor

func (*MsgAddPostReaction) Descriptor() ([]byte, []int)

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) Marshal

func (m *MsgAddPostReaction) Marshal() (dAtA []byte, err error)

func (*MsgAddPostReaction) MarshalTo

func (m *MsgAddPostReaction) MarshalTo(dAtA []byte) (int, error)

func (*MsgAddPostReaction) MarshalToSizedBuffer

func (m *MsgAddPostReaction) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgAddPostReaction) ProtoMessage

func (*MsgAddPostReaction) ProtoMessage()

func (*MsgAddPostReaction) Reset

func (m *MsgAddPostReaction) Reset()

func (MsgAddPostReaction) Route

func (msg MsgAddPostReaction) Route() string

Route should return the name of the module

func (*MsgAddPostReaction) Size

func (m *MsgAddPostReaction) Size() (n int)

func (*MsgAddPostReaction) String

func (m *MsgAddPostReaction) String() string

func (MsgAddPostReaction) Type

func (msg MsgAddPostReaction) Type() string

Type should return the action

func (*MsgAddPostReaction) Unmarshal

func (m *MsgAddPostReaction) Unmarshal(dAtA []byte) error

func (MsgAddPostReaction) ValidateBasic

func (msg MsgAddPostReaction) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgAddPostReaction) XXX_DiscardUnknown

func (m *MsgAddPostReaction) XXX_DiscardUnknown()

func (*MsgAddPostReaction) XXX_Marshal

func (m *MsgAddPostReaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgAddPostReaction) XXX_Merge

func (m *MsgAddPostReaction) XXX_Merge(src proto.Message)

func (*MsgAddPostReaction) XXX_Size

func (m *MsgAddPostReaction) XXX_Size() int

func (*MsgAddPostReaction) XXX_Unmarshal

func (m *MsgAddPostReaction) XXX_Unmarshal(b []byte) error

type MsgAddPostReactionResponse

type MsgAddPostReactionResponse struct {
}

MsgAddPostReactionResponse defines the Msg/AddReaction response type.

func (*MsgAddPostReactionResponse) Descriptor

func (*MsgAddPostReactionResponse) Descriptor() ([]byte, []int)

func (*MsgAddPostReactionResponse) Marshal

func (m *MsgAddPostReactionResponse) Marshal() (dAtA []byte, err error)

func (*MsgAddPostReactionResponse) MarshalTo

func (m *MsgAddPostReactionResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgAddPostReactionResponse) MarshalToSizedBuffer

func (m *MsgAddPostReactionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgAddPostReactionResponse) ProtoMessage

func (*MsgAddPostReactionResponse) ProtoMessage()

func (*MsgAddPostReactionResponse) Reset

func (m *MsgAddPostReactionResponse) Reset()

func (*MsgAddPostReactionResponse) Size

func (m *MsgAddPostReactionResponse) Size() (n int)

func (*MsgAddPostReactionResponse) String

func (m *MsgAddPostReactionResponse) String() string

func (*MsgAddPostReactionResponse) Unmarshal

func (m *MsgAddPostReactionResponse) Unmarshal(dAtA []byte) error

func (*MsgAddPostReactionResponse) XXX_DiscardUnknown

func (m *MsgAddPostReactionResponse) XXX_DiscardUnknown()

func (*MsgAddPostReactionResponse) XXX_Marshal

func (m *MsgAddPostReactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgAddPostReactionResponse) XXX_Merge

func (m *MsgAddPostReactionResponse) XXX_Merge(src proto.Message)

func (*MsgAddPostReactionResponse) XXX_Size

func (m *MsgAddPostReactionResponse) XXX_Size() int

func (*MsgAddPostReactionResponse) XXX_Unmarshal

func (m *MsgAddPostReactionResponse) XXX_Unmarshal(b []byte) error

type MsgAnswerPoll

type MsgAnswerPoll struct {
	PostId      string   `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
	UserAnswers []string `protobuf:"bytes,2,rep,name=user_answers,json=userAnswers,proto3" json:"answers" yaml:"answers"`
	Answerer    string   `protobuf:"bytes,3,opt,name=answerer,proto3" json:"answerer,omitempty" yaml:"answerer"`
}

MsgAnswerPoll represents the message to be used when wanting to answer a poll

func NewMsgAnswerPoll

func NewMsgAnswerPoll(id string, providedAnswers []string, answerer string) *MsgAnswerPoll

NewMsgAnswerPoll is the constructor function for MsgAnswerPoll

func (*MsgAnswerPoll) Descriptor

func (*MsgAnswerPoll) Descriptor() ([]byte, []int)

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) Marshal

func (m *MsgAnswerPoll) Marshal() (dAtA []byte, err error)

func (*MsgAnswerPoll) MarshalTo

func (m *MsgAnswerPoll) MarshalTo(dAtA []byte) (int, error)

func (*MsgAnswerPoll) MarshalToSizedBuffer

func (m *MsgAnswerPoll) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgAnswerPoll) ProtoMessage

func (*MsgAnswerPoll) ProtoMessage()

func (*MsgAnswerPoll) Reset

func (m *MsgAnswerPoll) Reset()

func (MsgAnswerPoll) Route

func (msg MsgAnswerPoll) Route() string

Route should return the name of the module

func (*MsgAnswerPoll) Size

func (m *MsgAnswerPoll) Size() (n int)

func (*MsgAnswerPoll) String

func (m *MsgAnswerPoll) String() string

func (MsgAnswerPoll) Type

func (msg MsgAnswerPoll) Type() string

Type should return the action

func (*MsgAnswerPoll) Unmarshal

func (m *MsgAnswerPoll) Unmarshal(dAtA []byte) error

func (MsgAnswerPoll) ValidateBasic

func (msg MsgAnswerPoll) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgAnswerPoll) XXX_DiscardUnknown

func (m *MsgAnswerPoll) XXX_DiscardUnknown()

func (*MsgAnswerPoll) XXX_Marshal

func (m *MsgAnswerPoll) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgAnswerPoll) XXX_Merge

func (m *MsgAnswerPoll) XXX_Merge(src proto.Message)

func (*MsgAnswerPoll) XXX_Size

func (m *MsgAnswerPoll) XXX_Size() int

func (*MsgAnswerPoll) XXX_Unmarshal

func (m *MsgAnswerPoll) XXX_Unmarshal(b []byte) error

type MsgAnswerPollResponse

type MsgAnswerPollResponse struct {
}

MsgAnswerPollResponse defines the Msg/AnswerPoll response type.

func (*MsgAnswerPollResponse) Descriptor

func (*MsgAnswerPollResponse) Descriptor() ([]byte, []int)

func (*MsgAnswerPollResponse) Marshal

func (m *MsgAnswerPollResponse) Marshal() (dAtA []byte, err error)

func (*MsgAnswerPollResponse) MarshalTo

func (m *MsgAnswerPollResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgAnswerPollResponse) MarshalToSizedBuffer

func (m *MsgAnswerPollResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgAnswerPollResponse) ProtoMessage

func (*MsgAnswerPollResponse) ProtoMessage()

func (*MsgAnswerPollResponse) Reset

func (m *MsgAnswerPollResponse) Reset()

func (*MsgAnswerPollResponse) Size

func (m *MsgAnswerPollResponse) Size() (n int)

func (*MsgAnswerPollResponse) String

func (m *MsgAnswerPollResponse) String() string

func (*MsgAnswerPollResponse) Unmarshal

func (m *MsgAnswerPollResponse) Unmarshal(dAtA []byte) error

func (*MsgAnswerPollResponse) XXX_DiscardUnknown

func (m *MsgAnswerPollResponse) XXX_DiscardUnknown()

func (*MsgAnswerPollResponse) XXX_Marshal

func (m *MsgAnswerPollResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgAnswerPollResponse) XXX_Merge

func (m *MsgAnswerPollResponse) XXX_Merge(src proto.Message)

func (*MsgAnswerPollResponse) XXX_Size

func (m *MsgAnswerPollResponse) XXX_Size() int

func (*MsgAnswerPollResponse) XXX_Unmarshal

func (m *MsgAnswerPollResponse) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// CreatePost defines the method to create a post
	CreatePost(ctx context.Context, in *MsgCreatePost, opts ...grpc.CallOption) (*MsgCreatePostResponse, error)
	// EditPost defines the method to edit an existing post
	EditPost(ctx context.Context, in *MsgEditPost, opts ...grpc.CallOption) (*MsgEditPostResponse, error)
	// AddReaction defines the method to add a reaction to a post
	AddPostReaction(ctx context.Context, in *MsgAddPostReaction, opts ...grpc.CallOption) (*MsgAddPostReactionResponse, error)
	// RemoveReaction defines the method to remove a reaction from a post
	RemovePostReaction(ctx context.Context, in *MsgRemovePostReaction, opts ...grpc.CallOption) (*MsgRemovePostReactionResponse, error)
	// RegisterReaction defines the method to register a new reaction
	RegisterReaction(ctx context.Context, in *MsgRegisterReaction, opts ...grpc.CallOption) (*MsgRegisterReactionResponse, error)
	// AnswerPoll defines the method to answer a poll
	AnswerPoll(ctx context.Context, in *MsgAnswerPoll, opts ...grpc.CallOption) (*MsgAnswerPollResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreatePost

type MsgCreatePost struct {
	ParentId       string       `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id" yaml:"parent_id"`
	Message        string       `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" yaml:"message"`
	AllowsComments bool         `protobuf:"varint,3,opt,name=allows_comments,json=allowsComments,proto3" json:"allows_comments" yaml:"allows_comments"`
	Subspace       string       `protobuf:"bytes,4,opt,name=subspace,proto3" json:"subspace,omitempty" yaml:"subspace"`
	OptionalData   OptionalData `` /* 154-byte string literal not displayed */
	Creator        string       `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	Attachments    []Attachment `protobuf:"bytes,7,rep,name=attachments,proto3" json:"attachments,omitempty" yaml:"attachments,omitempty"`
	PollData       *PollData    `protobuf:"bytes,8,opt,name=poll_data,json=pollData,proto3" json:"poll_data,omitempty" yaml:"poll_data,omitempty"`
}

MsgCreatePost represents the message to be used to create a post.

func NewMsgCreatePost

func NewMsgCreatePost(
	message string, parentID string, allowsComments bool, subspace string,
	optionalData OptionalData, owner string, attachments Attachments, pollData *PollData,
) *MsgCreatePost

NewMsgCreatePost is a constructor function for MsgCreatePost

func (*MsgCreatePost) Descriptor

func (*MsgCreatePost) Descriptor() ([]byte, []int)

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) Marshal

func (m *MsgCreatePost) Marshal() (dAtA []byte, err error)

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) MarshalTo

func (m *MsgCreatePost) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreatePost) MarshalToSizedBuffer

func (m *MsgCreatePost) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreatePost) ProtoMessage

func (*MsgCreatePost) ProtoMessage()

func (*MsgCreatePost) Reset

func (m *MsgCreatePost) Reset()

func (MsgCreatePost) Route

func (msg MsgCreatePost) Route() string

Route should return the name of the module

func (*MsgCreatePost) Size

func (m *MsgCreatePost) Size() (n int)

func (*MsgCreatePost) String

func (m *MsgCreatePost) String() string

func (MsgCreatePost) Type

func (msg MsgCreatePost) Type() string

Type should return the action

func (*MsgCreatePost) Unmarshal

func (m *MsgCreatePost) Unmarshal(dAtA []byte) error

func (MsgCreatePost) ValidateBasic

func (msg MsgCreatePost) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgCreatePost) XXX_DiscardUnknown

func (m *MsgCreatePost) XXX_DiscardUnknown()

func (*MsgCreatePost) XXX_Marshal

func (m *MsgCreatePost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreatePost) XXX_Merge

func (m *MsgCreatePost) XXX_Merge(src proto.Message)

func (*MsgCreatePost) XXX_Size

func (m *MsgCreatePost) XXX_Size() int

func (*MsgCreatePost) XXX_Unmarshal

func (m *MsgCreatePost) XXX_Unmarshal(b []byte) error

type MsgCreatePostResponse

type MsgCreatePostResponse struct {
}

MsgCreatePostResponse defines the Msg/CreatePost response type.

func (*MsgCreatePostResponse) Descriptor

func (*MsgCreatePostResponse) Descriptor() ([]byte, []int)

func (*MsgCreatePostResponse) Marshal

func (m *MsgCreatePostResponse) Marshal() (dAtA []byte, err error)

func (*MsgCreatePostResponse) MarshalTo

func (m *MsgCreatePostResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreatePostResponse) MarshalToSizedBuffer

func (m *MsgCreatePostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreatePostResponse) ProtoMessage

func (*MsgCreatePostResponse) ProtoMessage()

func (*MsgCreatePostResponse) Reset

func (m *MsgCreatePostResponse) Reset()

func (*MsgCreatePostResponse) Size

func (m *MsgCreatePostResponse) Size() (n int)

func (*MsgCreatePostResponse) String

func (m *MsgCreatePostResponse) String() string

func (*MsgCreatePostResponse) Unmarshal

func (m *MsgCreatePostResponse) Unmarshal(dAtA []byte) error

func (*MsgCreatePostResponse) XXX_DiscardUnknown

func (m *MsgCreatePostResponse) XXX_DiscardUnknown()

func (*MsgCreatePostResponse) XXX_Marshal

func (m *MsgCreatePostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreatePostResponse) XXX_Merge

func (m *MsgCreatePostResponse) XXX_Merge(src proto.Message)

func (*MsgCreatePostResponse) XXX_Size

func (m *MsgCreatePostResponse) XXX_Size() int

func (*MsgCreatePostResponse) XXX_Unmarshal

func (m *MsgCreatePostResponse) XXX_Unmarshal(b []byte) error

type MsgEditPost

type MsgEditPost struct {
	PostId      string       `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
	Message     string       `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" yaml:"message"`
	Attachments []Attachment `protobuf:"bytes,3,rep,name=attachments,proto3" json:"attachments,omitempty" yaml:"attachments,omitempty"`
	PollData    *PollData    `protobuf:"bytes,4,opt,name=poll_data,json=pollData,proto3" json:"poll_data,omitempty" yaml:"poll_data,omitempty"`
	Editor      string       `protobuf:"bytes,5,opt,name=editor,proto3" json:"editor,omitempty" yaml:"editor"`
}

MsgEditPost represents the message used to edit a post.

func NewMsgEditPost

func NewMsgEditPost(
	id string, message string, attachments Attachments, pollData *PollData, owner string,
) *MsgEditPost

NewMsgEditPost is the constructor function for MsgEditPost

func (*MsgEditPost) Descriptor

func (*MsgEditPost) Descriptor() ([]byte, []int)

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) Marshal

func (m *MsgEditPost) Marshal() (dAtA []byte, err error)

func (*MsgEditPost) MarshalTo

func (m *MsgEditPost) MarshalTo(dAtA []byte) (int, error)

func (*MsgEditPost) MarshalToSizedBuffer

func (m *MsgEditPost) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEditPost) ProtoMessage

func (*MsgEditPost) ProtoMessage()

func (*MsgEditPost) Reset

func (m *MsgEditPost) Reset()

func (MsgEditPost) Route

func (msg MsgEditPost) Route() string

Route should return the name of the module

func (*MsgEditPost) Size

func (m *MsgEditPost) Size() (n int)

func (*MsgEditPost) String

func (m *MsgEditPost) String() string

func (MsgEditPost) Type

func (msg MsgEditPost) Type() string

Type should return the action

func (*MsgEditPost) Unmarshal

func (m *MsgEditPost) Unmarshal(dAtA []byte) error

func (MsgEditPost) ValidateBasic

func (msg MsgEditPost) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgEditPost) XXX_DiscardUnknown

func (m *MsgEditPost) XXX_DiscardUnknown()

func (*MsgEditPost) XXX_Marshal

func (m *MsgEditPost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEditPost) XXX_Merge

func (m *MsgEditPost) XXX_Merge(src proto.Message)

func (*MsgEditPost) XXX_Size

func (m *MsgEditPost) XXX_Size() int

func (*MsgEditPost) XXX_Unmarshal

func (m *MsgEditPost) XXX_Unmarshal(b []byte) error

type MsgEditPostResponse

type MsgEditPostResponse struct {
}

MsgEditPostResponse defines the Msg/EditPost response type.

func (*MsgEditPostResponse) Descriptor

func (*MsgEditPostResponse) Descriptor() ([]byte, []int)

func (*MsgEditPostResponse) Marshal

func (m *MsgEditPostResponse) Marshal() (dAtA []byte, err error)

func (*MsgEditPostResponse) MarshalTo

func (m *MsgEditPostResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgEditPostResponse) MarshalToSizedBuffer

func (m *MsgEditPostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEditPostResponse) ProtoMessage

func (*MsgEditPostResponse) ProtoMessage()

func (*MsgEditPostResponse) Reset

func (m *MsgEditPostResponse) Reset()

func (*MsgEditPostResponse) Size

func (m *MsgEditPostResponse) Size() (n int)

func (*MsgEditPostResponse) String

func (m *MsgEditPostResponse) String() string

func (*MsgEditPostResponse) Unmarshal

func (m *MsgEditPostResponse) Unmarshal(dAtA []byte) error

func (*MsgEditPostResponse) XXX_DiscardUnknown

func (m *MsgEditPostResponse) XXX_DiscardUnknown()

func (*MsgEditPostResponse) XXX_Marshal

func (m *MsgEditPostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEditPostResponse) XXX_Merge

func (m *MsgEditPostResponse) XXX_Merge(src proto.Message)

func (*MsgEditPostResponse) XXX_Size

func (m *MsgEditPostResponse) XXX_Size() int

func (*MsgEditPostResponse) XXX_Unmarshal

func (m *MsgEditPostResponse) XXX_Unmarshal(b []byte) error

type MsgRegisterReaction

type MsgRegisterReaction struct {
	ShortCode string `protobuf:"bytes,1,opt,name=short_code,json=shortCode,proto3" json:"short_code" yaml:"short_code"`
	Value     string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty" yaml:"value"`
	Subspace  string `protobuf:"bytes,3,opt,name=subspace,proto3" json:"subspace,omitempty" yaml:"subspace"`
	Creator   string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty" 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 string, shortCode, value, subspace string) *MsgRegisterReaction

NewMsgRegisterReaction is a constructor function for MsgRegisterReaction

func (*MsgRegisterReaction) Descriptor

func (*MsgRegisterReaction) Descriptor() ([]byte, []int)

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) Marshal

func (m *MsgRegisterReaction) Marshal() (dAtA []byte, err error)

func (*MsgRegisterReaction) MarshalTo

func (m *MsgRegisterReaction) MarshalTo(dAtA []byte) (int, error)

func (*MsgRegisterReaction) MarshalToSizedBuffer

func (m *MsgRegisterReaction) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRegisterReaction) ProtoMessage

func (*MsgRegisterReaction) ProtoMessage()

func (*MsgRegisterReaction) Reset

func (m *MsgRegisterReaction) Reset()

func (MsgRegisterReaction) Route

func (msg MsgRegisterReaction) Route() string

Route should return the name of the module

func (*MsgRegisterReaction) Size

func (m *MsgRegisterReaction) Size() (n int)

func (*MsgRegisterReaction) String

func (m *MsgRegisterReaction) String() string

func (MsgRegisterReaction) Type

func (msg MsgRegisterReaction) Type() string

Type should return the action

func (*MsgRegisterReaction) Unmarshal

func (m *MsgRegisterReaction) Unmarshal(dAtA []byte) error

func (MsgRegisterReaction) ValidateBasic

func (msg MsgRegisterReaction) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgRegisterReaction) XXX_DiscardUnknown

func (m *MsgRegisterReaction) XXX_DiscardUnknown()

func (*MsgRegisterReaction) XXX_Marshal

func (m *MsgRegisterReaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRegisterReaction) XXX_Merge

func (m *MsgRegisterReaction) XXX_Merge(src proto.Message)

func (*MsgRegisterReaction) XXX_Size

func (m *MsgRegisterReaction) XXX_Size() int

func (*MsgRegisterReaction) XXX_Unmarshal

func (m *MsgRegisterReaction) XXX_Unmarshal(b []byte) error

type MsgRegisterReactionResponse

type MsgRegisterReactionResponse struct {
}

MsgRegisterReactionResponse defines the Msg/RegisterReaction response type.

func (*MsgRegisterReactionResponse) Descriptor

func (*MsgRegisterReactionResponse) Descriptor() ([]byte, []int)

func (*MsgRegisterReactionResponse) Marshal

func (m *MsgRegisterReactionResponse) Marshal() (dAtA []byte, err error)

func (*MsgRegisterReactionResponse) MarshalTo

func (m *MsgRegisterReactionResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgRegisterReactionResponse) MarshalToSizedBuffer

func (m *MsgRegisterReactionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRegisterReactionResponse) ProtoMessage

func (*MsgRegisterReactionResponse) ProtoMessage()

func (*MsgRegisterReactionResponse) Reset

func (m *MsgRegisterReactionResponse) Reset()

func (*MsgRegisterReactionResponse) Size

func (m *MsgRegisterReactionResponse) Size() (n int)

func (*MsgRegisterReactionResponse) String

func (m *MsgRegisterReactionResponse) String() string

func (*MsgRegisterReactionResponse) Unmarshal

func (m *MsgRegisterReactionResponse) Unmarshal(dAtA []byte) error

func (*MsgRegisterReactionResponse) XXX_DiscardUnknown

func (m *MsgRegisterReactionResponse) XXX_DiscardUnknown()

func (*MsgRegisterReactionResponse) XXX_Marshal

func (m *MsgRegisterReactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRegisterReactionResponse) XXX_Merge

func (m *MsgRegisterReactionResponse) XXX_Merge(src proto.Message)

func (*MsgRegisterReactionResponse) XXX_Size

func (m *MsgRegisterReactionResponse) XXX_Size() int

func (*MsgRegisterReactionResponse) XXX_Unmarshal

func (m *MsgRegisterReactionResponse) XXX_Unmarshal(b []byte) error

type MsgRemovePostReaction

type MsgRemovePostReaction struct {
	PostId   string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
	Reaction string `protobuf:"bytes,2,opt,name=reaction,proto3" json:"reaction,omitempty" yaml:"reaction"`
	User     string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty" yaml:"user"`
}

MsgRemovePostReaction represents 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 string, user string, value string) *MsgRemovePostReaction

NewMsgRemovePostReaction is the constructor of MsgRemovePostReaction

func (*MsgRemovePostReaction) Descriptor

func (*MsgRemovePostReaction) Descriptor() ([]byte, []int)

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) Marshal

func (m *MsgRemovePostReaction) Marshal() (dAtA []byte, err error)

func (*MsgRemovePostReaction) MarshalTo

func (m *MsgRemovePostReaction) MarshalTo(dAtA []byte) (int, error)

func (*MsgRemovePostReaction) MarshalToSizedBuffer

func (m *MsgRemovePostReaction) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRemovePostReaction) ProtoMessage

func (*MsgRemovePostReaction) ProtoMessage()

func (*MsgRemovePostReaction) Reset

func (m *MsgRemovePostReaction) Reset()

func (MsgRemovePostReaction) Route

func (msg MsgRemovePostReaction) Route() string

Route should return the name of the module

func (*MsgRemovePostReaction) Size

func (m *MsgRemovePostReaction) Size() (n int)

func (*MsgRemovePostReaction) String

func (m *MsgRemovePostReaction) String() string

func (MsgRemovePostReaction) Type

func (msg MsgRemovePostReaction) Type() string

Type should return the action

func (*MsgRemovePostReaction) Unmarshal

func (m *MsgRemovePostReaction) Unmarshal(dAtA []byte) error

func (MsgRemovePostReaction) ValidateBasic

func (msg MsgRemovePostReaction) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgRemovePostReaction) XXX_DiscardUnknown

func (m *MsgRemovePostReaction) XXX_DiscardUnknown()

func (*MsgRemovePostReaction) XXX_Marshal

func (m *MsgRemovePostReaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRemovePostReaction) XXX_Merge

func (m *MsgRemovePostReaction) XXX_Merge(src proto.Message)

func (*MsgRemovePostReaction) XXX_Size

func (m *MsgRemovePostReaction) XXX_Size() int

func (*MsgRemovePostReaction) XXX_Unmarshal

func (m *MsgRemovePostReaction) XXX_Unmarshal(b []byte) error

type MsgRemovePostReactionResponse

type MsgRemovePostReactionResponse struct {
}

MsgRemovePostReactionResponse defines the Msg/RemovePostReaction response type.

func (*MsgRemovePostReactionResponse) Descriptor

func (*MsgRemovePostReactionResponse) Descriptor() ([]byte, []int)

func (*MsgRemovePostReactionResponse) Marshal

func (m *MsgRemovePostReactionResponse) Marshal() (dAtA []byte, err error)

func (*MsgRemovePostReactionResponse) MarshalTo

func (m *MsgRemovePostReactionResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgRemovePostReactionResponse) MarshalToSizedBuffer

func (m *MsgRemovePostReactionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRemovePostReactionResponse) ProtoMessage

func (*MsgRemovePostReactionResponse) ProtoMessage()

func (*MsgRemovePostReactionResponse) Reset

func (m *MsgRemovePostReactionResponse) Reset()

func (*MsgRemovePostReactionResponse) Size

func (m *MsgRemovePostReactionResponse) Size() (n int)

func (*MsgRemovePostReactionResponse) String

func (*MsgRemovePostReactionResponse) Unmarshal

func (m *MsgRemovePostReactionResponse) Unmarshal(dAtA []byte) error

func (*MsgRemovePostReactionResponse) XXX_DiscardUnknown

func (m *MsgRemovePostReactionResponse) XXX_DiscardUnknown()

func (*MsgRemovePostReactionResponse) XXX_Marshal

func (m *MsgRemovePostReactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRemovePostReactionResponse) XXX_Merge

func (m *MsgRemovePostReactionResponse) XXX_Merge(src proto.Message)

func (*MsgRemovePostReactionResponse) XXX_Size

func (m *MsgRemovePostReactionResponse) XXX_Size() int

func (*MsgRemovePostReactionResponse) XXX_Unmarshal

func (m *MsgRemovePostReactionResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// CreatePost defines the method to create a post
	CreatePost(context.Context, *MsgCreatePost) (*MsgCreatePostResponse, error)
	// EditPost defines the method to edit an existing post
	EditPost(context.Context, *MsgEditPost) (*MsgEditPostResponse, error)
	// AddReaction defines the method to add a reaction to a post
	AddPostReaction(context.Context, *MsgAddPostReaction) (*MsgAddPostReactionResponse, error)
	// RemoveReaction defines the method to remove a reaction from a post
	RemovePostReaction(context.Context, *MsgRemovePostReaction) (*MsgRemovePostReactionResponse, error)
	// RegisterReaction defines the method to register a new reaction
	RegisterReaction(context.Context, *MsgRegisterReaction) (*MsgRegisterReactionResponse, error)
	// AnswerPoll defines the method to answer a poll
	AnswerPoll(context.Context, *MsgAnswerPoll) (*MsgAnswerPollResponse, error)
}

MsgServer is the server API for Msg service.

type OptionalData

type OptionalData []OptionalDataEntry

type OptionalDataEntry

type OptionalDataEntry struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

OptionalDataEntry represents a Posts' optional data entry and allows for custom Amino and JSON serialization and deserialization.

func NewOptionalDataEntry

func NewOptionalDataEntry(key, value string) OptionalDataEntry

NewOptionalDataEntry returns a new OptionalDataEntry object

func (*OptionalDataEntry) Descriptor

func (*OptionalDataEntry) Descriptor() ([]byte, []int)

func (*OptionalDataEntry) Equal

func (this *OptionalDataEntry) Equal(that interface{}) bool

func (*OptionalDataEntry) GetKey

func (m *OptionalDataEntry) GetKey() string

func (*OptionalDataEntry) GetValue

func (m *OptionalDataEntry) GetValue() string

func (*OptionalDataEntry) Marshal

func (m *OptionalDataEntry) Marshal() (dAtA []byte, err error)

func (*OptionalDataEntry) MarshalTo

func (m *OptionalDataEntry) MarshalTo(dAtA []byte) (int, error)

func (*OptionalDataEntry) MarshalToSizedBuffer

func (m *OptionalDataEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OptionalDataEntry) ProtoMessage

func (*OptionalDataEntry) ProtoMessage()

func (*OptionalDataEntry) Reset

func (m *OptionalDataEntry) Reset()

func (*OptionalDataEntry) Size

func (m *OptionalDataEntry) Size() (n int)

func (*OptionalDataEntry) String

func (m *OptionalDataEntry) String() string

func (*OptionalDataEntry) Unmarshal

func (m *OptionalDataEntry) Unmarshal(dAtA []byte) error

func (*OptionalDataEntry) XXX_DiscardUnknown

func (m *OptionalDataEntry) XXX_DiscardUnknown()

func (*OptionalDataEntry) XXX_Marshal

func (m *OptionalDataEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OptionalDataEntry) XXX_Merge

func (m *OptionalDataEntry) XXX_Merge(src proto.Message)

func (*OptionalDataEntry) XXX_Size

func (m *OptionalDataEntry) XXX_Size() int

func (*OptionalDataEntry) XXX_Unmarshal

func (m *OptionalDataEntry) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	MaxPostMessageLength            github_com_cosmos_cosmos_sdk_types.Int `` /* 196-byte string literal not displayed */
	MaxOptionalDataFieldsNumber     github_com_cosmos_cosmos_sdk_types.Int `` /* 227-byte string literal not displayed */
	MaxOptionalDataFieldValueLength github_com_cosmos_cosmos_sdk_types.Int `` /* 246-byte string literal not displayed */
}

Params contains the parameters for the posts module

func DefaultParams

func DefaultParams() Params

DefaultParams return default params object

func NewParams

func NewParams(maxPostMLen, maxOpDataFieldNum, maxOpDataFieldValLen sdk.Int) Params

NewParams creates a new Params obj

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs

func (params *Params) ParamSetPairs() paramstypes.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns the key/value pairs of posts module's parameters.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (params Params) Validate() error

Validate perform basic checks on all parameters to ensure they are correct

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type PollAnswer

type PollAnswer struct {
	ID   string `protobuf:"bytes,1,opt,name=answer_id,json=answerId,proto3" json:"answer_id" yaml:"id"`
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text" yaml:"text"`
}

PollAnswer contains the data of a single poll answer inserted by the creator

func NewPollAnswer

func NewPollAnswer(id string, text string) PollAnswer

NewPollAnswer returns a new PollAnswer object

func (*PollAnswer) Descriptor

func (*PollAnswer) Descriptor() ([]byte, []int)

func (*PollAnswer) Equal

func (this *PollAnswer) Equal(that interface{}) bool

func (*PollAnswer) GetID

func (m *PollAnswer) GetID() string

func (*PollAnswer) GetText

func (m *PollAnswer) GetText() string

func (*PollAnswer) Marshal

func (m *PollAnswer) Marshal() (dAtA []byte, err error)

func (*PollAnswer) MarshalTo

func (m *PollAnswer) MarshalTo(dAtA []byte) (int, error)

func (*PollAnswer) MarshalToSizedBuffer

func (m *PollAnswer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PollAnswer) ProtoMessage

func (*PollAnswer) ProtoMessage()

func (*PollAnswer) Reset

func (m *PollAnswer) Reset()

func (*PollAnswer) Size

func (m *PollAnswer) Size() (n int)

func (*PollAnswer) String

func (m *PollAnswer) String() string

func (*PollAnswer) Unmarshal

func (m *PollAnswer) Unmarshal(dAtA []byte) error

func (PollAnswer) Validate

func (answer PollAnswer) Validate() error

Validate implements validator

func (*PollAnswer) XXX_DiscardUnknown

func (m *PollAnswer) XXX_DiscardUnknown()

func (*PollAnswer) XXX_Marshal

func (m *PollAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PollAnswer) XXX_Merge

func (m *PollAnswer) XXX_Merge(src proto.Message)

func (*PollAnswer) XXX_Size

func (m *PollAnswer) XXX_Size() int

func (*PollAnswer) XXX_Unmarshal

func (m *PollAnswer) XXX_Unmarshal(b []byte) error

type PollAnswers

type PollAnswers []PollAnswer

PollAnswers represent a slice of PollAnswer objects

func NewPollAnswers

func NewPollAnswers(answers ...PollAnswer) PollAnswers

NewPollAnswers builds a new PollAnswers object from the given answer

func (PollAnswers) AppendIfMissing

func (answers PollAnswers) AppendIfMissing(answer PollAnswer) PollAnswers

AppendIfMissing appends the given answer to the answer slice if it does not exist inside it yet. It returns a new slice of PollAnswers containing such PollAnswer.

type PollData

type PollData struct {
	Question              string       `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"`
	ProvidedAnswers       []PollAnswer `protobuf:"bytes,2,rep,name=provided_answers,json=providedAnswers,proto3" json:"provided_answers" yaml:"provided_answers"`
	EndDate               time.Time    `protobuf:"bytes,3,opt,name=end_date,json=endDate,proto3,stdtime" json:"end_date" yaml:"end_date"`
	AllowsMultipleAnswers bool         `` /* 148-byte string literal not displayed */
	AllowsAnswerEdits     bool         `` /* 132-byte string literal not displayed */
}

PollAnswer contains the data of a single poll answer inserted by the creator inside a PollData object

func NewPollData

func NewPollData(
	question string, endDate time.Time, providedAnswers []PollAnswer, allowMultipleAnswers, allowsAnswerEdits bool,
) *PollData

NewPollData returns a new PollData object pointer containing the given poll

func (*PollData) Descriptor

func (*PollData) Descriptor() ([]byte, []int)

func (*PollData) Equal

func (this *PollData) Equal(that interface{}) bool

func (*PollData) GetAllowsAnswerEdits

func (m *PollData) GetAllowsAnswerEdits() bool

func (*PollData) GetAllowsMultipleAnswers

func (m *PollData) GetAllowsMultipleAnswers() bool

func (*PollData) GetEndDate

func (m *PollData) GetEndDate() time.Time

func (*PollData) GetProvidedAnswers

func (m *PollData) GetProvidedAnswers() []PollAnswer

func (*PollData) GetQuestion

func (m *PollData) GetQuestion() string

func (*PollData) Marshal

func (m *PollData) Marshal() (dAtA []byte, err error)

func (*PollData) MarshalTo

func (m *PollData) MarshalTo(dAtA []byte) (int, error)

func (*PollData) MarshalToSizedBuffer

func (m *PollData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PollData) ProtoMessage

func (*PollData) ProtoMessage()

func (*PollData) Reset

func (m *PollData) Reset()

func (*PollData) Size

func (m *PollData) Size() (n int)

func (*PollData) String

func (m *PollData) String() string

func (*PollData) Unmarshal

func (m *PollData) Unmarshal(dAtA []byte) error

func (PollData) Validate

func (data PollData) Validate() error

Validate implements the validator interface

func (*PollData) XXX_DiscardUnknown

func (m *PollData) XXX_DiscardUnknown()

func (*PollData) XXX_Marshal

func (m *PollData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PollData) XXX_Merge

func (m *PollData) XXX_Merge(src proto.Message)

func (*PollData) XXX_Size

func (m *PollData) XXX_Size() int

func (*PollData) XXX_Unmarshal

func (m *PollData) XXX_Unmarshal(b []byte) error

type Post

type Post struct {
	PostId         string       `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"id"`
	ParentId       string       `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id" yaml:"parent_id"`
	Message        string       `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty" yaml:"message"`
	Created        time.Time    `protobuf:"bytes,4,opt,name=created,proto3,stdtime" json:"created" yaml:"created"`
	LastEdited     time.Time    `protobuf:"bytes,5,opt,name=last_edited,json=lastEdited,proto3,stdtime" json:"last_edited" yaml:"created"`
	AllowsComments bool         `protobuf:"varint,6,opt,name=allows_comments,json=allowsComments,proto3" json:"allows_comments" yaml:"allows_comments"`
	Subspace       string       `protobuf:"bytes,7,opt,name=subspace,proto3" json:"subspace,omitempty" yaml:"subspace"`
	OptionalData   OptionalData `` /* 154-byte string literal not displayed */
	Creator        string       `protobuf:"bytes,9,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	Attachments    Attachments  `protobuf:"bytes,10,rep,name=attachments,proto3,castrepeated=Attachments" json:"attachments" yaml:"attachments,omitempty"`
	PollData       *PollData    `protobuf:"bytes,11,opt,name=poll_data,json=pollData,proto3" json:"poll_data,omitempty" yaml:"poll_data,omitempty"`
}

Post contains all the data of a Desmos post

func NewPost

func NewPost(
	postID string, parentID string, message string, allowsComments bool, subspace string,
	optionalData OptionalData, attachments []Attachment, pollData *PollData,
	lastEdited time.Time, created time.Time, creator string,
) Post

NewPost allows to build a new Post instance with the provided data

func (*Post) Descriptor

func (*Post) Descriptor() ([]byte, []int)

func (*Post) Equal

func (this *Post) Equal(that interface{}) bool

func (*Post) GetAllowsComments

func (m *Post) GetAllowsComments() bool

func (*Post) GetAttachments

func (m *Post) GetAttachments() Attachments

func (*Post) GetCreated

func (m *Post) GetCreated() time.Time

func (*Post) GetCreator

func (m *Post) GetCreator() string

func (*Post) GetLastEdited

func (m *Post) GetLastEdited() time.Time

func (*Post) GetMessage

func (m *Post) GetMessage() string

func (*Post) GetOptionalData

func (m *Post) GetOptionalData() OptionalData

func (*Post) GetParentId

func (m *Post) GetParentId() string

func (*Post) GetPollData

func (m *Post) GetPollData() *PollData

func (Post) GetPostHashtags

func (post Post) GetPostHashtags() []string

GetPostHashtags returns all the post's hashtags without duplicates

func (*Post) GetPostId

func (m *Post) GetPostId() string

func (*Post) GetSubspace

func (m *Post) GetSubspace() string

func (*Post) Marshal

func (m *Post) Marshal() (dAtA []byte, err error)

func (*Post) MarshalTo

func (m *Post) MarshalTo(dAtA []byte) (int, error)

func (*Post) MarshalToSizedBuffer

func (m *Post) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) Reset

func (m *Post) Reset()

func (*Post) Size

func (m *Post) Size() (n int)

func (*Post) String

func (m *Post) String() string

func (*Post) Unmarshal

func (m *Post) Unmarshal(dAtA []byte) error

func (Post) Validate

func (post Post) Validate() error

Validate implements validator

func (*Post) XXX_DiscardUnknown

func (m *Post) XXX_DiscardUnknown()

func (*Post) XXX_Marshal

func (m *Post) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Post) XXX_Merge

func (m *Post) XXX_Merge(src proto.Message)

func (*Post) XXX_Size

func (m *Post) XXX_Size() int

func (*Post) XXX_Unmarshal

func (m *Post) XXX_Unmarshal(b []byte) error

type PostIndex

type PostIndex struct {
	Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}

PostIndex represents a post index

func (*PostIndex) Descriptor

func (*PostIndex) Descriptor() ([]byte, []int)

func (*PostIndex) GetValue

func (m *PostIndex) GetValue() uint64

func (*PostIndex) Marshal

func (m *PostIndex) Marshal() (dAtA []byte, err error)

func (*PostIndex) MarshalTo

func (m *PostIndex) MarshalTo(dAtA []byte) (int, error)

func (*PostIndex) MarshalToSizedBuffer

func (m *PostIndex) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PostIndex) ProtoMessage

func (*PostIndex) ProtoMessage()

func (*PostIndex) Reset

func (m *PostIndex) Reset()

func (*PostIndex) Size

func (m *PostIndex) Size() (n int)

func (*PostIndex) String

func (m *PostIndex) String() string

func (*PostIndex) Unmarshal

func (m *PostIndex) Unmarshal(dAtA []byte) error

func (*PostIndex) XXX_DiscardUnknown

func (m *PostIndex) XXX_DiscardUnknown()

func (*PostIndex) XXX_Marshal

func (m *PostIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PostIndex) XXX_Merge

func (m *PostIndex) XXX_Merge(src proto.Message)

func (*PostIndex) XXX_Size

func (m *PostIndex) XXX_Size() int

func (*PostIndex) XXX_Unmarshal

func (m *PostIndex) XXX_Unmarshal(b []byte) error

type PostQueryResponse

type PostQueryResponse struct {
	Post
	PollAnswers []UserAnswer   `json:"poll_answers,omitempty" yaml:"poll_answers,omitempty"`
	Reactions   []PostReaction `json:"reactions" yaml:"reactions,omitempty"`
	Children    []string       `json:"children" yaml:"children"`
}

PostQueryResponse represents the data of a post that is returned to user upon a query

func NewPostResponse

func NewPostResponse(
	post Post, pollAnswers []UserAnswer, reactions []PostReaction, children []string,
) PostQueryResponse

func (PostQueryResponse) MarshalJSON

func (response PostQueryResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler as Amino does not respect default json composition

type PostReaction

type PostReaction struct {
	ShortCode string `protobuf:"bytes,1,opt,name=short_code,json=shortCode,proto3" json:"short_code" yaml:"short_code"`
	Value     string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty" yaml:"value"`
	Owner     string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty" yaml:"owner"`
}

PostReaction is a struct of a user reaction to a post

func NewPostReaction

func NewPostReaction(shortcode, value string, owner string) PostReaction

NewPostReaction returns a new PostReaction

func (*PostReaction) Descriptor

func (*PostReaction) Descriptor() ([]byte, []int)

func (*PostReaction) Equal

func (this *PostReaction) Equal(that interface{}) bool

func (*PostReaction) GetOwner

func (m *PostReaction) GetOwner() string

func (*PostReaction) GetShortCode

func (m *PostReaction) GetShortCode() string

func (*PostReaction) GetValue

func (m *PostReaction) GetValue() string

func (*PostReaction) Marshal

func (m *PostReaction) Marshal() (dAtA []byte, err error)

func (*PostReaction) MarshalTo

func (m *PostReaction) MarshalTo(dAtA []byte) (int, error)

func (*PostReaction) MarshalToSizedBuffer

func (m *PostReaction) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PostReaction) ProtoMessage

func (*PostReaction) ProtoMessage()

func (*PostReaction) Reset

func (m *PostReaction) Reset()

func (*PostReaction) Size

func (m *PostReaction) Size() (n int)

func (*PostReaction) String

func (m *PostReaction) String() string

func (*PostReaction) Unmarshal

func (m *PostReaction) Unmarshal(dAtA []byte) error

func (PostReaction) Validate

func (reaction PostReaction) Validate() error

Validate implements validator

func (*PostReaction) XXX_DiscardUnknown

func (m *PostReaction) XXX_DiscardUnknown()

func (*PostReaction) XXX_Marshal

func (m *PostReaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PostReaction) XXX_Merge

func (m *PostReaction) XXX_Merge(src proto.Message)

func (*PostReaction) XXX_Size

func (m *PostReaction) XXX_Size() int

func (*PostReaction) XXX_Unmarshal

func (m *PostReaction) XXX_Unmarshal(b []byte) error

type PostReactions

type PostReactions struct {
	Reactions []PostReaction `protobuf:"bytes,1,rep,name=reactions,proto3" json:"reactions"`
}

PostReactions wraps a list of post reactions

func NewPostReactions

func NewPostReactions(reactions ...PostReaction) PostReactions

NewPostReactions allows to create a new PostReactions object from the given reactions

func (PostReactions) ContainsReactionFrom

func (reactions PostReactions) ContainsReactionFrom(user string, value string) bool

ContainsReactionFrom returns true if the reactions slice contain a reaction from the given user having the given value, false otherwise. NOTE: The value can be either an emoji or a shortcode.

func (*PostReactions) Descriptor

func (*PostReactions) Descriptor() ([]byte, []int)

func (*PostReactions) GetReactions

func (m *PostReactions) GetReactions() []PostReaction

func (PostReactions) IndexOfByUserAndValue

func (reactions PostReactions) IndexOfByUserAndValue(owner string, value string) int

IndexOfByUserAndValue returns the index of the reaction from the given user with the specified code inside the reactions slice. NOTE: The value can be either an emoji or a shortcode.

func (*PostReactions) Marshal

func (m *PostReactions) Marshal() (dAtA []byte, err error)

func (*PostReactions) MarshalTo

func (m *PostReactions) MarshalTo(dAtA []byte) (int, error)

func (*PostReactions) MarshalToSizedBuffer

func (m *PostReactions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PostReactions) ProtoMessage

func (*PostReactions) ProtoMessage()

func (PostReactions) RemoveReaction

func (reactions PostReactions) RemoveReaction(user string, value string) (PostReactions, bool)

DeletePostReaction returns a new PostReactions slice not containing the reaction of the given user with the given value. If the reaction was removed properly, true is also returned. Otherwise, if no reaction was found, false is returned instead.

func (*PostReactions) Reset

func (m *PostReactions) Reset()

func (*PostReactions) Size

func (m *PostReactions) Size() (n int)

func (*PostReactions) String

func (m *PostReactions) String() string

func (*PostReactions) Unmarshal

func (m *PostReactions) Unmarshal(dAtA []byte) error

func (*PostReactions) XXX_DiscardUnknown

func (m *PostReactions) XXX_DiscardUnknown()

func (*PostReactions) XXX_Marshal

func (m *PostReactions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PostReactions) XXX_Merge

func (m *PostReactions) XXX_Merge(src proto.Message)

func (*PostReactions) XXX_Size

func (m *PostReactions) XXX_Size() int

func (*PostReactions) XXX_Unmarshal

func (m *PostReactions) XXX_Unmarshal(b []byte) error

type PostReactionsEntry

type PostReactionsEntry struct {
	PostId    string         `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	Reactions []PostReaction `protobuf:"bytes,2,rep,name=reactions,proto3" json:"reactions"`
}

PostReactionEntry represents an entry containing all the reactions to a post

func NewPostReactionsEntry

func NewPostReactionsEntry(postID string, reactions []PostReaction) PostReactionsEntry

func (*PostReactionsEntry) Descriptor

func (*PostReactionsEntry) Descriptor() ([]byte, []int)

func (*PostReactionsEntry) GetPostId

func (m *PostReactionsEntry) GetPostId() string

func (*PostReactionsEntry) GetReactions

func (m *PostReactionsEntry) GetReactions() []PostReaction

func (*PostReactionsEntry) Marshal

func (m *PostReactionsEntry) Marshal() (dAtA []byte, err error)

func (*PostReactionsEntry) MarshalTo

func (m *PostReactionsEntry) MarshalTo(dAtA []byte) (int, error)

func (*PostReactionsEntry) MarshalToSizedBuffer

func (m *PostReactionsEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PostReactionsEntry) ProtoMessage

func (*PostReactionsEntry) ProtoMessage()

func (*PostReactionsEntry) Reset

func (m *PostReactionsEntry) Reset()

func (*PostReactionsEntry) Size

func (m *PostReactionsEntry) Size() (n int)

func (*PostReactionsEntry) String

func (m *PostReactionsEntry) String() string

func (*PostReactionsEntry) Unmarshal

func (m *PostReactionsEntry) Unmarshal(dAtA []byte) error

func (*PostReactionsEntry) XXX_DiscardUnknown

func (m *PostReactionsEntry) XXX_DiscardUnknown()

func (*PostReactionsEntry) XXX_Marshal

func (m *PostReactionsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PostReactionsEntry) XXX_Merge

func (m *PostReactionsEntry) XXX_Merge(src proto.Message)

func (*PostReactionsEntry) XXX_Size

func (m *PostReactionsEntry) XXX_Size() int

func (*PostReactionsEntry) XXX_Unmarshal

func (m *PostReactionsEntry) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Posts queries all the stored posts
	Posts(ctx context.Context, in *QueryPostsRequest, opts ...grpc.CallOption) (*QueryPostsResponse, error)
	// Post queries a specific post
	Post(ctx context.Context, in *QueryPostRequest, opts ...grpc.CallOption) (*QueryPostResponse, error)
	// PollAnswers queries the poll answers of the post having a specific id
	PollAnswers(ctx context.Context, in *QueryPollAnswersRequest, opts ...grpc.CallOption) (*QueryPollAnswersResponse, error)
	// RegisteredReactions queries all the registered reactions
	RegisteredReactions(ctx context.Context, in *QueryRegisteredReactionsRequest, opts ...grpc.CallOption) (*QueryRegisteredReactionsResponse, error)
	// Params queries the posts module params
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

func (*QueryParamsRequest) Descriptor() ([]byte, []int)

func (*QueryParamsRequest) Marshal

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryParamsRequest) MarshalTo

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsRequest) MarshalToSizedBuffer

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

func (m *QueryParamsRequest) Size() (n int)

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsRequest) XXX_Merge

func (m *QueryParamsRequest) XXX_Merge(src proto.Message)

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method

func (*QueryParamsResponse) Descriptor

func (*QueryParamsResponse) Descriptor() ([]byte, []int)

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryPollAnswersRequest

type QueryPollAnswersRequest struct {
	PostId string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
}

QueryPollAnswersRequest is the request type for the Query/PollAnswers RPC method.

func (*QueryPollAnswersRequest) Descriptor

func (*QueryPollAnswersRequest) Descriptor() ([]byte, []int)

func (*QueryPollAnswersRequest) Marshal

func (m *QueryPollAnswersRequest) Marshal() (dAtA []byte, err error)

func (*QueryPollAnswersRequest) MarshalTo

func (m *QueryPollAnswersRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryPollAnswersRequest) MarshalToSizedBuffer

func (m *QueryPollAnswersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPollAnswersRequest) ProtoMessage

func (*QueryPollAnswersRequest) ProtoMessage()

func (*QueryPollAnswersRequest) Reset

func (m *QueryPollAnswersRequest) Reset()

func (*QueryPollAnswersRequest) Size

func (m *QueryPollAnswersRequest) Size() (n int)

func (*QueryPollAnswersRequest) String

func (m *QueryPollAnswersRequest) String() string

func (*QueryPollAnswersRequest) Unmarshal

func (m *QueryPollAnswersRequest) Unmarshal(dAtA []byte) error

func (*QueryPollAnswersRequest) XXX_DiscardUnknown

func (m *QueryPollAnswersRequest) XXX_DiscardUnknown()

func (*QueryPollAnswersRequest) XXX_Marshal

func (m *QueryPollAnswersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPollAnswersRequest) XXX_Merge

func (m *QueryPollAnswersRequest) XXX_Merge(src proto.Message)

func (*QueryPollAnswersRequest) XXX_Size

func (m *QueryPollAnswersRequest) XXX_Size() int

func (*QueryPollAnswersRequest) XXX_Unmarshal

func (m *QueryPollAnswersRequest) XXX_Unmarshal(b []byte) error

type QueryPollAnswersResponse

type QueryPollAnswersResponse struct {
	PostId  string       `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	Answers []UserAnswer `protobuf:"bytes,2,rep,name=answers,proto3" json:"answers"`
}

QueryPollAnswersResponse is the response type for the Query/PollAnswers RPC method

func (*QueryPollAnswersResponse) Descriptor

func (*QueryPollAnswersResponse) Descriptor() ([]byte, []int)

func (*QueryPollAnswersResponse) GetAnswers

func (m *QueryPollAnswersResponse) GetAnswers() []UserAnswer

func (*QueryPollAnswersResponse) GetPostId

func (m *QueryPollAnswersResponse) GetPostId() string

func (*QueryPollAnswersResponse) Marshal

func (m *QueryPollAnswersResponse) Marshal() (dAtA []byte, err error)

func (*QueryPollAnswersResponse) MarshalTo

func (m *QueryPollAnswersResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryPollAnswersResponse) MarshalToSizedBuffer

func (m *QueryPollAnswersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPollAnswersResponse) ProtoMessage

func (*QueryPollAnswersResponse) ProtoMessage()

func (*QueryPollAnswersResponse) Reset

func (m *QueryPollAnswersResponse) Reset()

func (*QueryPollAnswersResponse) Size

func (m *QueryPollAnswersResponse) Size() (n int)

func (*QueryPollAnswersResponse) String

func (m *QueryPollAnswersResponse) String() string

func (*QueryPollAnswersResponse) Unmarshal

func (m *QueryPollAnswersResponse) Unmarshal(dAtA []byte) error

func (*QueryPollAnswersResponse) XXX_DiscardUnknown

func (m *QueryPollAnswersResponse) XXX_DiscardUnknown()

func (*QueryPollAnswersResponse) XXX_Marshal

func (m *QueryPollAnswersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPollAnswersResponse) XXX_Merge

func (m *QueryPollAnswersResponse) XXX_Merge(src proto.Message)

func (*QueryPollAnswersResponse) XXX_Size

func (m *QueryPollAnswersResponse) XXX_Size() int

func (*QueryPollAnswersResponse) XXX_Unmarshal

func (m *QueryPollAnswersResponse) XXX_Unmarshal(b []byte) error

type QueryPostRequest

type QueryPostRequest struct {
	PostId string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
}

QueryPostRequest is the request type for the Query/Post RPC method.

func (*QueryPostRequest) Descriptor

func (*QueryPostRequest) Descriptor() ([]byte, []int)

func (*QueryPostRequest) Marshal

func (m *QueryPostRequest) Marshal() (dAtA []byte, err error)

func (*QueryPostRequest) MarshalTo

func (m *QueryPostRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryPostRequest) MarshalToSizedBuffer

func (m *QueryPostRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPostRequest) ProtoMessage

func (*QueryPostRequest) ProtoMessage()

func (*QueryPostRequest) Reset

func (m *QueryPostRequest) Reset()

func (*QueryPostRequest) Size

func (m *QueryPostRequest) Size() (n int)

func (*QueryPostRequest) String

func (m *QueryPostRequest) String() string

func (*QueryPostRequest) Unmarshal

func (m *QueryPostRequest) Unmarshal(dAtA []byte) error

func (*QueryPostRequest) XXX_DiscardUnknown

func (m *QueryPostRequest) XXX_DiscardUnknown()

func (*QueryPostRequest) XXX_Marshal

func (m *QueryPostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPostRequest) XXX_Merge

func (m *QueryPostRequest) XXX_Merge(src proto.Message)

func (*QueryPostRequest) XXX_Size

func (m *QueryPostRequest) XXX_Size() int

func (*QueryPostRequest) XXX_Unmarshal

func (m *QueryPostRequest) XXX_Unmarshal(b []byte) error

type QueryPostResponse

type QueryPostResponse struct {
	Post        Post           `protobuf:"bytes,1,opt,name=post,proto3" json:"post"`
	PollAnswers []UserAnswer   `protobuf:"bytes,2,rep,name=poll_answers,json=pollAnswers,proto3" json:"poll_answers"`
	Reactions   []PostReaction `protobuf:"bytes,3,rep,name=reactions,proto3" json:"reactions"`
	Children    []string       `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"`
}

QueryPostResponse is the response type for the Query/Post RPC method

func (*QueryPostResponse) Descriptor

func (*QueryPostResponse) Descriptor() ([]byte, []int)

func (*QueryPostResponse) GetChildren

func (m *QueryPostResponse) GetChildren() []string

func (*QueryPostResponse) GetPollAnswers

func (m *QueryPostResponse) GetPollAnswers() []UserAnswer

func (*QueryPostResponse) GetPost

func (m *QueryPostResponse) GetPost() Post

func (*QueryPostResponse) GetReactions

func (m *QueryPostResponse) GetReactions() []PostReaction

func (*QueryPostResponse) Marshal

func (m *QueryPostResponse) Marshal() (dAtA []byte, err error)

func (*QueryPostResponse) MarshalTo

func (m *QueryPostResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryPostResponse) MarshalToSizedBuffer

func (m *QueryPostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPostResponse) ProtoMessage

func (*QueryPostResponse) ProtoMessage()

func (*QueryPostResponse) Reset

func (m *QueryPostResponse) Reset()

func (*QueryPostResponse) Size

func (m *QueryPostResponse) Size() (n int)

func (*QueryPostResponse) String

func (m *QueryPostResponse) String() string

func (*QueryPostResponse) Unmarshal

func (m *QueryPostResponse) Unmarshal(dAtA []byte) error

func (*QueryPostResponse) XXX_DiscardUnknown

func (m *QueryPostResponse) XXX_DiscardUnknown()

func (*QueryPostResponse) XXX_Marshal

func (m *QueryPostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPostResponse) XXX_Merge

func (m *QueryPostResponse) XXX_Merge(src proto.Message)

func (*QueryPostResponse) XXX_Size

func (m *QueryPostResponse) XXX_Size() int

func (*QueryPostResponse) XXX_Unmarshal

func (m *QueryPostResponse) XXX_Unmarshal(b []byte) error

type QueryPostsParams

type QueryPostsParams struct {
	Page         uint64     `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	Limit        uint64     `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	SortBy       string     `protobuf:"bytes,3,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"`
	SortOrder    string     `protobuf:"bytes,4,opt,name=sort_order,json=sortOrder,proto3" json:"sort_order,omitempty"`
	ParentId     string     `protobuf:"bytes,5,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
	CreationTime *time.Time `protobuf:"bytes,6,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time,omitempty"`
	Subspace     string     `protobuf:"bytes,7,opt,name=subspace,proto3" json:"subspace,omitempty"`
	Creator      string     `protobuf:"bytes,8,opt,name=creator,proto3" json:"creator,omitempty"`
	Hashtags     []string   `protobuf:"bytes,9,rep,name=hashtags,proto3" json:"hashtags,omitempty"`
}

QueryPostsParams represent the parameters used to query for posts

func (*QueryPostsParams) Descriptor

func (*QueryPostsParams) Descriptor() ([]byte, []int)

func (*QueryPostsParams) GetCreationTime

func (m *QueryPostsParams) GetCreationTime() *time.Time

func (*QueryPostsParams) GetCreator

func (m *QueryPostsParams) GetCreator() string

func (*QueryPostsParams) GetHashtags

func (m *QueryPostsParams) GetHashtags() []string

func (*QueryPostsParams) GetLimit

func (m *QueryPostsParams) GetLimit() uint64

func (*QueryPostsParams) GetPage

func (m *QueryPostsParams) GetPage() uint64

func (*QueryPostsParams) GetParentId

func (m *QueryPostsParams) GetParentId() string

func (*QueryPostsParams) GetSortBy

func (m *QueryPostsParams) GetSortBy() string

func (*QueryPostsParams) GetSortOrder

func (m *QueryPostsParams) GetSortOrder() string

func (*QueryPostsParams) GetSubspace

func (m *QueryPostsParams) GetSubspace() string

func (*QueryPostsParams) Marshal

func (m *QueryPostsParams) Marshal() (dAtA []byte, err error)

func (*QueryPostsParams) MarshalTo

func (m *QueryPostsParams) MarshalTo(dAtA []byte) (int, error)

func (*QueryPostsParams) MarshalToSizedBuffer

func (m *QueryPostsParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPostsParams) ProtoMessage

func (*QueryPostsParams) ProtoMessage()

func (*QueryPostsParams) Reset

func (m *QueryPostsParams) Reset()

func (*QueryPostsParams) Size

func (m *QueryPostsParams) Size() (n int)

func (*QueryPostsParams) String

func (m *QueryPostsParams) String() string

func (*QueryPostsParams) Unmarshal

func (m *QueryPostsParams) Unmarshal(dAtA []byte) error

func (*QueryPostsParams) XXX_DiscardUnknown

func (m *QueryPostsParams) XXX_DiscardUnknown()

func (*QueryPostsParams) XXX_Marshal

func (m *QueryPostsParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPostsParams) XXX_Merge

func (m *QueryPostsParams) XXX_Merge(src proto.Message)

func (*QueryPostsParams) XXX_Size

func (m *QueryPostsParams) XXX_Size() int

func (*QueryPostsParams) XXX_Unmarshal

func (m *QueryPostsParams) XXX_Unmarshal(b []byte) error

type QueryPostsRequest

type QueryPostsRequest struct {
	SortBy       string     `protobuf:"bytes,1,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"`
	SortOrder    string     `protobuf:"bytes,2,opt,name=sort_order,json=sortOrder,proto3" json:"sort_order,omitempty"`
	ParentId     string     `protobuf:"bytes,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
	CreationTime *time.Time `protobuf:"bytes,4,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time,omitempty"`
	Subspace     string     `protobuf:"bytes,5,opt,name=subspace,proto3" json:"subspace,omitempty"`
	Creator      string     `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"`
	Hashtags     []string   `protobuf:"bytes,7,rep,name=hashtags,proto3" json:"hashtags,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,8,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPostsRequest is the request type for the Query/Posts RPC method.

func (*QueryPostsRequest) Descriptor

func (*QueryPostsRequest) Descriptor() ([]byte, []int)

func (*QueryPostsRequest) GetCreationTime

func (m *QueryPostsRequest) GetCreationTime() *time.Time

func (*QueryPostsRequest) GetCreator

func (m *QueryPostsRequest) GetCreator() string

func (*QueryPostsRequest) GetHashtags

func (m *QueryPostsRequest) GetHashtags() []string

func (*QueryPostsRequest) GetPagination

func (m *QueryPostsRequest) GetPagination() *query.PageRequest

func (*QueryPostsRequest) GetParentId

func (m *QueryPostsRequest) GetParentId() string

func (*QueryPostsRequest) GetSortBy

func (m *QueryPostsRequest) GetSortBy() string

func (*QueryPostsRequest) GetSortOrder

func (m *QueryPostsRequest) GetSortOrder() string

func (*QueryPostsRequest) GetSubspace

func (m *QueryPostsRequest) GetSubspace() string

func (*QueryPostsRequest) Marshal

func (m *QueryPostsRequest) Marshal() (dAtA []byte, err error)

func (*QueryPostsRequest) MarshalTo

func (m *QueryPostsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryPostsRequest) MarshalToSizedBuffer

func (m *QueryPostsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPostsRequest) ProtoMessage

func (*QueryPostsRequest) ProtoMessage()

func (*QueryPostsRequest) Reset

func (m *QueryPostsRequest) Reset()

func (*QueryPostsRequest) Size

func (m *QueryPostsRequest) Size() (n int)

func (*QueryPostsRequest) String

func (m *QueryPostsRequest) String() string

func (*QueryPostsRequest) Unmarshal

func (m *QueryPostsRequest) Unmarshal(dAtA []byte) error

func (*QueryPostsRequest) XXX_DiscardUnknown

func (m *QueryPostsRequest) XXX_DiscardUnknown()

func (*QueryPostsRequest) XXX_Marshal

func (m *QueryPostsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPostsRequest) XXX_Merge

func (m *QueryPostsRequest) XXX_Merge(src proto.Message)

func (*QueryPostsRequest) XXX_Size

func (m *QueryPostsRequest) XXX_Size() int

func (*QueryPostsRequest) XXX_Unmarshal

func (m *QueryPostsRequest) XXX_Unmarshal(b []byte) error

type QueryPostsResponse

type QueryPostsResponse struct {
	Posts      []QueryPostResponse `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPostsResponse is the response type for the Query/Posts RPC method

func (*QueryPostsResponse) Descriptor

func (*QueryPostsResponse) Descriptor() ([]byte, []int)

func (*QueryPostsResponse) GetPagination

func (m *QueryPostsResponse) GetPagination() *query.PageResponse

func (*QueryPostsResponse) GetPosts

func (m *QueryPostsResponse) GetPosts() []QueryPostResponse

func (*QueryPostsResponse) Marshal

func (m *QueryPostsResponse) Marshal() (dAtA []byte, err error)

func (*QueryPostsResponse) MarshalTo

func (m *QueryPostsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryPostsResponse) MarshalToSizedBuffer

func (m *QueryPostsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPostsResponse) ProtoMessage

func (*QueryPostsResponse) ProtoMessage()

func (*QueryPostsResponse) Reset

func (m *QueryPostsResponse) Reset()

func (*QueryPostsResponse) Size

func (m *QueryPostsResponse) Size() (n int)

func (*QueryPostsResponse) String

func (m *QueryPostsResponse) String() string

func (*QueryPostsResponse) Unmarshal

func (m *QueryPostsResponse) Unmarshal(dAtA []byte) error

func (*QueryPostsResponse) XXX_DiscardUnknown

func (m *QueryPostsResponse) XXX_DiscardUnknown()

func (*QueryPostsResponse) XXX_Marshal

func (m *QueryPostsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPostsResponse) XXX_Merge

func (m *QueryPostsResponse) XXX_Merge(src proto.Message)

func (*QueryPostsResponse) XXX_Size

func (m *QueryPostsResponse) XXX_Size() int

func (*QueryPostsResponse) XXX_Unmarshal

func (m *QueryPostsResponse) XXX_Unmarshal(b []byte) error

type QueryRegisteredReactionsRequest

type QueryRegisteredReactionsRequest struct {
}

QueryRegisteredReactionsRequest is the request type for the Query/RegisteredReactions RPC method.

func (*QueryRegisteredReactionsRequest) Descriptor

func (*QueryRegisteredReactionsRequest) Descriptor() ([]byte, []int)

func (*QueryRegisteredReactionsRequest) Marshal

func (m *QueryRegisteredReactionsRequest) Marshal() (dAtA []byte, err error)

func (*QueryRegisteredReactionsRequest) MarshalTo

func (m *QueryRegisteredReactionsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryRegisteredReactionsRequest) MarshalToSizedBuffer

func (m *QueryRegisteredReactionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRegisteredReactionsRequest) ProtoMessage

func (*QueryRegisteredReactionsRequest) ProtoMessage()

func (*QueryRegisteredReactionsRequest) Reset

func (*QueryRegisteredReactionsRequest) Size

func (m *QueryRegisteredReactionsRequest) Size() (n int)

func (*QueryRegisteredReactionsRequest) String

func (*QueryRegisteredReactionsRequest) Unmarshal

func (m *QueryRegisteredReactionsRequest) Unmarshal(dAtA []byte) error

func (*QueryRegisteredReactionsRequest) XXX_DiscardUnknown

func (m *QueryRegisteredReactionsRequest) XXX_DiscardUnknown()

func (*QueryRegisteredReactionsRequest) XXX_Marshal

func (m *QueryRegisteredReactionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRegisteredReactionsRequest) XXX_Merge

func (m *QueryRegisteredReactionsRequest) XXX_Merge(src proto.Message)

func (*QueryRegisteredReactionsRequest) XXX_Size

func (m *QueryRegisteredReactionsRequest) XXX_Size() int

func (*QueryRegisteredReactionsRequest) XXX_Unmarshal

func (m *QueryRegisteredReactionsRequest) XXX_Unmarshal(b []byte) error

type QueryRegisteredReactionsResponse

type QueryRegisteredReactionsResponse struct {
	RegisteredReactions []RegisteredReaction `protobuf:"bytes,1,rep,name=registered_reactions,json=registeredReactions,proto3" json:"registered_reactions"`
}

QueryRegisteredReactionsResponse is the response type for the Query/RegisteredReactions RPC method

func (*QueryRegisteredReactionsResponse) Descriptor

func (*QueryRegisteredReactionsResponse) Descriptor() ([]byte, []int)

func (*QueryRegisteredReactionsResponse) GetRegisteredReactions

func (m *QueryRegisteredReactionsResponse) GetRegisteredReactions() []RegisteredReaction

func (*QueryRegisteredReactionsResponse) Marshal

func (m *QueryRegisteredReactionsResponse) Marshal() (dAtA []byte, err error)

func (*QueryRegisteredReactionsResponse) MarshalTo

func (m *QueryRegisteredReactionsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryRegisteredReactionsResponse) MarshalToSizedBuffer

func (m *QueryRegisteredReactionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRegisteredReactionsResponse) ProtoMessage

func (*QueryRegisteredReactionsResponse) ProtoMessage()

func (*QueryRegisteredReactionsResponse) Reset

func (*QueryRegisteredReactionsResponse) Size

func (m *QueryRegisteredReactionsResponse) Size() (n int)

func (*QueryRegisteredReactionsResponse) String

func (*QueryRegisteredReactionsResponse) Unmarshal

func (m *QueryRegisteredReactionsResponse) Unmarshal(dAtA []byte) error

func (*QueryRegisteredReactionsResponse) XXX_DiscardUnknown

func (m *QueryRegisteredReactionsResponse) XXX_DiscardUnknown()

func (*QueryRegisteredReactionsResponse) XXX_Marshal

func (m *QueryRegisteredReactionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRegisteredReactionsResponse) XXX_Merge

func (*QueryRegisteredReactionsResponse) XXX_Size

func (m *QueryRegisteredReactionsResponse) XXX_Size() int

func (*QueryRegisteredReactionsResponse) XXX_Unmarshal

func (m *QueryRegisteredReactionsResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Posts queries all the stored posts
	Posts(context.Context, *QueryPostsRequest) (*QueryPostsResponse, error)
	// Post queries a specific post
	Post(context.Context, *QueryPostRequest) (*QueryPostResponse, error)
	// PollAnswers queries the poll answers of the post having a specific id
	PollAnswers(context.Context, *QueryPollAnswersRequest) (*QueryPollAnswersResponse, error)
	// RegisteredReactions queries all the registered reactions
	RegisteredReactions(context.Context, *QueryRegisteredReactionsRequest) (*QueryRegisteredReactionsResponse, error)
	// Params queries the posts module params
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type RegisteredReaction

type RegisteredReaction struct {
	ShortCode string `protobuf:"bytes,1,opt,name=short_code,json=shortCode,proto3" json:"short_code" yaml:"short_code"`
	Value     string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty" yaml:"value"`
	Subspace  string `protobuf:"bytes,3,opt,name=subspace,proto3" json:"subspace,omitempty" yaml:"subspace"`
	Creator   string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
}

RegisteredReaction represents a registered reaction that can be referenced by its shortCode inside post reactions

func NewRegisteredReaction

func NewRegisteredReaction(creator string, shortCode, value, subspace string) RegisteredReaction

NewRegisteredReaction returns a new RegisteredReaction

func (*RegisteredReaction) Descriptor

func (*RegisteredReaction) Descriptor() ([]byte, []int)

func (*RegisteredReaction) Equal

func (this *RegisteredReaction) Equal(that interface{}) bool

func (*RegisteredReaction) GetCreator

func (m *RegisteredReaction) GetCreator() string

func (*RegisteredReaction) GetShortCode

func (m *RegisteredReaction) GetShortCode() string

func (*RegisteredReaction) GetSubspace

func (m *RegisteredReaction) GetSubspace() string

func (*RegisteredReaction) GetValue

func (m *RegisteredReaction) GetValue() string

func (*RegisteredReaction) Marshal

func (m *RegisteredReaction) Marshal() (dAtA []byte, err error)

func (*RegisteredReaction) MarshalTo

func (m *RegisteredReaction) MarshalTo(dAtA []byte) (int, error)

func (*RegisteredReaction) MarshalToSizedBuffer

func (m *RegisteredReaction) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RegisteredReaction) ProtoMessage

func (*RegisteredReaction) ProtoMessage()

func (*RegisteredReaction) Reset

func (m *RegisteredReaction) Reset()

func (*RegisteredReaction) Size

func (m *RegisteredReaction) Size() (n int)

func (*RegisteredReaction) String

func (m *RegisteredReaction) String() string

func (*RegisteredReaction) Unmarshal

func (m *RegisteredReaction) Unmarshal(dAtA []byte) error

func (RegisteredReaction) Validate

func (reaction RegisteredReaction) Validate() error

Validate implements validator

func (*RegisteredReaction) XXX_DiscardUnknown

func (m *RegisteredReaction) XXX_DiscardUnknown()

func (*RegisteredReaction) XXX_Marshal

func (m *RegisteredReaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisteredReaction) XXX_Merge

func (m *RegisteredReaction) XXX_Merge(src proto.Message)

func (*RegisteredReaction) XXX_Size

func (m *RegisteredReaction) XXX_Size() int

func (*RegisteredReaction) XXX_Unmarshal

func (m *RegisteredReaction) XXX_Unmarshal(b []byte) error

type RegisteredReactions

type RegisteredReactions struct {
	Reactions []RegisteredReaction `protobuf:"bytes,1,rep,name=reactions,proto3" json:"reactions"`
}

RegisteredReactions wraps a list of registered reactions

func (*RegisteredReactions) Descriptor

func (*RegisteredReactions) Descriptor() ([]byte, []int)

func (*RegisteredReactions) GetReactions

func (m *RegisteredReactions) GetReactions() []RegisteredReaction

func (*RegisteredReactions) Marshal

func (m *RegisteredReactions) Marshal() (dAtA []byte, err error)

func (*RegisteredReactions) MarshalTo

func (m *RegisteredReactions) MarshalTo(dAtA []byte) (int, error)

func (*RegisteredReactions) MarshalToSizedBuffer

func (m *RegisteredReactions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RegisteredReactions) ProtoMessage

func (*RegisteredReactions) ProtoMessage()

func (*RegisteredReactions) Reset

func (m *RegisteredReactions) Reset()

func (*RegisteredReactions) Size

func (m *RegisteredReactions) Size() (n int)

func (*RegisteredReactions) String

func (m *RegisteredReactions) String() string

func (*RegisteredReactions) Unmarshal

func (m *RegisteredReactions) Unmarshal(dAtA []byte) error

func (*RegisteredReactions) XXX_DiscardUnknown

func (m *RegisteredReactions) XXX_DiscardUnknown()

func (*RegisteredReactions) XXX_Marshal

func (m *RegisteredReactions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisteredReactions) XXX_Merge

func (m *RegisteredReactions) XXX_Merge(src proto.Message)

func (*RegisteredReactions) XXX_Size

func (m *RegisteredReactions) XXX_Size() int

func (*RegisteredReactions) XXX_Unmarshal

func (m *RegisteredReactions) XXX_Unmarshal(b []byte) error

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AddPostReaction

func (*UnimplementedMsgServer) AnswerPoll

func (*UnimplementedMsgServer) CreatePost

func (*UnimplementedMsgServer) EditPost

func (*UnimplementedMsgServer) RegisterReaction

func (*UnimplementedMsgServer) RemovePostReaction

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) PollAnswers

func (*UnimplementedQueryServer) Post

func (*UnimplementedQueryServer) Posts

func (*UnimplementedQueryServer) RegisteredReactions

type UserAnswer

type UserAnswer struct {
	User    string   `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Answers []string `protobuf:"bytes,2,rep,name=answers,proto3" json:"answers,omitempty"`
}

UserAnswer contains the data of a user's answer to a poll

func AppendIfMissingOrIfUsersEquals

func AppendIfMissingOrIfUsersEquals(answers []UserAnswer, answer UserAnswer) ([]UserAnswer, bool)

AppendIfMissingOrIfUserEquals appends the given answer to the user's answer slice if it does not exist inside it yet or if the user of the answer details is the same. It returns a new slice of containing such answer and a boolean indicating if the slice has been modified or not.

func MustUnmarshalUserAnswers

func MustUnmarshalUserAnswers(cdc codec.BinaryMarshaler, bz []byte) []UserAnswer

func NewUserAnswer

func NewUserAnswer(answers []string, user string) UserAnswer

NewUserAnswer returns a new UserAnswer object containing the given poll

func (*UserAnswer) Descriptor

func (*UserAnswer) Descriptor() ([]byte, []int)

func (*UserAnswer) Equal

func (this *UserAnswer) Equal(that interface{}) bool

func (*UserAnswer) GetAnswers

func (m *UserAnswer) GetAnswers() []string

func (*UserAnswer) GetUser

func (m *UserAnswer) GetUser() string

func (*UserAnswer) Marshal

func (m *UserAnswer) Marshal() (dAtA []byte, err error)

func (*UserAnswer) MarshalTo

func (m *UserAnswer) MarshalTo(dAtA []byte) (int, error)

func (*UserAnswer) MarshalToSizedBuffer

func (m *UserAnswer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UserAnswer) ProtoMessage

func (*UserAnswer) ProtoMessage()

func (*UserAnswer) Reset

func (m *UserAnswer) Reset()

func (*UserAnswer) Size

func (m *UserAnswer) Size() (n int)

func (*UserAnswer) String

func (m *UserAnswer) String() string

func (*UserAnswer) Unmarshal

func (m *UserAnswer) Unmarshal(dAtA []byte) error

func (UserAnswer) Validate

func (answers UserAnswer) Validate() error

Validate implements validator

func (*UserAnswer) XXX_DiscardUnknown

func (m *UserAnswer) XXX_DiscardUnknown()

func (*UserAnswer) XXX_Marshal

func (m *UserAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserAnswer) XXX_Merge

func (m *UserAnswer) XXX_Merge(src proto.Message)

func (*UserAnswer) XXX_Size

func (m *UserAnswer) XXX_Size() int

func (*UserAnswer) XXX_Unmarshal

func (m *UserAnswer) XXX_Unmarshal(b []byte) error

type UserAnswers

type UserAnswers struct {
	Answers []UserAnswer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers"`
}

UserAnswers wraps a list of UserAnswer

func (*UserAnswers) Descriptor

func (*UserAnswers) Descriptor() ([]byte, []int)

func (*UserAnswers) GetAnswers

func (m *UserAnswers) GetAnswers() []UserAnswer

func (*UserAnswers) Marshal

func (m *UserAnswers) Marshal() (dAtA []byte, err error)

func (*UserAnswers) MarshalTo

func (m *UserAnswers) MarshalTo(dAtA []byte) (int, error)

func (*UserAnswers) MarshalToSizedBuffer

func (m *UserAnswers) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UserAnswers) ProtoMessage

func (*UserAnswers) ProtoMessage()

func (*UserAnswers) Reset

func (m *UserAnswers) Reset()

func (*UserAnswers) Size

func (m *UserAnswers) Size() (n int)

func (*UserAnswers) String

func (m *UserAnswers) String() string

func (*UserAnswers) Unmarshal

func (m *UserAnswers) Unmarshal(dAtA []byte) error

func (*UserAnswers) XXX_DiscardUnknown

func (m *UserAnswers) XXX_DiscardUnknown()

func (*UserAnswers) XXX_Marshal

func (m *UserAnswers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserAnswers) XXX_Merge

func (m *UserAnswers) XXX_Merge(src proto.Message)

func (*UserAnswers) XXX_Size

func (m *UserAnswers) XXX_Size() int

func (*UserAnswers) XXX_Unmarshal

func (m *UserAnswers) XXX_Unmarshal(b []byte) error

type UserAnswersEntry

type UserAnswersEntry struct {
	PostId      string       `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	UserAnswers []UserAnswer `protobuf:"bytes,2,rep,name=user_answers,json=userAnswers,proto3" json:"user_answers"`
}

UserPollAnswerEntry represents an entry containing all the answers to a poll

func NewUserAnswersEntry

func NewUserAnswersEntry(postID string, answers []UserAnswer) UserAnswersEntry

func (*UserAnswersEntry) Descriptor

func (*UserAnswersEntry) Descriptor() ([]byte, []int)

func (*UserAnswersEntry) GetPostId

func (m *UserAnswersEntry) GetPostId() string

func (*UserAnswersEntry) GetUserAnswers

func (m *UserAnswersEntry) GetUserAnswers() []UserAnswer

func (*UserAnswersEntry) Marshal

func (m *UserAnswersEntry) Marshal() (dAtA []byte, err error)

func (*UserAnswersEntry) MarshalTo

func (m *UserAnswersEntry) MarshalTo(dAtA []byte) (int, error)

func (*UserAnswersEntry) MarshalToSizedBuffer

func (m *UserAnswersEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UserAnswersEntry) ProtoMessage

func (*UserAnswersEntry) ProtoMessage()

func (*UserAnswersEntry) Reset

func (m *UserAnswersEntry) Reset()

func (*UserAnswersEntry) Size

func (m *UserAnswersEntry) Size() (n int)

func (*UserAnswersEntry) String

func (m *UserAnswersEntry) String() string

func (*UserAnswersEntry) Unmarshal

func (m *UserAnswersEntry) Unmarshal(dAtA []byte) error

func (*UserAnswersEntry) XXX_DiscardUnknown

func (m *UserAnswersEntry) XXX_DiscardUnknown()

func (*UserAnswersEntry) XXX_Marshal

func (m *UserAnswersEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserAnswersEntry) XXX_Merge

func (m *UserAnswersEntry) XXX_Merge(src proto.Message)

func (*UserAnswersEntry) XXX_Size

func (m *UserAnswersEntry) XXX_Size() int

func (*UserAnswersEntry) XXX_Unmarshal

func (m *UserAnswersEntry) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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