types

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 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 added in v0.15.0

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 added in v0.15.0

func IsNumeric(s string) bool

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

func IsValidPostID added in v0.10.0

func IsValidPostID(value string) bool

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

func IsValidReactionCode added in v0.10.0

func IsValidReactionCode(value string) bool

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

func MustMarshalUserAnswers added in v0.15.0

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 added in v0.10.0

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 added in v0.15.0

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec added in v0.15.0

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgServer added in v0.15.0

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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 added in v0.10.0

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 added in v0.10.0

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

NewAttachment builds a new Attachment instance with the provided data

func (*Attachment) Descriptor added in v0.15.0

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

func (*Attachment) Equal added in v0.15.0

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

func (*Attachment) GetMimeType added in v0.15.0

func (m *Attachment) GetMimeType() string

func (*Attachment) GetTags added in v0.15.0

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

func (*Attachment) GetURI added in v0.15.0

func (m *Attachment) GetURI() string

func (*Attachment) Marshal added in v0.15.0

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

func (*Attachment) MarshalTo added in v0.15.0

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

func (*Attachment) MarshalToSizedBuffer added in v0.15.0

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

func (*Attachment) ProtoMessage added in v0.15.0

func (*Attachment) ProtoMessage()

func (*Attachment) Reset added in v0.15.0

func (m *Attachment) Reset()

func (*Attachment) Size added in v0.15.0

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

func (*Attachment) String added in v0.15.0

func (m *Attachment) String() string

func (*Attachment) Unmarshal added in v0.15.0

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

func (Attachment) Validate added in v0.15.0

func (attachments Attachment) Validate() error

Validate implements validator

func (*Attachment) XXX_DiscardUnknown added in v0.15.0

func (m *Attachment) XXX_DiscardUnknown()

func (*Attachment) XXX_Marshal added in v0.15.0

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

func (*Attachment) XXX_Merge added in v0.15.0

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

func (*Attachment) XXX_Size added in v0.15.0

func (m *Attachment) XXX_Size() int

func (*Attachment) XXX_Unmarshal added in v0.15.0

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

type Attachments added in v0.10.0

type Attachments []Attachment

Attachments represents a slice of Attachment object

func NewAttachments added in v0.10.0

func NewAttachments(attachments ...Attachment) Attachments

NewAttachments builds a new Attachments from the given attachments

func (Attachments) AppendIfMissing added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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

func (*CommentIDs) GetIds added in v0.15.0

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

func (*CommentIDs) Marshal added in v0.15.0

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

func (*CommentIDs) MarshalTo added in v0.15.0

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

func (*CommentIDs) MarshalToSizedBuffer added in v0.15.0

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

func (*CommentIDs) ProtoMessage added in v0.15.0

func (*CommentIDs) ProtoMessage()

func (*CommentIDs) Reset added in v0.15.0

func (m *CommentIDs) Reset()

func (*CommentIDs) Size added in v0.15.0

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

func (*CommentIDs) String added in v0.15.0

func (m *CommentIDs) String() string

func (*CommentIDs) Unmarshal added in v0.15.0

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

func (*CommentIDs) XXX_DiscardUnknown added in v0.15.0

func (m *CommentIDs) XXX_DiscardUnknown()

func (*CommentIDs) XXX_Marshal added in v0.15.0

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

func (*CommentIDs) XXX_Merge added in v0.15.0

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

func (*CommentIDs) XXX_Size added in v0.15.0

func (m *CommentIDs) XXX_Size() int

func (*CommentIDs) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (*GenesisState) GetParams added in v0.15.0

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPosts added in v0.15.0

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

func (*GenesisState) GetPostsReactions added in v0.15.0

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

func (*GenesisState) GetRegisteredReactions added in v0.15.0

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

func (*GenesisState) GetUsersPollAnswers added in v0.15.0

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

func (*GenesisState) Marshal added in v0.15.0

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

func (*GenesisState) MarshalTo added in v0.15.0

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

func (*GenesisState) MarshalToSizedBuffer added in v0.15.0

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

func (*GenesisState) ProtoMessage added in v0.15.0

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v0.15.0

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v0.15.0

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

func (*GenesisState) String added in v0.15.0

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v0.15.0

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

func (*GenesisState) XXX_DiscardUnknown added in v0.15.0

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v0.15.0

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

func (*GenesisState) XXX_Merge added in v0.15.0

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

func (*GenesisState) XXX_Size added in v0.15.0

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (MsgAddPostReaction) GetSignBytes added in v0.15.0

func (msg MsgAddPostReaction) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgAddPostReaction) GetSigners added in v0.15.0

func (msg MsgAddPostReaction) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgAddPostReaction) Marshal added in v0.15.0

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

func (*MsgAddPostReaction) MarshalTo added in v0.15.0

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

func (*MsgAddPostReaction) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgAddPostReaction) ProtoMessage added in v0.15.0

func (*MsgAddPostReaction) ProtoMessage()

func (*MsgAddPostReaction) Reset added in v0.15.0

func (m *MsgAddPostReaction) Reset()

func (MsgAddPostReaction) Route added in v0.15.0

func (msg MsgAddPostReaction) Route() string

Route should return the name of the module

func (*MsgAddPostReaction) Size added in v0.15.0

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

func (*MsgAddPostReaction) String added in v0.15.0

func (m *MsgAddPostReaction) String() string

func (MsgAddPostReaction) Type added in v0.15.0

func (msg MsgAddPostReaction) Type() string

Type should return the action

func (*MsgAddPostReaction) Unmarshal added in v0.15.0

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

func (MsgAddPostReaction) ValidateBasic added in v0.15.0

func (msg MsgAddPostReaction) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgAddPostReaction) XXX_DiscardUnknown added in v0.15.0

func (m *MsgAddPostReaction) XXX_DiscardUnknown()

func (*MsgAddPostReaction) XXX_Marshal added in v0.15.0

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

func (*MsgAddPostReaction) XXX_Merge added in v0.15.0

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

func (*MsgAddPostReaction) XXX_Size added in v0.15.0

func (m *MsgAddPostReaction) XXX_Size() int

func (*MsgAddPostReaction) XXX_Unmarshal added in v0.15.0

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

type MsgAddPostReactionResponse added in v0.15.0

type MsgAddPostReactionResponse struct {
}

MsgAddPostReactionResponse defines the Msg/AddReaction response type.

func (*MsgAddPostReactionResponse) Descriptor added in v0.15.0

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

func (*MsgAddPostReactionResponse) Marshal added in v0.15.0

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

func (*MsgAddPostReactionResponse) MarshalTo added in v0.15.0

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

func (*MsgAddPostReactionResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgAddPostReactionResponse) ProtoMessage added in v0.15.0

func (*MsgAddPostReactionResponse) ProtoMessage()

func (*MsgAddPostReactionResponse) Reset added in v0.15.0

func (m *MsgAddPostReactionResponse) Reset()

func (*MsgAddPostReactionResponse) Size added in v0.15.0

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

func (*MsgAddPostReactionResponse) String added in v0.15.0

func (m *MsgAddPostReactionResponse) String() string

func (*MsgAddPostReactionResponse) Unmarshal added in v0.15.0

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

func (*MsgAddPostReactionResponse) XXX_DiscardUnknown added in v0.15.0

func (m *MsgAddPostReactionResponse) XXX_DiscardUnknown()

func (*MsgAddPostReactionResponse) XXX_Marshal added in v0.15.0

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

func (*MsgAddPostReactionResponse) XXX_Merge added in v0.15.0

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

func (*MsgAddPostReactionResponse) XXX_Size added in v0.15.0

func (m *MsgAddPostReactionResponse) XXX_Size() int

func (*MsgAddPostReactionResponse) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (MsgAnswerPoll) GetSignBytes added in v0.15.0

func (msg MsgAnswerPoll) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgAnswerPoll) GetSigners added in v0.15.0

func (msg MsgAnswerPoll) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgAnswerPoll) Marshal added in v0.15.0

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

func (*MsgAnswerPoll) MarshalTo added in v0.15.0

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

func (*MsgAnswerPoll) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgAnswerPoll) ProtoMessage added in v0.15.0

func (*MsgAnswerPoll) ProtoMessage()

func (*MsgAnswerPoll) Reset added in v0.15.0

func (m *MsgAnswerPoll) Reset()

func (MsgAnswerPoll) Route added in v0.15.0

func (msg MsgAnswerPoll) Route() string

Route should return the name of the module

func (*MsgAnswerPoll) Size added in v0.15.0

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

func (*MsgAnswerPoll) String added in v0.15.0

func (m *MsgAnswerPoll) String() string

func (MsgAnswerPoll) Type added in v0.15.0

func (msg MsgAnswerPoll) Type() string

Type should return the action

func (*MsgAnswerPoll) Unmarshal added in v0.15.0

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

func (MsgAnswerPoll) ValidateBasic added in v0.15.0

func (msg MsgAnswerPoll) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgAnswerPoll) XXX_DiscardUnknown added in v0.15.0

func (m *MsgAnswerPoll) XXX_DiscardUnknown()

func (*MsgAnswerPoll) XXX_Marshal added in v0.15.0

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

func (*MsgAnswerPoll) XXX_Merge added in v0.15.0

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

func (*MsgAnswerPoll) XXX_Size added in v0.15.0

func (m *MsgAnswerPoll) XXX_Size() int

func (*MsgAnswerPoll) XXX_Unmarshal added in v0.15.0

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

type MsgAnswerPollResponse added in v0.15.0

type MsgAnswerPollResponse struct {
}

MsgAnswerPollResponse defines the Msg/AnswerPoll response type.

func (*MsgAnswerPollResponse) Descriptor added in v0.15.0

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

func (*MsgAnswerPollResponse) Marshal added in v0.15.0

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

func (*MsgAnswerPollResponse) MarshalTo added in v0.15.0

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

func (*MsgAnswerPollResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgAnswerPollResponse) ProtoMessage added in v0.15.0

func (*MsgAnswerPollResponse) ProtoMessage()

func (*MsgAnswerPollResponse) Reset added in v0.15.0

func (m *MsgAnswerPollResponse) Reset()

func (*MsgAnswerPollResponse) Size added in v0.15.0

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

func (*MsgAnswerPollResponse) String added in v0.15.0

func (m *MsgAnswerPollResponse) String() string

func (*MsgAnswerPollResponse) Unmarshal added in v0.15.0

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

func (*MsgAnswerPollResponse) XXX_DiscardUnknown added in v0.15.0

func (m *MsgAnswerPollResponse) XXX_DiscardUnknown()

func (*MsgAnswerPollResponse) XXX_Marshal added in v0.15.0

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

func (*MsgAnswerPollResponse) XXX_Merge added in v0.15.0

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

func (*MsgAnswerPollResponse) XXX_Size added in v0.15.0

func (m *MsgAnswerPollResponse) XXX_Size() int

func (*MsgAnswerPollResponse) XXX_Unmarshal added in v0.15.0

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

type MsgClient added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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

func (MsgCreatePost) GetSignBytes added in v0.15.0

func (msg MsgCreatePost) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgCreatePost) GetSigners added in v0.15.0

func (msg MsgCreatePost) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgCreatePost) Marshal added in v0.15.0

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

func (MsgCreatePost) MarshalJSON added in v0.15.0

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 added in v0.15.0

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

func (*MsgCreatePost) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgCreatePost) ProtoMessage added in v0.15.0

func (*MsgCreatePost) ProtoMessage()

func (*MsgCreatePost) Reset added in v0.15.0

func (m *MsgCreatePost) Reset()

func (MsgCreatePost) Route added in v0.15.0

func (msg MsgCreatePost) Route() string

Route should return the name of the module

func (*MsgCreatePost) Size added in v0.15.0

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

func (*MsgCreatePost) String added in v0.15.0

func (m *MsgCreatePost) String() string

func (MsgCreatePost) Type added in v0.15.0

func (msg MsgCreatePost) Type() string

Type should return the action

func (*MsgCreatePost) Unmarshal added in v0.15.0

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

func (MsgCreatePost) ValidateBasic added in v0.15.0

func (msg MsgCreatePost) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgCreatePost) XXX_DiscardUnknown added in v0.15.0

func (m *MsgCreatePost) XXX_DiscardUnknown()

func (*MsgCreatePost) XXX_Marshal added in v0.15.0

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

func (*MsgCreatePost) XXX_Merge added in v0.15.0

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

func (*MsgCreatePost) XXX_Size added in v0.15.0

func (m *MsgCreatePost) XXX_Size() int

func (*MsgCreatePost) XXX_Unmarshal added in v0.15.0

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

type MsgCreatePostResponse added in v0.15.0

type MsgCreatePostResponse struct {
}

MsgCreatePostResponse defines the Msg/CreatePost response type.

func (*MsgCreatePostResponse) Descriptor added in v0.15.0

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

func (*MsgCreatePostResponse) Marshal added in v0.15.0

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

func (*MsgCreatePostResponse) MarshalTo added in v0.15.0

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

func (*MsgCreatePostResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgCreatePostResponse) ProtoMessage added in v0.15.0

func (*MsgCreatePostResponse) ProtoMessage()

func (*MsgCreatePostResponse) Reset added in v0.15.0

func (m *MsgCreatePostResponse) Reset()

func (*MsgCreatePostResponse) Size added in v0.15.0

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

func (*MsgCreatePostResponse) String added in v0.15.0

func (m *MsgCreatePostResponse) String() string

func (*MsgCreatePostResponse) Unmarshal added in v0.15.0

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

func (*MsgCreatePostResponse) XXX_DiscardUnknown added in v0.15.0

func (m *MsgCreatePostResponse) XXX_DiscardUnknown()

func (*MsgCreatePostResponse) XXX_Marshal added in v0.15.0

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

func (*MsgCreatePostResponse) XXX_Merge added in v0.15.0

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

func (*MsgCreatePostResponse) XXX_Size added in v0.15.0

func (m *MsgCreatePostResponse) XXX_Size() int

func (*MsgCreatePostResponse) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (MsgEditPost) GetSignBytes added in v0.15.0

func (msg MsgEditPost) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgEditPost) GetSigners added in v0.15.0

func (msg MsgEditPost) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgEditPost) Marshal added in v0.15.0

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

func (*MsgEditPost) MarshalTo added in v0.15.0

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

func (*MsgEditPost) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgEditPost) ProtoMessage added in v0.15.0

func (*MsgEditPost) ProtoMessage()

func (*MsgEditPost) Reset added in v0.15.0

func (m *MsgEditPost) Reset()

func (MsgEditPost) Route added in v0.15.0

func (msg MsgEditPost) Route() string

Route should return the name of the module

func (*MsgEditPost) Size added in v0.15.0

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

func (*MsgEditPost) String added in v0.15.0

func (m *MsgEditPost) String() string

func (MsgEditPost) Type added in v0.15.0

func (msg MsgEditPost) Type() string

Type should return the action

func (*MsgEditPost) Unmarshal added in v0.15.0

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

func (MsgEditPost) ValidateBasic added in v0.15.0

func (msg MsgEditPost) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgEditPost) XXX_DiscardUnknown added in v0.15.0

func (m *MsgEditPost) XXX_DiscardUnknown()

func (*MsgEditPost) XXX_Marshal added in v0.15.0

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

func (*MsgEditPost) XXX_Merge added in v0.15.0

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

func (*MsgEditPost) XXX_Size added in v0.15.0

func (m *MsgEditPost) XXX_Size() int

func (*MsgEditPost) XXX_Unmarshal added in v0.15.0

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

type MsgEditPostResponse added in v0.15.0

type MsgEditPostResponse struct {
}

MsgEditPostResponse defines the Msg/EditPost response type.

func (*MsgEditPostResponse) Descriptor added in v0.15.0

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

func (*MsgEditPostResponse) Marshal added in v0.15.0

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

func (*MsgEditPostResponse) MarshalTo added in v0.15.0

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

func (*MsgEditPostResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgEditPostResponse) ProtoMessage added in v0.15.0

func (*MsgEditPostResponse) ProtoMessage()

func (*MsgEditPostResponse) Reset added in v0.15.0

func (m *MsgEditPostResponse) Reset()

func (*MsgEditPostResponse) Size added in v0.15.0

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

func (*MsgEditPostResponse) String added in v0.15.0

func (m *MsgEditPostResponse) String() string

func (*MsgEditPostResponse) Unmarshal added in v0.15.0

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

func (*MsgEditPostResponse) XXX_DiscardUnknown added in v0.15.0

func (m *MsgEditPostResponse) XXX_DiscardUnknown()

func (*MsgEditPostResponse) XXX_Marshal added in v0.15.0

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

func (*MsgEditPostResponse) XXX_Merge added in v0.15.0

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

func (*MsgEditPostResponse) XXX_Size added in v0.15.0

func (m *MsgEditPostResponse) XXX_Size() int

func (*MsgEditPostResponse) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (MsgRegisterReaction) GetSignBytes added in v0.15.0

func (msg MsgRegisterReaction) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgRegisterReaction) GetSigners added in v0.15.0

func (msg MsgRegisterReaction) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgRegisterReaction) Marshal added in v0.15.0

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

func (*MsgRegisterReaction) MarshalTo added in v0.15.0

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

func (*MsgRegisterReaction) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgRegisterReaction) ProtoMessage added in v0.15.0

func (*MsgRegisterReaction) ProtoMessage()

func (*MsgRegisterReaction) Reset added in v0.15.0

func (m *MsgRegisterReaction) Reset()

func (MsgRegisterReaction) Route added in v0.15.0

func (msg MsgRegisterReaction) Route() string

Route should return the name of the module

func (*MsgRegisterReaction) Size added in v0.15.0

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

func (*MsgRegisterReaction) String added in v0.15.0

func (m *MsgRegisterReaction) String() string

func (MsgRegisterReaction) Type added in v0.15.0

func (msg MsgRegisterReaction) Type() string

Type should return the action

func (*MsgRegisterReaction) Unmarshal added in v0.15.0

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

func (MsgRegisterReaction) ValidateBasic added in v0.15.0

func (msg MsgRegisterReaction) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgRegisterReaction) XXX_DiscardUnknown added in v0.15.0

func (m *MsgRegisterReaction) XXX_DiscardUnknown()

func (*MsgRegisterReaction) XXX_Marshal added in v0.15.0

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

func (*MsgRegisterReaction) XXX_Merge added in v0.15.0

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

func (*MsgRegisterReaction) XXX_Size added in v0.15.0

func (m *MsgRegisterReaction) XXX_Size() int

func (*MsgRegisterReaction) XXX_Unmarshal added in v0.15.0

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

type MsgRegisterReactionResponse added in v0.15.0

type MsgRegisterReactionResponse struct {
}

MsgRegisterReactionResponse defines the Msg/RegisterReaction response type.

func (*MsgRegisterReactionResponse) Descriptor added in v0.15.0

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

func (*MsgRegisterReactionResponse) Marshal added in v0.15.0

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

func (*MsgRegisterReactionResponse) MarshalTo added in v0.15.0

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

func (*MsgRegisterReactionResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgRegisterReactionResponse) ProtoMessage added in v0.15.0

func (*MsgRegisterReactionResponse) ProtoMessage()

func (*MsgRegisterReactionResponse) Reset added in v0.15.0

func (m *MsgRegisterReactionResponse) Reset()

func (*MsgRegisterReactionResponse) Size added in v0.15.0

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

func (*MsgRegisterReactionResponse) String added in v0.15.0

func (m *MsgRegisterReactionResponse) String() string

func (*MsgRegisterReactionResponse) Unmarshal added in v0.15.0

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

func (*MsgRegisterReactionResponse) XXX_DiscardUnknown added in v0.15.0

func (m *MsgRegisterReactionResponse) XXX_DiscardUnknown()

func (*MsgRegisterReactionResponse) XXX_Marshal added in v0.15.0

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

func (*MsgRegisterReactionResponse) XXX_Merge added in v0.15.0

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

func (*MsgRegisterReactionResponse) XXX_Size added in v0.15.0

func (m *MsgRegisterReactionResponse) XXX_Size() int

func (*MsgRegisterReactionResponse) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (MsgRemovePostReaction) GetSignBytes added in v0.15.0

func (msg MsgRemovePostReaction) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgRemovePostReaction) GetSigners added in v0.15.0

func (msg MsgRemovePostReaction) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgRemovePostReaction) Marshal added in v0.15.0

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

func (*MsgRemovePostReaction) MarshalTo added in v0.15.0

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

func (*MsgRemovePostReaction) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgRemovePostReaction) ProtoMessage added in v0.15.0

func (*MsgRemovePostReaction) ProtoMessage()

func (*MsgRemovePostReaction) Reset added in v0.15.0

func (m *MsgRemovePostReaction) Reset()

func (MsgRemovePostReaction) Route added in v0.15.0

func (msg MsgRemovePostReaction) Route() string

Route should return the name of the module

func (*MsgRemovePostReaction) Size added in v0.15.0

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

func (*MsgRemovePostReaction) String added in v0.15.0

func (m *MsgRemovePostReaction) String() string

func (MsgRemovePostReaction) Type added in v0.15.0

func (msg MsgRemovePostReaction) Type() string

Type should return the action

func (*MsgRemovePostReaction) Unmarshal added in v0.15.0

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

func (MsgRemovePostReaction) ValidateBasic added in v0.15.0

func (msg MsgRemovePostReaction) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgRemovePostReaction) XXX_DiscardUnknown added in v0.15.0

func (m *MsgRemovePostReaction) XXX_DiscardUnknown()

func (*MsgRemovePostReaction) XXX_Marshal added in v0.15.0

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

func (*MsgRemovePostReaction) XXX_Merge added in v0.15.0

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

func (*MsgRemovePostReaction) XXX_Size added in v0.15.0

func (m *MsgRemovePostReaction) XXX_Size() int

func (*MsgRemovePostReaction) XXX_Unmarshal added in v0.15.0

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

type MsgRemovePostReactionResponse added in v0.15.0

type MsgRemovePostReactionResponse struct {
}

MsgRemovePostReactionResponse defines the Msg/RemovePostReaction response type.

func (*MsgRemovePostReactionResponse) Descriptor added in v0.15.0

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

func (*MsgRemovePostReactionResponse) Marshal added in v0.15.0

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

func (*MsgRemovePostReactionResponse) MarshalTo added in v0.15.0

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

func (*MsgRemovePostReactionResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*MsgRemovePostReactionResponse) ProtoMessage added in v0.15.0

func (*MsgRemovePostReactionResponse) ProtoMessage()

func (*MsgRemovePostReactionResponse) Reset added in v0.15.0

func (m *MsgRemovePostReactionResponse) Reset()

func (*MsgRemovePostReactionResponse) Size added in v0.15.0

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

func (*MsgRemovePostReactionResponse) String added in v0.15.0

func (*MsgRemovePostReactionResponse) Unmarshal added in v0.15.0

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

func (*MsgRemovePostReactionResponse) XXX_DiscardUnknown added in v0.15.0

func (m *MsgRemovePostReactionResponse) XXX_DiscardUnknown()

func (*MsgRemovePostReactionResponse) XXX_Marshal added in v0.15.0

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

func (*MsgRemovePostReactionResponse) XXX_Merge added in v0.15.0

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

func (*MsgRemovePostReactionResponse) XXX_Size added in v0.15.0

func (m *MsgRemovePostReactionResponse) XXX_Size() int

func (*MsgRemovePostReactionResponse) XXX_Unmarshal added in v0.15.0

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

type MsgServer added in v0.15.0

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 added in v0.13.0

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 added in v0.15.0

func NewOptionalDataEntry(key, value string) OptionalDataEntry

NewOptionalDataEntry returns a new OptionalDataEntry object

func (*OptionalDataEntry) Descriptor added in v0.15.0

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

func (*OptionalDataEntry) Equal added in v0.15.0

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

func (*OptionalDataEntry) GetKey added in v0.15.0

func (m *OptionalDataEntry) GetKey() string

func (*OptionalDataEntry) GetValue added in v0.15.0

func (m *OptionalDataEntry) GetValue() string

func (*OptionalDataEntry) Marshal added in v0.15.0

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

func (*OptionalDataEntry) MarshalTo added in v0.15.0

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

func (*OptionalDataEntry) MarshalToSizedBuffer added in v0.15.0

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

func (*OptionalDataEntry) ProtoMessage added in v0.15.0

func (*OptionalDataEntry) ProtoMessage()

func (*OptionalDataEntry) Reset added in v0.15.0

func (m *OptionalDataEntry) Reset()

func (*OptionalDataEntry) Size added in v0.15.0

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

func (*OptionalDataEntry) String added in v0.15.0

func (m *OptionalDataEntry) String() string

func (*OptionalDataEntry) Unmarshal added in v0.15.0

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

func (*OptionalDataEntry) XXX_DiscardUnknown added in v0.15.0

func (m *OptionalDataEntry) XXX_DiscardUnknown()

func (*OptionalDataEntry) XXX_Marshal added in v0.15.0

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

func (*OptionalDataEntry) XXX_Merge added in v0.15.0

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

func (*OptionalDataEntry) XXX_Size added in v0.15.0

func (m *OptionalDataEntry) XXX_Size() int

func (*OptionalDataEntry) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (*Params) Marshal added in v0.15.0

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

func (*Params) MarshalTo added in v0.15.0

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

func (*Params) MarshalToSizedBuffer added in v0.15.0

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 added in v0.15.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.15.0

func (m *Params) Reset()

func (*Params) Size added in v0.15.0

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal added in v0.15.0

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 added in v0.15.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.15.0

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

func (*Params) XXX_Merge added in v0.15.0

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

func (*Params) XXX_Size added in v0.15.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (*PollAnswer) Equal added in v0.15.0

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

func (*PollAnswer) GetID added in v0.15.0

func (m *PollAnswer) GetID() string

func (*PollAnswer) GetText added in v0.15.0

func (m *PollAnswer) GetText() string

func (*PollAnswer) Marshal added in v0.15.0

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

func (*PollAnswer) MarshalTo added in v0.15.0

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

func (*PollAnswer) MarshalToSizedBuffer added in v0.15.0

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

func (*PollAnswer) ProtoMessage added in v0.15.0

func (*PollAnswer) ProtoMessage()

func (*PollAnswer) Reset added in v0.15.0

func (m *PollAnswer) Reset()

func (*PollAnswer) Size added in v0.15.0

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

func (*PollAnswer) String added in v0.15.0

func (m *PollAnswer) String() string

func (*PollAnswer) Unmarshal added in v0.15.0

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

func (PollAnswer) Validate added in v0.15.0

func (answer PollAnswer) Validate() error

Validate implements validator

func (*PollAnswer) XXX_DiscardUnknown added in v0.15.0

func (m *PollAnswer) XXX_DiscardUnknown()

func (*PollAnswer) XXX_Marshal added in v0.15.0

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

func (*PollAnswer) XXX_Merge added in v0.15.0

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

func (*PollAnswer) XXX_Size added in v0.15.0

func (m *PollAnswer) XXX_Size() int

func (*PollAnswer) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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

func (*PollData) Equal added in v0.15.0

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

func (*PollData) GetAllowsAnswerEdits added in v0.15.0

func (m *PollData) GetAllowsAnswerEdits() bool

func (*PollData) GetAllowsMultipleAnswers added in v0.15.0

func (m *PollData) GetAllowsMultipleAnswers() bool

func (*PollData) GetEndDate added in v0.15.0

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

func (*PollData) GetProvidedAnswers added in v0.15.0

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

func (*PollData) GetQuestion added in v0.15.0

func (m *PollData) GetQuestion() string

func (*PollData) Marshal added in v0.15.0

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

func (*PollData) MarshalTo added in v0.15.0

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

func (*PollData) MarshalToSizedBuffer added in v0.15.0

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

func (*PollData) ProtoMessage added in v0.15.0

func (*PollData) ProtoMessage()

func (*PollData) Reset added in v0.15.0

func (m *PollData) Reset()

func (*PollData) Size added in v0.15.0

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

func (*PollData) String added in v0.15.0

func (m *PollData) String() string

func (*PollData) Unmarshal added in v0.15.0

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

func (PollData) Validate added in v0.15.0

func (data PollData) Validate() error

Validate implements the validator interface

func (*PollData) XXX_DiscardUnknown added in v0.15.0

func (m *PollData) XXX_DiscardUnknown()

func (*PollData) XXX_Marshal added in v0.15.0

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

func (*PollData) XXX_Merge added in v0.15.0

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

func (*PollData) XXX_Size added in v0.15.0

func (m *PollData) XXX_Size() int

func (*PollData) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (*Post) Equal added in v0.15.0

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

func (*Post) GetAllowsComments added in v0.15.0

func (m *Post) GetAllowsComments() bool

func (*Post) GetAttachments added in v0.15.0

func (m *Post) GetAttachments() Attachments

func (*Post) GetCreated added in v0.15.0

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

func (*Post) GetCreator added in v0.15.0

func (m *Post) GetCreator() string

func (*Post) GetLastEdited added in v0.15.0

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

func (*Post) GetMessage added in v0.15.0

func (m *Post) GetMessage() string

func (*Post) GetOptionalData added in v0.15.0

func (m *Post) GetOptionalData() OptionalData

func (*Post) GetParentId added in v0.15.0

func (m *Post) GetParentId() string

func (*Post) GetPollData added in v0.15.0

func (m *Post) GetPollData() *PollData

func (Post) GetPostHashtags added in v0.15.0

func (post Post) GetPostHashtags() []string

GetPostHashtags returns all the post's hashtags without duplicates

func (*Post) GetPostId added in v0.15.0

func (m *Post) GetPostId() string

func (*Post) GetSubspace added in v0.15.0

func (m *Post) GetSubspace() string

func (*Post) Marshal added in v0.15.0

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

func (*Post) MarshalTo added in v0.15.0

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

func (*Post) MarshalToSizedBuffer added in v0.15.0

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

func (*Post) ProtoMessage added in v0.15.0

func (*Post) ProtoMessage()

func (*Post) Reset added in v0.15.0

func (m *Post) Reset()

func (*Post) Size added in v0.15.0

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

func (*Post) String added in v0.15.0

func (m *Post) String() string

func (*Post) Unmarshal added in v0.15.0

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

func (Post) Validate added in v0.15.0

func (post Post) Validate() error

Validate implements validator

func (*Post) XXX_DiscardUnknown added in v0.15.0

func (m *Post) XXX_DiscardUnknown()

func (*Post) XXX_Marshal added in v0.15.0

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

func (*Post) XXX_Merge added in v0.15.0

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

func (*Post) XXX_Size added in v0.15.0

func (m *Post) XXX_Size() int

func (*Post) XXX_Unmarshal added in v0.15.0

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

type PostIndex added in v0.15.0

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

PostIndex represents a post index

func (*PostIndex) Descriptor added in v0.15.0

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

func (*PostIndex) GetValue added in v0.15.0

func (m *PostIndex) GetValue() uint64

func (*PostIndex) Marshal added in v0.15.0

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

func (*PostIndex) MarshalTo added in v0.15.0

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

func (*PostIndex) MarshalToSizedBuffer added in v0.15.0

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

func (*PostIndex) ProtoMessage added in v0.15.0

func (*PostIndex) ProtoMessage()

func (*PostIndex) Reset added in v0.15.0

func (m *PostIndex) Reset()

func (*PostIndex) Size added in v0.15.0

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

func (*PostIndex) String added in v0.15.0

func (m *PostIndex) String() string

func (*PostIndex) Unmarshal added in v0.15.0

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

func (*PostIndex) XXX_DiscardUnknown added in v0.15.0

func (m *PostIndex) XXX_DiscardUnknown()

func (*PostIndex) XXX_Marshal added in v0.15.0

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

func (*PostIndex) XXX_Merge added in v0.15.0

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

func (*PostIndex) XXX_Size added in v0.15.0

func (m *PostIndex) XXX_Size() int

func (*PostIndex) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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

func (*PostReaction) Equal added in v0.15.0

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

func (*PostReaction) GetOwner added in v0.15.0

func (m *PostReaction) GetOwner() string

func (*PostReaction) GetShortCode added in v0.15.0

func (m *PostReaction) GetShortCode() string

func (*PostReaction) GetValue added in v0.15.0

func (m *PostReaction) GetValue() string

func (*PostReaction) Marshal added in v0.15.0

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

func (*PostReaction) MarshalTo added in v0.15.0

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

func (*PostReaction) MarshalToSizedBuffer added in v0.15.0

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

func (*PostReaction) ProtoMessage added in v0.15.0

func (*PostReaction) ProtoMessage()

func (*PostReaction) Reset added in v0.15.0

func (m *PostReaction) Reset()

func (*PostReaction) Size added in v0.15.0

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

func (*PostReaction) String added in v0.15.0

func (m *PostReaction) String() string

func (*PostReaction) Unmarshal added in v0.15.0

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

func (PostReaction) Validate added in v0.15.0

func (reaction PostReaction) Validate() error

Validate implements validator

func (*PostReaction) XXX_DiscardUnknown added in v0.15.0

func (m *PostReaction) XXX_DiscardUnknown()

func (*PostReaction) XXX_Marshal added in v0.15.0

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

func (*PostReaction) XXX_Merge added in v0.15.0

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

func (*PostReaction) XXX_Size added in v0.15.0

func (m *PostReaction) XXX_Size() int

func (*PostReaction) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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

func (*PostReactions) GetReactions added in v0.15.0

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

func (PostReactions) IndexOfByUserAndValue added in v0.15.0

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 added in v0.15.0

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

func (*PostReactions) MarshalTo added in v0.15.0

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

func (*PostReactions) MarshalToSizedBuffer added in v0.15.0

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

func (*PostReactions) ProtoMessage added in v0.15.0

func (*PostReactions) ProtoMessage()

func (PostReactions) RemoveReaction added in v0.15.0

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 added in v0.15.0

func (m *PostReactions) Reset()

func (*PostReactions) Size added in v0.15.0

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

func (*PostReactions) String added in v0.15.0

func (m *PostReactions) String() string

func (*PostReactions) Unmarshal added in v0.15.0

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

func (*PostReactions) XXX_DiscardUnknown added in v0.15.0

func (m *PostReactions) XXX_DiscardUnknown()

func (*PostReactions) XXX_Marshal added in v0.15.0

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

func (*PostReactions) XXX_Merge added in v0.15.0

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

func (*PostReactions) XXX_Size added in v0.15.0

func (m *PostReactions) XXX_Size() int

func (*PostReactions) XXX_Unmarshal added in v0.15.0

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

type PostReactionsEntry added in v0.15.0

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 added in v0.15.0

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

func (*PostReactionsEntry) Descriptor added in v0.15.0

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

func (*PostReactionsEntry) GetPostId added in v0.15.0

func (m *PostReactionsEntry) GetPostId() string

func (*PostReactionsEntry) GetReactions added in v0.15.0

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

func (*PostReactionsEntry) Marshal added in v0.15.0

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

func (*PostReactionsEntry) MarshalTo added in v0.15.0

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

func (*PostReactionsEntry) MarshalToSizedBuffer added in v0.15.0

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

func (*PostReactionsEntry) ProtoMessage added in v0.15.0

func (*PostReactionsEntry) ProtoMessage()

func (*PostReactionsEntry) Reset added in v0.15.0

func (m *PostReactionsEntry) Reset()

func (*PostReactionsEntry) Size added in v0.15.0

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

func (*PostReactionsEntry) String added in v0.15.0

func (m *PostReactionsEntry) String() string

func (*PostReactionsEntry) Unmarshal added in v0.15.0

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

func (*PostReactionsEntry) XXX_DiscardUnknown added in v0.15.0

func (m *PostReactionsEntry) XXX_DiscardUnknown()

func (*PostReactionsEntry) XXX_Marshal added in v0.15.0

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

func (*PostReactionsEntry) XXX_Merge added in v0.15.0

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

func (*PostReactionsEntry) XXX_Size added in v0.15.0

func (m *PostReactionsEntry) XXX_Size() int

func (*PostReactionsEntry) XXX_Unmarshal added in v0.15.0

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

type QueryClient added in v0.15.0

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 added in v0.15.0

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest added in v0.15.0

type QueryParamsRequest struct {
}

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

func (*QueryParamsRequest) Descriptor added in v0.15.0

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

func (*QueryParamsRequest) Marshal added in v0.15.0

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

func (*QueryParamsRequest) MarshalTo added in v0.15.0

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryParamsRequest) ProtoMessage added in v0.15.0

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v0.15.0

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v0.15.0

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

func (*QueryParamsRequest) String added in v0.15.0

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v0.15.0

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

func (*QueryParamsRequest) XXX_DiscardUnknown added in v0.15.0

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v0.15.0

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

func (*QueryParamsRequest) XXX_Merge added in v0.15.0

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

func (*QueryParamsRequest) XXX_Size added in v0.15.0

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v0.15.0

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

type QueryParamsResponse added in v0.15.0

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 added in v0.15.0

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

func (*QueryParamsResponse) GetParams added in v0.15.0

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal added in v0.15.0

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

func (*QueryParamsResponse) MarshalTo added in v0.15.0

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

func (*QueryParamsResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryParamsResponse) ProtoMessage added in v0.15.0

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v0.15.0

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size added in v0.15.0

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

func (*QueryParamsResponse) String added in v0.15.0

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal added in v0.15.0

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

func (*QueryParamsResponse) XXX_DiscardUnknown added in v0.15.0

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal added in v0.15.0

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

func (*QueryParamsResponse) XXX_Merge added in v0.15.0

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

func (*QueryParamsResponse) XXX_Size added in v0.15.0

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal added in v0.15.0

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

type QueryPollAnswersRequest added in v0.15.0

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 added in v0.15.0

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

func (*QueryPollAnswersRequest) Marshal added in v0.15.0

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

func (*QueryPollAnswersRequest) MarshalTo added in v0.15.0

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

func (*QueryPollAnswersRequest) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryPollAnswersRequest) ProtoMessage added in v0.15.0

func (*QueryPollAnswersRequest) ProtoMessage()

func (*QueryPollAnswersRequest) Reset added in v0.15.0

func (m *QueryPollAnswersRequest) Reset()

func (*QueryPollAnswersRequest) Size added in v0.15.0

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

func (*QueryPollAnswersRequest) String added in v0.15.0

func (m *QueryPollAnswersRequest) String() string

func (*QueryPollAnswersRequest) Unmarshal added in v0.15.0

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

func (*QueryPollAnswersRequest) XXX_DiscardUnknown added in v0.15.0

func (m *QueryPollAnswersRequest) XXX_DiscardUnknown()

func (*QueryPollAnswersRequest) XXX_Marshal added in v0.15.0

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

func (*QueryPollAnswersRequest) XXX_Merge added in v0.15.0

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

func (*QueryPollAnswersRequest) XXX_Size added in v0.15.0

func (m *QueryPollAnswersRequest) XXX_Size() int

func (*QueryPollAnswersRequest) XXX_Unmarshal added in v0.15.0

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

type QueryPollAnswersResponse added in v0.15.0

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 added in v0.15.0

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

func (*QueryPollAnswersResponse) GetAnswers added in v0.15.0

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

func (*QueryPollAnswersResponse) GetPostId added in v0.15.0

func (m *QueryPollAnswersResponse) GetPostId() string

func (*QueryPollAnswersResponse) Marshal added in v0.15.0

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

func (*QueryPollAnswersResponse) MarshalTo added in v0.15.0

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

func (*QueryPollAnswersResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryPollAnswersResponse) ProtoMessage added in v0.15.0

func (*QueryPollAnswersResponse) ProtoMessage()

func (*QueryPollAnswersResponse) Reset added in v0.15.0

func (m *QueryPollAnswersResponse) Reset()

func (*QueryPollAnswersResponse) Size added in v0.15.0

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

func (*QueryPollAnswersResponse) String added in v0.15.0

func (m *QueryPollAnswersResponse) String() string

func (*QueryPollAnswersResponse) Unmarshal added in v0.15.0

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

func (*QueryPollAnswersResponse) XXX_DiscardUnknown added in v0.15.0

func (m *QueryPollAnswersResponse) XXX_DiscardUnknown()

func (*QueryPollAnswersResponse) XXX_Marshal added in v0.15.0

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

func (*QueryPollAnswersResponse) XXX_Merge added in v0.15.0

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

func (*QueryPollAnswersResponse) XXX_Size added in v0.15.0

func (m *QueryPollAnswersResponse) XXX_Size() int

func (*QueryPollAnswersResponse) XXX_Unmarshal added in v0.15.0

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

type QueryPostRequest added in v0.15.0

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 added in v0.15.0

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

func (*QueryPostRequest) Marshal added in v0.15.0

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

func (*QueryPostRequest) MarshalTo added in v0.15.0

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

func (*QueryPostRequest) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryPostRequest) ProtoMessage added in v0.15.0

func (*QueryPostRequest) ProtoMessage()

func (*QueryPostRequest) Reset added in v0.15.0

func (m *QueryPostRequest) Reset()

func (*QueryPostRequest) Size added in v0.15.0

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

func (*QueryPostRequest) String added in v0.15.0

func (m *QueryPostRequest) String() string

func (*QueryPostRequest) Unmarshal added in v0.15.0

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

func (*QueryPostRequest) XXX_DiscardUnknown added in v0.15.0

func (m *QueryPostRequest) XXX_DiscardUnknown()

func (*QueryPostRequest) XXX_Marshal added in v0.15.0

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

func (*QueryPostRequest) XXX_Merge added in v0.15.0

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

func (*QueryPostRequest) XXX_Size added in v0.15.0

func (m *QueryPostRequest) XXX_Size() int

func (*QueryPostRequest) XXX_Unmarshal added in v0.15.0

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

type QueryPostResponse added in v0.15.0

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 added in v0.15.0

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

func (*QueryPostResponse) GetChildren added in v0.15.0

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

func (*QueryPostResponse) GetPollAnswers added in v0.15.0

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

func (*QueryPostResponse) GetPost added in v0.15.0

func (m *QueryPostResponse) GetPost() Post

func (*QueryPostResponse) GetReactions added in v0.15.0

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

func (*QueryPostResponse) Marshal added in v0.15.0

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

func (*QueryPostResponse) MarshalTo added in v0.15.0

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

func (*QueryPostResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryPostResponse) ProtoMessage added in v0.15.0

func (*QueryPostResponse) ProtoMessage()

func (*QueryPostResponse) Reset added in v0.15.0

func (m *QueryPostResponse) Reset()

func (*QueryPostResponse) Size added in v0.15.0

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

func (*QueryPostResponse) String added in v0.15.0

func (m *QueryPostResponse) String() string

func (*QueryPostResponse) Unmarshal added in v0.15.0

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

func (*QueryPostResponse) XXX_DiscardUnknown added in v0.15.0

func (m *QueryPostResponse) XXX_DiscardUnknown()

func (*QueryPostResponse) XXX_Marshal added in v0.15.0

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

func (*QueryPostResponse) XXX_Merge added in v0.15.0

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

func (*QueryPostResponse) XXX_Size added in v0.15.0

func (m *QueryPostResponse) XXX_Size() int

func (*QueryPostResponse) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (*QueryPostsParams) GetCreationTime added in v0.15.0

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

func (*QueryPostsParams) GetCreator added in v0.15.0

func (m *QueryPostsParams) GetCreator() string

func (*QueryPostsParams) GetHashtags added in v0.15.0

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

func (*QueryPostsParams) GetLimit added in v0.15.0

func (m *QueryPostsParams) GetLimit() uint64

func (*QueryPostsParams) GetPage added in v0.15.0

func (m *QueryPostsParams) GetPage() uint64

func (*QueryPostsParams) GetParentId added in v0.15.0

func (m *QueryPostsParams) GetParentId() string

func (*QueryPostsParams) GetSortBy added in v0.15.0

func (m *QueryPostsParams) GetSortBy() string

func (*QueryPostsParams) GetSortOrder added in v0.15.0

func (m *QueryPostsParams) GetSortOrder() string

func (*QueryPostsParams) GetSubspace added in v0.15.0

func (m *QueryPostsParams) GetSubspace() string

func (*QueryPostsParams) Marshal added in v0.15.0

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

func (*QueryPostsParams) MarshalTo added in v0.15.0

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

func (*QueryPostsParams) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryPostsParams) ProtoMessage added in v0.15.0

func (*QueryPostsParams) ProtoMessage()

func (*QueryPostsParams) Reset added in v0.15.0

func (m *QueryPostsParams) Reset()

func (*QueryPostsParams) Size added in v0.15.0

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

func (*QueryPostsParams) String added in v0.15.0

func (m *QueryPostsParams) String() string

func (*QueryPostsParams) Unmarshal added in v0.15.0

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

func (*QueryPostsParams) XXX_DiscardUnknown added in v0.15.0

func (m *QueryPostsParams) XXX_DiscardUnknown()

func (*QueryPostsParams) XXX_Marshal added in v0.15.0

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

func (*QueryPostsParams) XXX_Merge added in v0.15.0

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

func (*QueryPostsParams) XXX_Size added in v0.15.0

func (m *QueryPostsParams) XXX_Size() int

func (*QueryPostsParams) XXX_Unmarshal added in v0.15.0

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

type QueryPostsRequest added in v0.15.0

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 added in v0.15.0

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

func (*QueryPostsRequest) GetCreationTime added in v0.15.0

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

func (*QueryPostsRequest) GetCreator added in v0.15.0

func (m *QueryPostsRequest) GetCreator() string

func (*QueryPostsRequest) GetHashtags added in v0.15.0

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

func (*QueryPostsRequest) GetPagination added in v0.15.0

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

func (*QueryPostsRequest) GetParentId added in v0.15.0

func (m *QueryPostsRequest) GetParentId() string

func (*QueryPostsRequest) GetSortBy added in v0.15.0

func (m *QueryPostsRequest) GetSortBy() string

func (*QueryPostsRequest) GetSortOrder added in v0.15.0

func (m *QueryPostsRequest) GetSortOrder() string

func (*QueryPostsRequest) GetSubspace added in v0.15.0

func (m *QueryPostsRequest) GetSubspace() string

func (*QueryPostsRequest) Marshal added in v0.15.0

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

func (*QueryPostsRequest) MarshalTo added in v0.15.0

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

func (*QueryPostsRequest) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryPostsRequest) ProtoMessage added in v0.15.0

func (*QueryPostsRequest) ProtoMessage()

func (*QueryPostsRequest) Reset added in v0.15.0

func (m *QueryPostsRequest) Reset()

func (*QueryPostsRequest) Size added in v0.15.0

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

func (*QueryPostsRequest) String added in v0.15.0

func (m *QueryPostsRequest) String() string

func (*QueryPostsRequest) Unmarshal added in v0.15.0

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

func (*QueryPostsRequest) XXX_DiscardUnknown added in v0.15.0

func (m *QueryPostsRequest) XXX_DiscardUnknown()

func (*QueryPostsRequest) XXX_Marshal added in v0.15.0

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

func (*QueryPostsRequest) XXX_Merge added in v0.15.0

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

func (*QueryPostsRequest) XXX_Size added in v0.15.0

func (m *QueryPostsRequest) XXX_Size() int

func (*QueryPostsRequest) XXX_Unmarshal added in v0.15.0

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

type QueryPostsResponse added in v0.15.0

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 added in v0.15.0

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

func (*QueryPostsResponse) GetPagination added in v0.15.0

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

func (*QueryPostsResponse) GetPosts added in v0.15.0

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

func (*QueryPostsResponse) Marshal added in v0.15.0

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

func (*QueryPostsResponse) MarshalTo added in v0.15.0

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

func (*QueryPostsResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryPostsResponse) ProtoMessage added in v0.15.0

func (*QueryPostsResponse) ProtoMessage()

func (*QueryPostsResponse) Reset added in v0.15.0

func (m *QueryPostsResponse) Reset()

func (*QueryPostsResponse) Size added in v0.15.0

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

func (*QueryPostsResponse) String added in v0.15.0

func (m *QueryPostsResponse) String() string

func (*QueryPostsResponse) Unmarshal added in v0.15.0

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

func (*QueryPostsResponse) XXX_DiscardUnknown added in v0.15.0

func (m *QueryPostsResponse) XXX_DiscardUnknown()

func (*QueryPostsResponse) XXX_Marshal added in v0.15.0

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

func (*QueryPostsResponse) XXX_Merge added in v0.15.0

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

func (*QueryPostsResponse) XXX_Size added in v0.15.0

func (m *QueryPostsResponse) XXX_Size() int

func (*QueryPostsResponse) XXX_Unmarshal added in v0.15.0

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

type QueryRegisteredReactionsRequest added in v0.15.0

type QueryRegisteredReactionsRequest struct {
}

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

func (*QueryRegisteredReactionsRequest) Descriptor added in v0.15.0

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

func (*QueryRegisteredReactionsRequest) Marshal added in v0.15.0

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

func (*QueryRegisteredReactionsRequest) MarshalTo added in v0.15.0

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

func (*QueryRegisteredReactionsRequest) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryRegisteredReactionsRequest) ProtoMessage added in v0.15.0

func (*QueryRegisteredReactionsRequest) ProtoMessage()

func (*QueryRegisteredReactionsRequest) Reset added in v0.15.0

func (*QueryRegisteredReactionsRequest) Size added in v0.15.0

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

func (*QueryRegisteredReactionsRequest) String added in v0.15.0

func (*QueryRegisteredReactionsRequest) Unmarshal added in v0.15.0

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

func (*QueryRegisteredReactionsRequest) XXX_DiscardUnknown added in v0.15.0

func (m *QueryRegisteredReactionsRequest) XXX_DiscardUnknown()

func (*QueryRegisteredReactionsRequest) XXX_Marshal added in v0.15.0

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

func (*QueryRegisteredReactionsRequest) XXX_Merge added in v0.15.0

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

func (*QueryRegisteredReactionsRequest) XXX_Size added in v0.15.0

func (m *QueryRegisteredReactionsRequest) XXX_Size() int

func (*QueryRegisteredReactionsRequest) XXX_Unmarshal added in v0.15.0

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

type QueryRegisteredReactionsResponse added in v0.15.0

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 added in v0.15.0

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

func (*QueryRegisteredReactionsResponse) GetRegisteredReactions added in v0.15.0

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

func (*QueryRegisteredReactionsResponse) Marshal added in v0.15.0

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

func (*QueryRegisteredReactionsResponse) MarshalTo added in v0.15.0

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

func (*QueryRegisteredReactionsResponse) MarshalToSizedBuffer added in v0.15.0

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

func (*QueryRegisteredReactionsResponse) ProtoMessage added in v0.15.0

func (*QueryRegisteredReactionsResponse) ProtoMessage()

func (*QueryRegisteredReactionsResponse) Reset added in v0.15.0

func (*QueryRegisteredReactionsResponse) Size added in v0.15.0

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

func (*QueryRegisteredReactionsResponse) String added in v0.15.0

func (*QueryRegisteredReactionsResponse) Unmarshal added in v0.15.0

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

func (*QueryRegisteredReactionsResponse) XXX_DiscardUnknown added in v0.15.0

func (m *QueryRegisteredReactionsResponse) XXX_DiscardUnknown()

func (*QueryRegisteredReactionsResponse) XXX_Marshal added in v0.15.0

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

func (*QueryRegisteredReactionsResponse) XXX_Merge added in v0.15.0

func (*QueryRegisteredReactionsResponse) XXX_Size added in v0.15.0

func (m *QueryRegisteredReactionsResponse) XXX_Size() int

func (*QueryRegisteredReactionsResponse) XXX_Unmarshal added in v0.15.0

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

type QueryServer added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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

NewRegisteredReaction returns a new RegisteredReaction

func (*RegisteredReaction) Descriptor added in v0.15.0

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

func (*RegisteredReaction) Equal added in v0.15.0

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

func (*RegisteredReaction) GetCreator added in v0.15.0

func (m *RegisteredReaction) GetCreator() string

func (*RegisteredReaction) GetShortCode added in v0.15.0

func (m *RegisteredReaction) GetShortCode() string

func (*RegisteredReaction) GetSubspace added in v0.15.0

func (m *RegisteredReaction) GetSubspace() string

func (*RegisteredReaction) GetValue added in v0.15.0

func (m *RegisteredReaction) GetValue() string

func (*RegisteredReaction) Marshal added in v0.15.0

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

func (*RegisteredReaction) MarshalTo added in v0.15.0

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

func (*RegisteredReaction) MarshalToSizedBuffer added in v0.15.0

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

func (*RegisteredReaction) ProtoMessage added in v0.15.0

func (*RegisteredReaction) ProtoMessage()

func (*RegisteredReaction) Reset added in v0.15.0

func (m *RegisteredReaction) Reset()

func (*RegisteredReaction) Size added in v0.15.0

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

func (*RegisteredReaction) String added in v0.15.0

func (m *RegisteredReaction) String() string

func (*RegisteredReaction) Unmarshal added in v0.15.0

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

func (RegisteredReaction) Validate added in v0.15.0

func (reaction RegisteredReaction) Validate() error

Validate implements validator

func (*RegisteredReaction) XXX_DiscardUnknown added in v0.15.0

func (m *RegisteredReaction) XXX_DiscardUnknown()

func (*RegisteredReaction) XXX_Marshal added in v0.15.0

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

func (*RegisteredReaction) XXX_Merge added in v0.15.0

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

func (*RegisteredReaction) XXX_Size added in v0.15.0

func (m *RegisteredReaction) XXX_Size() int

func (*RegisteredReaction) XXX_Unmarshal added in v0.15.0

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

type RegisteredReactions added in v0.15.0

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

RegisteredReactions wraps a list of registered reactions

func (*RegisteredReactions) Descriptor added in v0.15.0

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

func (*RegisteredReactions) GetReactions added in v0.15.0

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

func (*RegisteredReactions) Marshal added in v0.15.0

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

func (*RegisteredReactions) MarshalTo added in v0.15.0

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

func (*RegisteredReactions) MarshalToSizedBuffer added in v0.15.0

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

func (*RegisteredReactions) ProtoMessage added in v0.15.0

func (*RegisteredReactions) ProtoMessage()

func (*RegisteredReactions) Reset added in v0.15.0

func (m *RegisteredReactions) Reset()

func (*RegisteredReactions) Size added in v0.15.0

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

func (*RegisteredReactions) String added in v0.15.0

func (m *RegisteredReactions) String() string

func (*RegisteredReactions) Unmarshal added in v0.15.0

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

func (*RegisteredReactions) XXX_DiscardUnknown added in v0.15.0

func (m *RegisteredReactions) XXX_DiscardUnknown()

func (*RegisteredReactions) XXX_Marshal added in v0.15.0

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

func (*RegisteredReactions) XXX_Merge added in v0.15.0

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

func (*RegisteredReactions) XXX_Size added in v0.15.0

func (m *RegisteredReactions) XXX_Size() int

func (*RegisteredReactions) XXX_Unmarshal added in v0.15.0

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

type UnimplementedMsgServer added in v0.15.0

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AddPostReaction added in v0.15.0

func (*UnimplementedMsgServer) AnswerPoll added in v0.15.0

func (*UnimplementedMsgServer) CreatePost added in v0.15.0

func (*UnimplementedMsgServer) EditPost added in v0.15.0

func (*UnimplementedMsgServer) RegisterReaction added in v0.15.0

func (*UnimplementedMsgServer) RemovePostReaction added in v0.15.0

type UnimplementedQueryServer added in v0.15.0

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params added in v0.15.0

func (*UnimplementedQueryServer) PollAnswers added in v0.15.0

func (*UnimplementedQueryServer) Post added in v0.15.0

func (*UnimplementedQueryServer) Posts added in v0.15.0

func (*UnimplementedQueryServer) RegisteredReactions added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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 added in v0.15.0

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

func (*UserAnswer) Equal added in v0.15.0

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

func (*UserAnswer) GetAnswers added in v0.15.0

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

func (*UserAnswer) GetUser added in v0.15.0

func (m *UserAnswer) GetUser() string

func (*UserAnswer) Marshal added in v0.15.0

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

func (*UserAnswer) MarshalTo added in v0.15.0

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

func (*UserAnswer) MarshalToSizedBuffer added in v0.15.0

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

func (*UserAnswer) ProtoMessage added in v0.15.0

func (*UserAnswer) ProtoMessage()

func (*UserAnswer) Reset added in v0.15.0

func (m *UserAnswer) Reset()

func (*UserAnswer) Size added in v0.15.0

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

func (*UserAnswer) String added in v0.15.0

func (m *UserAnswer) String() string

func (*UserAnswer) Unmarshal added in v0.15.0

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

func (UserAnswer) Validate added in v0.15.0

func (answers UserAnswer) Validate() error

Validate implements validator

func (*UserAnswer) XXX_DiscardUnknown added in v0.15.0

func (m *UserAnswer) XXX_DiscardUnknown()

func (*UserAnswer) XXX_Marshal added in v0.15.0

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

func (*UserAnswer) XXX_Merge added in v0.15.0

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

func (*UserAnswer) XXX_Size added in v0.15.0

func (m *UserAnswer) XXX_Size() int

func (*UserAnswer) XXX_Unmarshal added in v0.15.0

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 added in v0.15.0

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

func (*UserAnswers) GetAnswers added in v0.15.0

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

func (*UserAnswers) Marshal added in v0.15.0

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

func (*UserAnswers) MarshalTo added in v0.15.0

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

func (*UserAnswers) MarshalToSizedBuffer added in v0.15.0

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

func (*UserAnswers) ProtoMessage added in v0.15.0

func (*UserAnswers) ProtoMessage()

func (*UserAnswers) Reset added in v0.15.0

func (m *UserAnswers) Reset()

func (*UserAnswers) Size added in v0.15.0

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

func (*UserAnswers) String added in v0.15.0

func (m *UserAnswers) String() string

func (*UserAnswers) Unmarshal added in v0.15.0

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

func (*UserAnswers) XXX_DiscardUnknown added in v0.15.0

func (m *UserAnswers) XXX_DiscardUnknown()

func (*UserAnswers) XXX_Marshal added in v0.15.0

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

func (*UserAnswers) XXX_Merge added in v0.15.0

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

func (*UserAnswers) XXX_Size added in v0.15.0

func (m *UserAnswers) XXX_Size() int

func (*UserAnswers) XXX_Unmarshal added in v0.15.0

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

type UserAnswersEntry added in v0.15.0

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 added in v0.15.0

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

func (*UserAnswersEntry) Descriptor added in v0.15.0

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

func (*UserAnswersEntry) GetPostId added in v0.15.0

func (m *UserAnswersEntry) GetPostId() string

func (*UserAnswersEntry) GetUserAnswers added in v0.15.0

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

func (*UserAnswersEntry) Marshal added in v0.15.0

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

func (*UserAnswersEntry) MarshalTo added in v0.15.0

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

func (*UserAnswersEntry) MarshalToSizedBuffer added in v0.15.0

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

func (*UserAnswersEntry) ProtoMessage added in v0.15.0

func (*UserAnswersEntry) ProtoMessage()

func (*UserAnswersEntry) Reset added in v0.15.0

func (m *UserAnswersEntry) Reset()

func (*UserAnswersEntry) Size added in v0.15.0

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

func (*UserAnswersEntry) String added in v0.15.0

func (m *UserAnswersEntry) String() string

func (*UserAnswersEntry) Unmarshal added in v0.15.0

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

func (*UserAnswersEntry) XXX_DiscardUnknown added in v0.15.0

func (m *UserAnswersEntry) XXX_DiscardUnknown()

func (*UserAnswersEntry) XXX_Marshal added in v0.15.0

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

func (*UserAnswersEntry) XXX_Merge added in v0.15.0

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

func (*UserAnswersEntry) XXX_Size added in v0.15.0

func (m *UserAnswersEntry) XXX_Size() int

func (*UserAnswersEntry) XXX_Unmarshal added in v0.15.0

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