types

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 37 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"
	EventTypeRegisterReaction    = "reaction_registered"
	EventTypePostReported        = "post_reported"

	// Post attributes
	AttributeKeyPostID           = "post_id"
	AttributeKeyPostParentID     = "post_parent_id"
	AttributeKeyPostOwner        = "post_owner"
	AttributeKeyReportOwner      = "report_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"
	ActionReportPost         = "report_post"
	ActionAnswerPoll         = "answer_poll"
	ActionAddPostReaction    = "add_post_reaction"
	ActionRemovePostReaction = "remove_post_reaction"
	ActionRegisterReaction   = "register_reaction"

	// Queries
	QuerierRoute             = ModuleName
	QueryPost                = "post"
	QueryPosts               = "posts"
	QueryPostComments        = "post-comments"
	QueryReports             = "reports"
	QueryUserAnswers         = "user-answers"
	QueryRegisteredReactions = "registered-reactions"
	QueryPostReactions       = "post-reactions"
	QueryParams              = "params"
)
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")
	CommentsStorePrefix            = []byte("comments")
	SubspacePostPrefix             = []byte("subspace")
	PostReactionsStorePrefix       = []byte("p_reactions")
	RegisteredReactionsStorePrefix = []byte("r_reactions")
	UserAnswersStorePrefix         = []byte("user_answers")
	ReportsStorePrefix             = []byte("reports")
)
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")
	MaxAdditionalAttributesFieldsNumberKey     = []byte("MaxAdditionalAttributesFieldsNumber")
	MaxAdditionalAttributesFieldValueLengthKey = []byte("MaxAdditionalAttributesFieldValueLength")
	MaxAdditionalAttributesFieldKeyLengthKey   = []byte("MaxAdditionalAttributesFieldKeyLength")
)

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 (
	ErrInvalidLengthReport        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowReport          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupReport = fmt.Errorf("proto: unexpected end of group")
)
View Source
var CommentsState_name = map[int32]string{
	0: "COMMENTS_STATE_UNSPECIFIED",
	1: "COMMENTS_STATE_ALLOWED",
	2: "COMMENTS_STATE_BLOCKED",
}
View Source
var CommentsState_value = map[string]int32{
	"COMMENTS_STATE_UNSPECIFIED": 0,
	"COMMENTS_STATE_ALLOWED":     1,
	"COMMENTS_STATE_BLOCKED":     2,
}
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 CommentsStoreKey added in v0.17.0

func CommentsStoreKey(parentID, commentID string) []byte

CommentsStoreKey returns the store key used to store the comment containing the given data

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

func IsValidCommentsState(commentsState CommentsState) bool

IsValidCommentsState checks if the commentsState given correspond to one of the valid ones

func IsValidPostID

func IsValidPostID(value string) bool

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

func IsValidReactionCode

func IsValidReactionCode(value string) bool

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

func MustMarshalPostReaction added in v0.17.0

func MustMarshalPostReaction(cdc codec.BinaryMarshaler, reaction PostReaction) []byte

MustMarshalPostReaction serializes the given post reaction using the provided BinaryMarshaler

func MustMarshalRegisteredReaction added in v0.17.0

func MustMarshalRegisteredReaction(cdc codec.BinaryMarshaler, reaction RegisteredReaction) []byte

MustMarshalRegisteredReaction serializes the given registered reaction using the provided BinaryMarshaler

func MustMarshalReports added in v0.16.3

func MustMarshalReports(reports []Report, cdc codec.BinaryMarshaler) []byte

MustMarshalReports marshals the given reports into an array of bytes. Panics on error.

func MustMarshalUserAnswer added in v0.17.0

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

MustMarshalUserAnswer serializes the given user answer using the provided BinaryMarshaler

func NormalizeCommentsState added in v0.17.0

func NormalizeCommentsState(comState string) string

NormalizeCommentsState - normalize user specified comments state

func ParamKeyTable

func ParamKeyTable() paramstypes.KeyTable

ParamKeyTable Key declaration for parameters

func PostCommentsPrefix added in v0.17.0

func PostCommentsPrefix(postID string) []byte

PostCommentsPrefix returns the prefix used to store all the comments for the parent post having the given id

func PostReactionsPrefix added in v0.17.0

func PostReactionsPrefix(id string) []byte

PostReactionsPrefix returns the prefix used to store all the reactions for the post having the given id

func PostReactionsStoreKey

func PostReactionsStoreKey(id, user, shortcode string) []byte

PostReactionsStoreKey returns the key used to store the reaction containing the given data

func PostStoreKey

func PostStoreKey(id string) []byte

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

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func RegisteredReactionsPrefix added in v0.17.0

func RegisteredReactionsPrefix(subspace string) []byte

RegisteredReactionsPrefix returns the prefix used to store all the reactions for the subspace having the given id

func RegisteredReactionsStoreKey added in v0.17.0

func RegisteredReactionsStoreKey(subspace, shortCode string) []byte

RegisteredReactionsStoreKey returns the key used to store the registered reaction having the given short code for the given subspace

func ReportStoreKey added in v0.16.3

func ReportStoreKey(id string) []byte

ReportStoreKey turns an id into a key used to store a report inside the reports store

func SubspacePostKey added in v0.17.0

func SubspacePostKey(subspace string, id string) []byte

SubspacePostKey returns the key used to associate the post with the given id to the subspace with the provided id

func SubspacePostsPrefix added in v0.17.0

func SubspacePostsPrefix(subspace string) []byte

SubspacePostPrefix returns the prefix used to store all the posts present inside the subspace having the given id

func UserAnswersByPostPrefix added in v0.17.0

func UserAnswersByPostPrefix(id string) []byte

UserAnswersByPostPrefix returns the prefix used to store all the user answers for the post having the given id

func UserAnswersStoreKey added in v0.17.0

func UserAnswersStoreKey(id, user string) []byte

UserAnswersStoreKey returns the store key used to store the user answer containing the given data

func ValidateGenesis

func ValidateGenesis(data *GenesisState) error

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

func ValidateMaxAdditionalAttributesFieldKeyLengthParam added in v0.16.3

func ValidateMaxAdditionalAttributesFieldKeyLengthParam(i interface{}) error

func ValidateMaxAdditionalAttributesFieldNumberParam added in v0.16.3

func ValidateMaxAdditionalAttributesFieldNumberParam(i interface{}) error

func ValidateMaxAdditionalAttributesFieldValueLengthParam added in v0.16.3

func ValidateMaxAdditionalAttributesFieldValueLengthParam(i interface{}) error

func ValidateMaxPostMessageLengthParam

func ValidateMaxPostMessageLengthParam(i interface{}) error

Types

type Attachment

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

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

func NewAttachment

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

NewAttachment builds a new Attachment instance with the provided data

func (*Attachment) Descriptor

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

func (*Attachment) Equal

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

func (*Attachment) GetMimeType

func (m *Attachment) GetMimeType() string

func (*Attachment) GetTags

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

func (*Attachment) GetURI

func (m *Attachment) GetURI() string

func (*Attachment) Marshal

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

func (*Attachment) MarshalTo

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

func (*Attachment) MarshalToSizedBuffer

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

func (*Attachment) ProtoMessage

func (*Attachment) ProtoMessage()

func (*Attachment) Reset

func (m *Attachment) Reset()

func (*Attachment) Size

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

func (*Attachment) String

func (m *Attachment) String() string

func (*Attachment) Unmarshal

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

func (Attachment) Validate

func (attachments Attachment) Validate() error

Validate implements validator

func (*Attachment) XXX_DiscardUnknown

func (m *Attachment) XXX_DiscardUnknown()

func (*Attachment) XXX_Marshal

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

func (*Attachment) XXX_Merge

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

func (*Attachment) XXX_Size

func (m *Attachment) XXX_Size() int

func (*Attachment) XXX_Unmarshal

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

type Attachments

type Attachments []Attachment

Attachments represents a slice of Attachment object

func NewAttachments

func NewAttachments(attachments ...Attachment) Attachments

NewAttachments builds a new Attachments from the given attachments

func (Attachments) AppendIfMissing

func (attachments Attachments) AppendIfMissing(otherAttachment Attachment) Attachments

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

func (Attachments) Equal

func (attachments Attachments) Equal(other Attachments) bool

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

type Attribute added in v0.16.3

type Attribute 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"`
}

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

func NewAttribute added in v0.16.3

func NewAttribute(key, value string) Attribute

NewAttribute returns a new Attribute object

func (*Attribute) Descriptor added in v0.16.3

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

func (*Attribute) Equal added in v0.16.3

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

func (*Attribute) GetKey added in v0.16.3

func (m *Attribute) GetKey() string

func (*Attribute) GetValue added in v0.16.3

func (m *Attribute) GetValue() string

func (*Attribute) Marshal added in v0.16.3

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

func (*Attribute) MarshalTo added in v0.16.3

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

func (*Attribute) MarshalToSizedBuffer added in v0.16.3

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

func (*Attribute) ProtoMessage added in v0.16.3

func (*Attribute) ProtoMessage()

func (*Attribute) Reset added in v0.16.3

func (m *Attribute) Reset()

func (*Attribute) Size added in v0.16.3

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

func (*Attribute) String added in v0.16.3

func (m *Attribute) String() string

func (*Attribute) Unmarshal added in v0.16.3

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

func (*Attribute) XXX_DiscardUnknown added in v0.16.3

func (m *Attribute) XXX_DiscardUnknown()

func (*Attribute) XXX_Marshal added in v0.16.3

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

func (*Attribute) XXX_Merge added in v0.16.3

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

func (*Attribute) XXX_Size added in v0.16.3

func (m *Attribute) XXX_Size() int

func (*Attribute) XXX_Unmarshal added in v0.16.3

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

type CommentsState added in v0.17.0

type CommentsState int32

CommentsState contains all the possible comments states

const (
	// COMMENTS_STATE_UNSPECIFIED
	CommentsStateUnspecified CommentsState = 0
	// COMMENT_STATE_ALLOWED tells that's possible to comment a post
	CommentsStateAllowed CommentsState = 1
	// COMMENT_STATE_BLOCKED tells that's not possible to comment a post
	CommentsStateBlocked CommentsState = 2
)

func CommentsStateFromString added in v0.17.0

func CommentsStateFromString(comState string) (CommentsState, error)

CommentsStateFromString convert a string in the corresponding CommentsState

func (CommentsState) EnumDescriptor added in v0.17.0

func (CommentsState) EnumDescriptor() ([]byte, []int)

func (CommentsState) String added in v0.17.0

func (x CommentsState) String() string

type GenesisState

type GenesisState struct {
	Posts               []Post               `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts"`
	UsersPollAnswers    []UserAnswer         `protobuf:"bytes,2,rep,name=users_poll_answers,json=usersPollAnswers,proto3" json:"users_poll_answers"`
	PostsReactions      []PostReaction       `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"`
	Reports             []Report             `protobuf:"bytes,5,rep,name=reports,proto3" json:"reports" yaml:"reports"`
	Params              Params               `protobuf:"bytes,6,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, userAnswers []UserAnswer,
	postReactions []PostReaction, registeredReactions []RegisteredReaction, reports []Report, params Params,
) *GenesisState

NewGenesisState creates a new genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPosts

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

func (*GenesisState) GetPostsReactions

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

func (*GenesisState) GetRegisteredReactions

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

func (*GenesisState) GetReports added in v0.16.3

func (m *GenesisState) GetReports() []Report

func (*GenesisState) GetUsersPollAnswers

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

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type MsgAddPostReaction

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

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

func NewMsgAddPostReaction

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

NewMsgAddPostReaction is a constructor function for MsgAddPostReaction

func (*MsgAddPostReaction) Descriptor

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

func (MsgAddPostReaction) GetSignBytes

func (msg MsgAddPostReaction) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgAddPostReaction) GetSigners

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

GetSigners defines whose signature is required

func (*MsgAddPostReaction) Marshal

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

func (*MsgAddPostReaction) MarshalTo

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

func (*MsgAddPostReaction) MarshalToSizedBuffer

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

func (*MsgAddPostReaction) ProtoMessage

func (*MsgAddPostReaction) ProtoMessage()

func (*MsgAddPostReaction) Reset

func (m *MsgAddPostReaction) Reset()

func (MsgAddPostReaction) Route

func (msg MsgAddPostReaction) Route() string

Route should return the name of the module

func (*MsgAddPostReaction) Size

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

func (*MsgAddPostReaction) String

func (m *MsgAddPostReaction) String() string

func (MsgAddPostReaction) Type

func (msg MsgAddPostReaction) Type() string

Type should return the action

func (*MsgAddPostReaction) Unmarshal

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

func (MsgAddPostReaction) ValidateBasic

func (msg MsgAddPostReaction) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgAddPostReaction) XXX_DiscardUnknown

func (m *MsgAddPostReaction) XXX_DiscardUnknown()

func (*MsgAddPostReaction) XXX_Marshal

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

func (*MsgAddPostReaction) XXX_Merge

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

func (*MsgAddPostReaction) XXX_Size

func (m *MsgAddPostReaction) XXX_Size() int

func (*MsgAddPostReaction) XXX_Unmarshal

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

type MsgAddPostReactionResponse

type MsgAddPostReactionResponse struct {
}

MsgAddPostReactionResponse defines the Msg/AddReaction response type.

func (*MsgAddPostReactionResponse) Descriptor

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

func (*MsgAddPostReactionResponse) Marshal

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

func (*MsgAddPostReactionResponse) MarshalTo

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

func (*MsgAddPostReactionResponse) MarshalToSizedBuffer

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

func (*MsgAddPostReactionResponse) ProtoMessage

func (*MsgAddPostReactionResponse) ProtoMessage()

func (*MsgAddPostReactionResponse) Reset

func (m *MsgAddPostReactionResponse) Reset()

func (*MsgAddPostReactionResponse) Size

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

func (*MsgAddPostReactionResponse) String

func (m *MsgAddPostReactionResponse) String() string

func (*MsgAddPostReactionResponse) Unmarshal

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

func (*MsgAddPostReactionResponse) XXX_DiscardUnknown

func (m *MsgAddPostReactionResponse) XXX_DiscardUnknown()

func (*MsgAddPostReactionResponse) XXX_Marshal

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

func (*MsgAddPostReactionResponse) XXX_Merge

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

func (*MsgAddPostReactionResponse) XXX_Size

func (m *MsgAddPostReactionResponse) XXX_Size() int

func (*MsgAddPostReactionResponse) XXX_Unmarshal

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

type MsgAnswerPoll

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

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

func NewMsgAnswerPoll

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

NewMsgAnswerPoll is the constructor function for MsgAnswerPoll

func (*MsgAnswerPoll) Descriptor

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

func (MsgAnswerPoll) GetSignBytes

func (msg MsgAnswerPoll) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgAnswerPoll) GetSigners

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

GetSigners defines whose signature is required

func (*MsgAnswerPoll) Marshal

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

func (*MsgAnswerPoll) MarshalTo

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

func (*MsgAnswerPoll) MarshalToSizedBuffer

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

func (*MsgAnswerPoll) ProtoMessage

func (*MsgAnswerPoll) ProtoMessage()

func (*MsgAnswerPoll) Reset

func (m *MsgAnswerPoll) Reset()

func (MsgAnswerPoll) Route

func (msg MsgAnswerPoll) Route() string

Route should return the name of the module

func (*MsgAnswerPoll) Size

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

func (*MsgAnswerPoll) String

func (m *MsgAnswerPoll) String() string

func (MsgAnswerPoll) Type

func (msg MsgAnswerPoll) Type() string

Type should return the action

func (*MsgAnswerPoll) Unmarshal

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

func (MsgAnswerPoll) ValidateBasic

func (msg MsgAnswerPoll) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgAnswerPoll) XXX_DiscardUnknown

func (m *MsgAnswerPoll) XXX_DiscardUnknown()

func (*MsgAnswerPoll) XXX_Marshal

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

func (*MsgAnswerPoll) XXX_Merge

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

func (*MsgAnswerPoll) XXX_Size

func (m *MsgAnswerPoll) XXX_Size() int

func (*MsgAnswerPoll) XXX_Unmarshal

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

type MsgAnswerPollResponse

type MsgAnswerPollResponse struct {
}

MsgAnswerPollResponse defines the Msg/AnswerPoll response type.

func (*MsgAnswerPollResponse) Descriptor

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

func (*MsgAnswerPollResponse) Marshal

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

func (*MsgAnswerPollResponse) MarshalTo

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

func (*MsgAnswerPollResponse) MarshalToSizedBuffer

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

func (*MsgAnswerPollResponse) ProtoMessage

func (*MsgAnswerPollResponse) ProtoMessage()

func (*MsgAnswerPollResponse) Reset

func (m *MsgAnswerPollResponse) Reset()

func (*MsgAnswerPollResponse) Size

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

func (*MsgAnswerPollResponse) String

func (m *MsgAnswerPollResponse) String() string

func (*MsgAnswerPollResponse) Unmarshal

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

func (*MsgAnswerPollResponse) XXX_DiscardUnknown

func (m *MsgAnswerPollResponse) XXX_DiscardUnknown()

func (*MsgAnswerPollResponse) XXX_Marshal

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

func (*MsgAnswerPollResponse) XXX_Merge

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

func (*MsgAnswerPollResponse) XXX_Size

func (m *MsgAnswerPollResponse) XXX_Size() int

func (*MsgAnswerPollResponse) XXX_Unmarshal

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

type MsgClient

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

MsgClient is the client API for Msg service.

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

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreatePost

type MsgCreatePost struct {
	ParentID             string        `protobuf:"bytes,1,opt,name=parent_id,json=parentId,proto3" json:"parent_id" yaml:"parent_id"`
	Message              string        `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" yaml:"message"`
	CommentsState        CommentsState `` /* 153-byte string literal not displayed */
	Subspace             string        `protobuf:"bytes,4,opt,name=subspace,proto3" json:"subspace,omitempty" yaml:"subspace"`
	AdditionalAttributes []Attribute   `` /* 160-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, commentsState CommentsState, subspace string,
	additionalAttributes []Attribute, owner string, attachments Attachments, pollData *PollData,
) *MsgCreatePost

NewMsgCreatePost is a constructor function for MsgCreatePost

func (*MsgCreatePost) Descriptor

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

func (MsgCreatePost) GetSignBytes

func (msg MsgCreatePost) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgCreatePost) GetSigners

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

GetSigners defines whose signature is required

func (*MsgCreatePost) Marshal

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

func (MsgCreatePost) MarshalJSON

func (msg MsgCreatePost) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Mashaler interface. This is done due to the fact that Amino does not respect omitempty clauses

func (*MsgCreatePost) MarshalTo

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

func (*MsgCreatePost) MarshalToSizedBuffer

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

func (*MsgCreatePost) ProtoMessage

func (*MsgCreatePost) ProtoMessage()

func (*MsgCreatePost) Reset

func (m *MsgCreatePost) Reset()

func (MsgCreatePost) Route

func (msg MsgCreatePost) Route() string

Route should return the name of the module

func (*MsgCreatePost) Size

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

func (*MsgCreatePost) String

func (m *MsgCreatePost) String() string

func (MsgCreatePost) Type

func (msg MsgCreatePost) Type() string

Type should return the action

func (*MsgCreatePost) Unmarshal

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

func (MsgCreatePost) ValidateBasic

func (msg MsgCreatePost) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgCreatePost) XXX_DiscardUnknown

func (m *MsgCreatePost) XXX_DiscardUnknown()

func (*MsgCreatePost) XXX_Marshal

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

func (*MsgCreatePost) XXX_Merge

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

func (*MsgCreatePost) XXX_Size

func (m *MsgCreatePost) XXX_Size() int

func (*MsgCreatePost) XXX_Unmarshal

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

type MsgCreatePostResponse

type MsgCreatePostResponse struct {
}

MsgCreatePostResponse defines the Msg/CreatePost response type.

func (*MsgCreatePostResponse) Descriptor

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

func (*MsgCreatePostResponse) Marshal

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

func (*MsgCreatePostResponse) MarshalTo

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

func (*MsgCreatePostResponse) MarshalToSizedBuffer

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

func (*MsgCreatePostResponse) ProtoMessage

func (*MsgCreatePostResponse) ProtoMessage()

func (*MsgCreatePostResponse) Reset

func (m *MsgCreatePostResponse) Reset()

func (*MsgCreatePostResponse) Size

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

func (*MsgCreatePostResponse) String

func (m *MsgCreatePostResponse) String() string

func (*MsgCreatePostResponse) Unmarshal

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

func (*MsgCreatePostResponse) XXX_DiscardUnknown

func (m *MsgCreatePostResponse) XXX_DiscardUnknown()

func (*MsgCreatePostResponse) XXX_Marshal

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

func (*MsgCreatePostResponse) XXX_Merge

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

func (*MsgCreatePostResponse) XXX_Size

func (m *MsgCreatePostResponse) XXX_Size() int

func (*MsgCreatePostResponse) XXX_Unmarshal

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

type MsgEditPost

type MsgEditPost struct {
	PostID        string        `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
	Message       string        `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" yaml:"message"`
	CommentsState CommentsState `` /* 153-byte string literal not displayed */
	Attachments   []Attachment  `protobuf:"bytes,4,rep,name=attachments,proto3" json:"attachments,omitempty" yaml:"attachments,omitempty"`
	PollData      *PollData     `protobuf:"bytes,5,opt,name=poll_data,json=pollData,proto3" json:"poll_data,omitempty" yaml:"poll_data,omitempty"`
	Editor        string        `protobuf:"bytes,6,opt,name=editor,proto3" json:"editor,omitempty" yaml:"editor"`
}

MsgEditPost represents the message used to edit a post.

func NewMsgEditPost

func NewMsgEditPost(
	postID string, message string, commentsState CommentsState, attachments Attachments, pollData *PollData, owner string,
) *MsgEditPost

NewMsgEditPost is the constructor function for MsgEditPost

func (*MsgEditPost) Descriptor

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

func (MsgEditPost) GetSignBytes

func (msg MsgEditPost) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgEditPost) GetSigners

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

GetSigners defines whose signature is required

func (*MsgEditPost) Marshal

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

func (*MsgEditPost) MarshalTo

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

func (*MsgEditPost) MarshalToSizedBuffer

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

func (*MsgEditPost) ProtoMessage

func (*MsgEditPost) ProtoMessage()

func (*MsgEditPost) Reset

func (m *MsgEditPost) Reset()

func (MsgEditPost) Route

func (msg MsgEditPost) Route() string

Route should return the name of the module

func (*MsgEditPost) Size

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

func (*MsgEditPost) String

func (m *MsgEditPost) String() string

func (MsgEditPost) Type

func (msg MsgEditPost) Type() string

Type should return the action

func (*MsgEditPost) Unmarshal

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

func (MsgEditPost) ValidateBasic

func (msg MsgEditPost) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgEditPost) XXX_DiscardUnknown

func (m *MsgEditPost) XXX_DiscardUnknown()

func (*MsgEditPost) XXX_Marshal

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

func (*MsgEditPost) XXX_Merge

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

func (*MsgEditPost) XXX_Size

func (m *MsgEditPost) XXX_Size() int

func (*MsgEditPost) XXX_Unmarshal

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

type MsgEditPostResponse

type MsgEditPostResponse struct {
}

MsgEditPostResponse defines the Msg/EditPost response type.

func (*MsgEditPostResponse) Descriptor

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

func (*MsgEditPostResponse) Marshal

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

func (*MsgEditPostResponse) MarshalTo

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

func (*MsgEditPostResponse) MarshalToSizedBuffer

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

func (*MsgEditPostResponse) ProtoMessage

func (*MsgEditPostResponse) ProtoMessage()

func (*MsgEditPostResponse) Reset

func (m *MsgEditPostResponse) Reset()

func (*MsgEditPostResponse) Size

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

func (*MsgEditPostResponse) String

func (m *MsgEditPostResponse) String() string

func (*MsgEditPostResponse) Unmarshal

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

func (*MsgEditPostResponse) XXX_DiscardUnknown

func (m *MsgEditPostResponse) XXX_DiscardUnknown()

func (*MsgEditPostResponse) XXX_Marshal

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

func (*MsgEditPostResponse) XXX_Merge

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

func (*MsgEditPostResponse) XXX_Size

func (m *MsgEditPostResponse) XXX_Size() int

func (*MsgEditPostResponse) XXX_Unmarshal

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

type MsgRegisterReaction

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

MsgRegisterReaction represents the message that must be used when wanting to register a new reaction shortCode and the associated value

func NewMsgRegisterReaction

func NewMsgRegisterReaction(creator string, shortCode, value, subspace string) *MsgRegisterReaction

NewMsgRegisterReaction is a constructor function for MsgRegisterReaction

func (*MsgRegisterReaction) Descriptor

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

func (MsgRegisterReaction) GetSignBytes

func (msg MsgRegisterReaction) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgRegisterReaction) GetSigners

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

GetSigners defines whose signature is required

func (*MsgRegisterReaction) Marshal

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

func (*MsgRegisterReaction) MarshalTo

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

func (*MsgRegisterReaction) MarshalToSizedBuffer

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

func (*MsgRegisterReaction) ProtoMessage

func (*MsgRegisterReaction) ProtoMessage()

func (*MsgRegisterReaction) Reset

func (m *MsgRegisterReaction) Reset()

func (MsgRegisterReaction) Route

func (msg MsgRegisterReaction) Route() string

Route should return the name of the module

func (*MsgRegisterReaction) Size

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

func (*MsgRegisterReaction) String

func (m *MsgRegisterReaction) String() string

func (MsgRegisterReaction) Type

func (msg MsgRegisterReaction) Type() string

Type should return the action

func (*MsgRegisterReaction) Unmarshal

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

func (MsgRegisterReaction) ValidateBasic

func (msg MsgRegisterReaction) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgRegisterReaction) XXX_DiscardUnknown

func (m *MsgRegisterReaction) XXX_DiscardUnknown()

func (*MsgRegisterReaction) XXX_Marshal

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

func (*MsgRegisterReaction) XXX_Merge

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

func (*MsgRegisterReaction) XXX_Size

func (m *MsgRegisterReaction) XXX_Size() int

func (*MsgRegisterReaction) XXX_Unmarshal

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

type MsgRegisterReactionResponse

type MsgRegisterReactionResponse struct {
}

MsgRegisterReactionResponse defines the Msg/RegisterReaction response type.

func (*MsgRegisterReactionResponse) Descriptor

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

func (*MsgRegisterReactionResponse) Marshal

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

func (*MsgRegisterReactionResponse) MarshalTo

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

func (*MsgRegisterReactionResponse) MarshalToSizedBuffer

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

func (*MsgRegisterReactionResponse) ProtoMessage

func (*MsgRegisterReactionResponse) ProtoMessage()

func (*MsgRegisterReactionResponse) Reset

func (m *MsgRegisterReactionResponse) Reset()

func (*MsgRegisterReactionResponse) Size

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

func (*MsgRegisterReactionResponse) String

func (m *MsgRegisterReactionResponse) String() string

func (*MsgRegisterReactionResponse) Unmarshal

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

func (*MsgRegisterReactionResponse) XXX_DiscardUnknown

func (m *MsgRegisterReactionResponse) XXX_DiscardUnknown()

func (*MsgRegisterReactionResponse) XXX_Marshal

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

func (*MsgRegisterReactionResponse) XXX_Merge

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

func (*MsgRegisterReactionResponse) XXX_Size

func (m *MsgRegisterReactionResponse) XXX_Size() int

func (*MsgRegisterReactionResponse) XXX_Unmarshal

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

type MsgRemovePostReaction

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

MsgRemovePostReaction represents the message to be used when wanting to remove an existing reaction from a specific user having a specific value

func NewMsgRemovePostReaction

func NewMsgRemovePostReaction(postID string, user string, value string) *MsgRemovePostReaction

NewMsgRemovePostReaction is the constructor of MsgRemovePostReaction

func (*MsgRemovePostReaction) Descriptor

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

func (MsgRemovePostReaction) GetSignBytes

func (msg MsgRemovePostReaction) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgRemovePostReaction) GetSigners

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

GetSigners defines whose signature is required

func (*MsgRemovePostReaction) Marshal

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

func (*MsgRemovePostReaction) MarshalTo

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

func (*MsgRemovePostReaction) MarshalToSizedBuffer

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

func (*MsgRemovePostReaction) ProtoMessage

func (*MsgRemovePostReaction) ProtoMessage()

func (*MsgRemovePostReaction) Reset

func (m *MsgRemovePostReaction) Reset()

func (MsgRemovePostReaction) Route

func (msg MsgRemovePostReaction) Route() string

Route should return the name of the module

func (*MsgRemovePostReaction) Size

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

func (*MsgRemovePostReaction) String

func (m *MsgRemovePostReaction) String() string

func (MsgRemovePostReaction) Type

func (msg MsgRemovePostReaction) Type() string

Type should return the action

func (*MsgRemovePostReaction) Unmarshal

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

func (MsgRemovePostReaction) ValidateBasic

func (msg MsgRemovePostReaction) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgRemovePostReaction) XXX_DiscardUnknown

func (m *MsgRemovePostReaction) XXX_DiscardUnknown()

func (*MsgRemovePostReaction) XXX_Marshal

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

func (*MsgRemovePostReaction) XXX_Merge

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

func (*MsgRemovePostReaction) XXX_Size

func (m *MsgRemovePostReaction) XXX_Size() int

func (*MsgRemovePostReaction) XXX_Unmarshal

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

type MsgRemovePostReactionResponse

type MsgRemovePostReactionResponse struct {
}

MsgRemovePostReactionResponse defines the Msg/RemovePostReaction response type.

func (*MsgRemovePostReactionResponse) Descriptor

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

func (*MsgRemovePostReactionResponse) Marshal

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

func (*MsgRemovePostReactionResponse) MarshalTo

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

func (*MsgRemovePostReactionResponse) MarshalToSizedBuffer

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

func (*MsgRemovePostReactionResponse) ProtoMessage

func (*MsgRemovePostReactionResponse) ProtoMessage()

func (*MsgRemovePostReactionResponse) Reset

func (m *MsgRemovePostReactionResponse) Reset()

func (*MsgRemovePostReactionResponse) Size

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

func (*MsgRemovePostReactionResponse) String

func (*MsgRemovePostReactionResponse) Unmarshal

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

func (*MsgRemovePostReactionResponse) XXX_DiscardUnknown

func (m *MsgRemovePostReactionResponse) XXX_DiscardUnknown()

func (*MsgRemovePostReactionResponse) XXX_Marshal

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

func (*MsgRemovePostReactionResponse) XXX_Merge

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

func (*MsgRemovePostReactionResponse) XXX_Size

func (m *MsgRemovePostReactionResponse) XXX_Size() int

func (*MsgRemovePostReactionResponse) XXX_Unmarshal

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

type MsgReportPost added in v0.16.3

type MsgReportPost struct {
	PostID     string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
	ReportType string `protobuf:"bytes,2,opt,name=report_type,json=reportType,proto3" json:"report_type,omitempty" yaml:"type"`
	Message    string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty" yaml:"message"`
	User       string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty" yaml:"user"`
}

MsgReportPost represents a message to create a port report.

func NewMsgReportPost added in v0.16.3

func NewMsgReportPost(id string, reportType, message string, user string) *MsgReportPost

NewMsgReportPost returns a MsgReportPost object

func (*MsgReportPost) Descriptor added in v0.16.3

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

func (MsgReportPost) GetSignBytes added in v0.16.3

func (msg MsgReportPost) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgReportPost) GetSigners added in v0.16.3

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

GetSigners defines whose signature is required

func (*MsgReportPost) Marshal added in v0.16.3

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

func (*MsgReportPost) MarshalTo added in v0.16.3

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

func (*MsgReportPost) MarshalToSizedBuffer added in v0.16.3

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

func (*MsgReportPost) ProtoMessage added in v0.16.3

func (*MsgReportPost) ProtoMessage()

func (*MsgReportPost) Reset added in v0.16.3

func (m *MsgReportPost) Reset()

func (MsgReportPost) Route added in v0.16.3

func (msg MsgReportPost) Route() string

Route should return the name of the module

func (*MsgReportPost) Size added in v0.16.3

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

func (*MsgReportPost) String added in v0.16.3

func (m *MsgReportPost) String() string

func (MsgReportPost) Type added in v0.16.3

func (msg MsgReportPost) Type() string

Type should return the action

func (*MsgReportPost) Unmarshal added in v0.16.3

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

func (MsgReportPost) ValidateBasic added in v0.16.3

func (msg MsgReportPost) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgReportPost) XXX_DiscardUnknown added in v0.16.3

func (m *MsgReportPost) XXX_DiscardUnknown()

func (*MsgReportPost) XXX_Marshal added in v0.16.3

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

func (*MsgReportPost) XXX_Merge added in v0.16.3

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

func (*MsgReportPost) XXX_Size added in v0.16.3

func (m *MsgReportPost) XXX_Size() int

func (*MsgReportPost) XXX_Unmarshal added in v0.16.3

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

type MsgReportPostResponse added in v0.16.3

type MsgReportPostResponse struct {
}

MsgReportPostResponse defines the Msg/ReportPost response type.

func (*MsgReportPostResponse) Descriptor added in v0.16.3

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

func (*MsgReportPostResponse) Marshal added in v0.16.3

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

func (*MsgReportPostResponse) MarshalTo added in v0.16.3

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

func (*MsgReportPostResponse) MarshalToSizedBuffer added in v0.16.3

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

func (*MsgReportPostResponse) ProtoMessage added in v0.16.3

func (*MsgReportPostResponse) ProtoMessage()

func (*MsgReportPostResponse) Reset added in v0.16.3

func (m *MsgReportPostResponse) Reset()

func (*MsgReportPostResponse) Size added in v0.16.3

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

func (*MsgReportPostResponse) String added in v0.16.3

func (m *MsgReportPostResponse) String() string

func (*MsgReportPostResponse) Unmarshal added in v0.16.3

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

func (*MsgReportPostResponse) XXX_DiscardUnknown added in v0.16.3

func (m *MsgReportPostResponse) XXX_DiscardUnknown()

func (*MsgReportPostResponse) XXX_Marshal added in v0.16.3

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

func (*MsgReportPostResponse) XXX_Merge added in v0.16.3

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

func (*MsgReportPostResponse) XXX_Size added in v0.16.3

func (m *MsgReportPostResponse) XXX_Size() int

func (*MsgReportPostResponse) XXX_Unmarshal added in v0.16.3

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

type MsgServer

type MsgServer interface {
	// CreatePost defines the method to create a post
	CreatePost(context.Context, *MsgCreatePost) (*MsgCreatePostResponse, error)
	// EditPost defines the method to edit an existing post
	EditPost(context.Context, *MsgEditPost) (*MsgEditPostResponse, error)
	// ReportPost defines a method for creating a new post report
	ReportPost(context.Context, *MsgReportPost) (*MsgReportPostResponse, 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 Params

type Params struct {
	MaxPostMessageLength                    github_com_cosmos_cosmos_sdk_types.Int `` /* 196-byte string literal not displayed */
	MaxAdditionalAttributesFieldsNumber     github_com_cosmos_cosmos_sdk_types.Int `` /* 259-byte string literal not displayed */
	MaxAdditionalAttributesFieldValueLength github_com_cosmos_cosmos_sdk_types.Int `` /* 278-byte string literal not displayed */
	MaxAdditionalAttributesFieldKeyLength   github_com_cosmos_cosmos_sdk_types.Int `` /* 270-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, maxOpDataFieldKeyLen sdk.Int) Params

NewParams creates a new Params obj

func (*Params) Descriptor

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (params Params) Validate() error

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

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type PollAnswer

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

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

func NewPollAnswer

func NewPollAnswer(id string, text string) PollAnswer

NewPollAnswer returns a new PollAnswer object

func (*PollAnswer) Descriptor

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

func (*PollAnswer) Equal

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

func (*PollAnswer) GetID

func (m *PollAnswer) GetID() string

func (*PollAnswer) GetText

func (m *PollAnswer) GetText() string

func (*PollAnswer) Marshal

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

func (*PollAnswer) MarshalTo

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

func (*PollAnswer) MarshalToSizedBuffer

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

func (*PollAnswer) ProtoMessage

func (*PollAnswer) ProtoMessage()

func (*PollAnswer) Reset

func (m *PollAnswer) Reset()

func (*PollAnswer) Size

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

func (*PollAnswer) String

func (m *PollAnswer) String() string

func (*PollAnswer) Unmarshal

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

func (PollAnswer) Validate

func (answer PollAnswer) Validate() error

Validate implements validator

func (*PollAnswer) XXX_DiscardUnknown

func (m *PollAnswer) XXX_DiscardUnknown()

func (*PollAnswer) XXX_Marshal

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

func (*PollAnswer) XXX_Merge

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

func (*PollAnswer) XXX_Size

func (m *PollAnswer) XXX_Size() int

func (*PollAnswer) XXX_Unmarshal

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

type PollAnswers

type PollAnswers []PollAnswer

PollAnswers represent a slice of PollAnswer objects

func NewPollAnswers

func NewPollAnswers(answers ...PollAnswer) PollAnswers

NewPollAnswers builds a new PollAnswers object from the given answer

func (PollAnswers) AppendIfMissing

func (answers PollAnswers) AppendIfMissing(answer PollAnswer) PollAnswers

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

type PollData

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

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

func NewPollData

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

NewPollData returns a new PollData object pointer containing the given poll

func (*PollData) Descriptor

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

func (*PollData) Equal

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

func (*PollData) GetAllowsAnswerEdits

func (m *PollData) GetAllowsAnswerEdits() bool

func (*PollData) GetAllowsMultipleAnswers

func (m *PollData) GetAllowsMultipleAnswers() bool

func (*PollData) GetEndDate

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

func (*PollData) GetProvidedAnswers

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

func (*PollData) GetQuestion

func (m *PollData) GetQuestion() string

func (*PollData) Marshal

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

func (*PollData) MarshalTo

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

func (*PollData) MarshalToSizedBuffer

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

func (*PollData) ProtoMessage

func (*PollData) ProtoMessage()

func (*PollData) Reset

func (m *PollData) Reset()

func (*PollData) Size

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

func (*PollData) String

func (m *PollData) String() string

func (*PollData) Unmarshal

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

func (PollData) Validate

func (data PollData) Validate() error

Validate implements the validator interface

func (*PollData) XXX_DiscardUnknown

func (m *PollData) XXX_DiscardUnknown()

func (*PollData) XXX_Marshal

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

func (*PollData) XXX_Merge

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

func (*PollData) XXX_Size

func (m *PollData) XXX_Size() int

func (*PollData) XXX_Unmarshal

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

type Post

type Post struct {
	PostID               string        `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"id"`
	ParentID             string        `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id" yaml:"parent_id"`
	Message              string        `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty" yaml:"message"`
	Created              time.Time     `protobuf:"bytes,4,opt,name=created,proto3,stdtime" json:"created" yaml:"created"`
	LastEdited           time.Time     `protobuf:"bytes,5,opt,name=last_edited,json=lastEdited,proto3,stdtime" json:"last_edited" yaml:"created"`
	CommentsState        CommentsState `` /* 153-byte string literal not displayed */
	Subspace             string        `protobuf:"bytes,7,opt,name=subspace,proto3" json:"subspace,omitempty" yaml:"subspace"`
	AdditionalAttributes []Attribute   `` /* 160-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, commentsState CommentsState, subspace string,
	additionalAttributes []Attribute, attachments []Attachment, pollData *PollData,
	lastEdited time.Time, created time.Time, creator string,
) Post

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

func (*Post) Descriptor

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

func (*Post) Equal

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

func (*Post) GetAdditionalAttributes added in v0.16.3

func (m *Post) GetAdditionalAttributes() []Attribute

func (*Post) GetAttachments

func (m *Post) GetAttachments() Attachments

func (*Post) GetCommentsState added in v0.17.0

func (m *Post) GetCommentsState() CommentsState

func (*Post) GetCreated

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

func (*Post) GetCreator

func (m *Post) GetCreator() string

func (*Post) GetLastEdited

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

func (*Post) GetMessage

func (m *Post) GetMessage() string

func (*Post) GetParentID added in v0.16.3

func (m *Post) GetParentID() string

func (*Post) GetPollData

func (m *Post) GetPollData() *PollData

func (*Post) GetPostID added in v0.16.3

func (m *Post) GetPostID() string

func (*Post) GetSubspace

func (m *Post) GetSubspace() string

func (*Post) Marshal

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

func (*Post) MarshalTo

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

func (*Post) MarshalToSizedBuffer

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

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) Reset

func (m *Post) Reset()

func (*Post) Size

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

func (*Post) String

func (m *Post) String() string

func (*Post) Unmarshal

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

func (Post) Validate

func (post Post) Validate() error

Validate implements validator

func (*Post) XXX_DiscardUnknown

func (m *Post) XXX_DiscardUnknown()

func (*Post) XXX_Marshal

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

func (*Post) XXX_Merge

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

func (*Post) XXX_Size

func (m *Post) XXX_Size() int

func (*Post) XXX_Unmarshal

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

type PostReaction

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

PostReaction is a struct of a user reaction to a post

func MustUnmarshalPostReaction added in v0.17.0

func MustUnmarshalPostReaction(cdc codec.BinaryMarshaler, bz []byte) PostReaction

MustUnmarshalPostReaction deserializes the given byte array as a post reaction using the provided BinaryMarshaler

func NewPostReaction

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

NewPostReaction returns a new PostReaction

func (*PostReaction) Descriptor

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

func (*PostReaction) Equal

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

func (*PostReaction) GetOwner

func (m *PostReaction) GetOwner() string

func (*PostReaction) GetPostID added in v0.17.0

func (m *PostReaction) GetPostID() string

func (*PostReaction) GetShortCode

func (m *PostReaction) GetShortCode() string

func (*PostReaction) GetValue

func (m *PostReaction) GetValue() string

func (*PostReaction) Marshal

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

func (*PostReaction) MarshalTo

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

func (*PostReaction) MarshalToSizedBuffer

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

func (*PostReaction) ProtoMessage

func (*PostReaction) ProtoMessage()

func (*PostReaction) Reset

func (m *PostReaction) Reset()

func (*PostReaction) Size

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

func (*PostReaction) String

func (m *PostReaction) String() string

func (*PostReaction) Unmarshal

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

func (PostReaction) Validate

func (reaction PostReaction) Validate() error

Validate implements validator

func (*PostReaction) XXX_DiscardUnknown

func (m *PostReaction) XXX_DiscardUnknown()

func (*PostReaction) XXX_Marshal

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

func (*PostReaction) XXX_Merge

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

func (*PostReaction) XXX_Size

func (m *PostReaction) XXX_Size() int

func (*PostReaction) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Posts queries all the stored posts
	Posts(ctx context.Context, in *QueryPostsRequest, opts ...grpc.CallOption) (*QueryPostsResponse, error)
	// Post queries a specific post
	Post(ctx context.Context, in *QueryPostRequest, opts ...grpc.CallOption) (*QueryPostResponse, error)
	// Reports queries the reports for the post having the given id
	Reports(ctx context.Context, in *QueryReportsRequest, opts ...grpc.CallOption) (*QueryReportsResponse, error)
	// UserAnswers queries the user answers of the post having a specific id
	UserAnswers(ctx context.Context, in *QueryUserAnswersRequest, opts ...grpc.CallOption) (*QueryUserAnswersResponse, 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)
	// PostComments queries the comments of the post having the given id
	PostComments(ctx context.Context, in *QueryPostCommentsRequest, opts ...grpc.CallOption) (*QueryPostCommentsResponse, error)
	// PostReactions queries all the reactions of the post having the given id
	PostReactions(ctx context.Context, in *QueryPostReactionsRequest, opts ...grpc.CallOption) (*QueryPostReactionsResponse, error)
}

QueryClient is the client API for Query service.

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

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

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

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

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

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

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryPostCommentsRequest added in v0.17.0

type QueryPostCommentsRequest struct {
	PostId string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPostCommentsRequest is the request type for the Query/PostComments RPC method.

func (*QueryPostCommentsRequest) Descriptor added in v0.17.0

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

func (*QueryPostCommentsRequest) GetPagination added in v0.17.0

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

func (*QueryPostCommentsRequest) GetPostId added in v0.17.0

func (m *QueryPostCommentsRequest) GetPostId() string

func (*QueryPostCommentsRequest) Marshal added in v0.17.0

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

func (*QueryPostCommentsRequest) MarshalTo added in v0.17.0

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

func (*QueryPostCommentsRequest) MarshalToSizedBuffer added in v0.17.0

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

func (*QueryPostCommentsRequest) ProtoMessage added in v0.17.0

func (*QueryPostCommentsRequest) ProtoMessage()

func (*QueryPostCommentsRequest) Reset added in v0.17.0

func (m *QueryPostCommentsRequest) Reset()

func (*QueryPostCommentsRequest) Size added in v0.17.0

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

func (*QueryPostCommentsRequest) String added in v0.17.0

func (m *QueryPostCommentsRequest) String() string

func (*QueryPostCommentsRequest) Unmarshal added in v0.17.0

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

func (*QueryPostCommentsRequest) XXX_DiscardUnknown added in v0.17.0

func (m *QueryPostCommentsRequest) XXX_DiscardUnknown()

func (*QueryPostCommentsRequest) XXX_Marshal added in v0.17.0

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

func (*QueryPostCommentsRequest) XXX_Merge added in v0.17.0

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

func (*QueryPostCommentsRequest) XXX_Size added in v0.17.0

func (m *QueryPostCommentsRequest) XXX_Size() int

func (*QueryPostCommentsRequest) XXX_Unmarshal added in v0.17.0

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

type QueryPostCommentsResponse added in v0.17.0

type QueryPostCommentsResponse struct {
	Comments   []Post              `protobuf:"bytes,1,rep,name=comments,proto3" json:"comments"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPostCommentsResponse is the response type for the Query/PostComments RPC method.

func (*QueryPostCommentsResponse) Descriptor added in v0.17.0

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

func (*QueryPostCommentsResponse) GetComments added in v0.17.0

func (m *QueryPostCommentsResponse) GetComments() []Post

func (*QueryPostCommentsResponse) GetPagination added in v0.17.0

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

func (*QueryPostCommentsResponse) Marshal added in v0.17.0

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

func (*QueryPostCommentsResponse) MarshalTo added in v0.17.0

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

func (*QueryPostCommentsResponse) MarshalToSizedBuffer added in v0.17.0

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

func (*QueryPostCommentsResponse) ProtoMessage added in v0.17.0

func (*QueryPostCommentsResponse) ProtoMessage()

func (*QueryPostCommentsResponse) Reset added in v0.17.0

func (m *QueryPostCommentsResponse) Reset()

func (*QueryPostCommentsResponse) Size added in v0.17.0

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

func (*QueryPostCommentsResponse) String added in v0.17.0

func (m *QueryPostCommentsResponse) String() string

func (*QueryPostCommentsResponse) Unmarshal added in v0.17.0

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

func (*QueryPostCommentsResponse) XXX_DiscardUnknown added in v0.17.0

func (m *QueryPostCommentsResponse) XXX_DiscardUnknown()

func (*QueryPostCommentsResponse) XXX_Marshal added in v0.17.0

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

func (*QueryPostCommentsResponse) XXX_Merge added in v0.17.0

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

func (*QueryPostCommentsResponse) XXX_Size added in v0.17.0

func (m *QueryPostCommentsResponse) XXX_Size() int

func (*QueryPostCommentsResponse) XXX_Unmarshal added in v0.17.0

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

type QueryPostReactionsRequest added in v0.17.0

type QueryPostReactionsRequest struct {
	PostId string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPostReactionsRequest is the request type for the Query/PostReactions RPC method.

func (*QueryPostReactionsRequest) Descriptor added in v0.17.0

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

func (*QueryPostReactionsRequest) GetPagination added in v0.17.0

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

func (*QueryPostReactionsRequest) GetPostId added in v0.17.0

func (m *QueryPostReactionsRequest) GetPostId() string

func (*QueryPostReactionsRequest) Marshal added in v0.17.0

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

func (*QueryPostReactionsRequest) MarshalTo added in v0.17.0

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

func (*QueryPostReactionsRequest) MarshalToSizedBuffer added in v0.17.0

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

func (*QueryPostReactionsRequest) ProtoMessage added in v0.17.0

func (*QueryPostReactionsRequest) ProtoMessage()

func (*QueryPostReactionsRequest) Reset added in v0.17.0

func (m *QueryPostReactionsRequest) Reset()

func (*QueryPostReactionsRequest) Size added in v0.17.0

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

func (*QueryPostReactionsRequest) String added in v0.17.0

func (m *QueryPostReactionsRequest) String() string

func (*QueryPostReactionsRequest) Unmarshal added in v0.17.0

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

func (*QueryPostReactionsRequest) XXX_DiscardUnknown added in v0.17.0

func (m *QueryPostReactionsRequest) XXX_DiscardUnknown()

func (*QueryPostReactionsRequest) XXX_Marshal added in v0.17.0

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

func (*QueryPostReactionsRequest) XXX_Merge added in v0.17.0

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

func (*QueryPostReactionsRequest) XXX_Size added in v0.17.0

func (m *QueryPostReactionsRequest) XXX_Size() int

func (*QueryPostReactionsRequest) XXX_Unmarshal added in v0.17.0

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

type QueryPostReactionsResponse added in v0.17.0

type QueryPostReactionsResponse struct {
	Reactions  []PostReaction      `protobuf:"bytes,1,rep,name=reactions,proto3" json:"reactions"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPostReactionsResponse is the response type for the Query/PostReactions RPC method

func (*QueryPostReactionsResponse) Descriptor added in v0.17.0

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

func (*QueryPostReactionsResponse) GetPagination added in v0.17.0

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

func (*QueryPostReactionsResponse) GetReactions added in v0.17.0

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

func (*QueryPostReactionsResponse) Marshal added in v0.17.0

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

func (*QueryPostReactionsResponse) MarshalTo added in v0.17.0

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

func (*QueryPostReactionsResponse) MarshalToSizedBuffer added in v0.17.0

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

func (*QueryPostReactionsResponse) ProtoMessage added in v0.17.0

func (*QueryPostReactionsResponse) ProtoMessage()

func (*QueryPostReactionsResponse) Reset added in v0.17.0

func (m *QueryPostReactionsResponse) Reset()

func (*QueryPostReactionsResponse) Size added in v0.17.0

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

func (*QueryPostReactionsResponse) String added in v0.17.0

func (m *QueryPostReactionsResponse) String() string

func (*QueryPostReactionsResponse) Unmarshal added in v0.17.0

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

func (*QueryPostReactionsResponse) XXX_DiscardUnknown added in v0.17.0

func (m *QueryPostReactionsResponse) XXX_DiscardUnknown()

func (*QueryPostReactionsResponse) XXX_Marshal added in v0.17.0

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

func (*QueryPostReactionsResponse) XXX_Merge added in v0.17.0

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

func (*QueryPostReactionsResponse) XXX_Size added in v0.17.0

func (m *QueryPostReactionsResponse) XXX_Size() int

func (*QueryPostReactionsResponse) XXX_Unmarshal added in v0.17.0

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

type QueryPostRequest

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

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

func (*QueryPostRequest) Descriptor

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

func (*QueryPostRequest) Marshal

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

func (*QueryPostRequest) MarshalTo

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

func (*QueryPostRequest) MarshalToSizedBuffer

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

func (*QueryPostRequest) ProtoMessage

func (*QueryPostRequest) ProtoMessage()

func (*QueryPostRequest) Reset

func (m *QueryPostRequest) Reset()

func (*QueryPostRequest) Size

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

func (*QueryPostRequest) String

func (m *QueryPostRequest) String() string

func (*QueryPostRequest) Unmarshal

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

func (*QueryPostRequest) XXX_DiscardUnknown

func (m *QueryPostRequest) XXX_DiscardUnknown()

func (*QueryPostRequest) XXX_Marshal

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

func (*QueryPostRequest) XXX_Merge

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

func (*QueryPostRequest) XXX_Size

func (m *QueryPostRequest) XXX_Size() int

func (*QueryPostRequest) XXX_Unmarshal

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

type QueryPostResponse

type QueryPostResponse struct {
	Post Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post"`
}

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

func (*QueryPostResponse) Descriptor

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

func (*QueryPostResponse) GetPost

func (m *QueryPostResponse) GetPost() Post

func (*QueryPostResponse) Marshal

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

func (*QueryPostResponse) MarshalTo

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

func (*QueryPostResponse) MarshalToSizedBuffer

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

func (*QueryPostResponse) ProtoMessage

func (*QueryPostResponse) ProtoMessage()

func (*QueryPostResponse) Reset

func (m *QueryPostResponse) Reset()

func (*QueryPostResponse) Size

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

func (*QueryPostResponse) String

func (m *QueryPostResponse) String() string

func (*QueryPostResponse) Unmarshal

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

func (*QueryPostResponse) XXX_DiscardUnknown

func (m *QueryPostResponse) XXX_DiscardUnknown()

func (*QueryPostResponse) XXX_Marshal

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

func (*QueryPostResponse) XXX_Merge

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

func (*QueryPostResponse) XXX_Size

func (m *QueryPostResponse) XXX_Size() int

func (*QueryPostResponse) XXX_Unmarshal

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

type QueryPostsRequest

type QueryPostsRequest struct {
	// SubspaceId represents the ID of the subspace to which to query the posts
	// for. Providing an empty or invalid subspace id will return an error.
	SubspaceId string `protobuf:"bytes,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

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

func (*QueryPostsRequest) Descriptor

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

func (*QueryPostsRequest) GetPagination

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

func (*QueryPostsRequest) GetSubspaceId added in v0.17.0

func (m *QueryPostsRequest) GetSubspaceId() string

func (*QueryPostsRequest) Marshal

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

func (*QueryPostsRequest) MarshalTo

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

func (*QueryPostsRequest) MarshalToSizedBuffer

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

func (*QueryPostsRequest) ProtoMessage

func (*QueryPostsRequest) ProtoMessage()

func (*QueryPostsRequest) Reset

func (m *QueryPostsRequest) Reset()

func (*QueryPostsRequest) Size

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

func (*QueryPostsRequest) String

func (m *QueryPostsRequest) String() string

func (*QueryPostsRequest) Unmarshal

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

func (*QueryPostsRequest) XXX_DiscardUnknown

func (m *QueryPostsRequest) XXX_DiscardUnknown()

func (*QueryPostsRequest) XXX_Marshal

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

func (*QueryPostsRequest) XXX_Merge

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

func (*QueryPostsRequest) XXX_Size

func (m *QueryPostsRequest) XXX_Size() int

func (*QueryPostsRequest) XXX_Unmarshal

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

type QueryPostsResponse

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

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

func (*QueryPostsResponse) Descriptor

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

func (*QueryPostsResponse) GetPagination

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

func (*QueryPostsResponse) GetPosts

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

func (*QueryPostsResponse) Marshal

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

func (*QueryPostsResponse) MarshalTo

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

func (*QueryPostsResponse) MarshalToSizedBuffer

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

func (*QueryPostsResponse) ProtoMessage

func (*QueryPostsResponse) ProtoMessage()

func (*QueryPostsResponse) Reset

func (m *QueryPostsResponse) Reset()

func (*QueryPostsResponse) Size

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

func (*QueryPostsResponse) String

func (m *QueryPostsResponse) String() string

func (*QueryPostsResponse) Unmarshal

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

func (*QueryPostsResponse) XXX_DiscardUnknown

func (m *QueryPostsResponse) XXX_DiscardUnknown()

func (*QueryPostsResponse) XXX_Marshal

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

func (*QueryPostsResponse) XXX_Merge

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

func (*QueryPostsResponse) XXX_Size

func (m *QueryPostsResponse) XXX_Size() int

func (*QueryPostsResponse) XXX_Unmarshal

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

type QueryRegisteredReactionsRequest

type QueryRegisteredReactionsRequest struct {
	// subspace to query the registered reactions for
	SubspaceId string `protobuf:"bytes,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

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

func (*QueryRegisteredReactionsRequest) Descriptor

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

func (*QueryRegisteredReactionsRequest) GetPagination added in v0.17.0

func (*QueryRegisteredReactionsRequest) GetSubspaceId added in v0.17.0

func (m *QueryRegisteredReactionsRequest) GetSubspaceId() string

func (*QueryRegisteredReactionsRequest) Marshal

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

func (*QueryRegisteredReactionsRequest) MarshalTo

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

func (*QueryRegisteredReactionsRequest) MarshalToSizedBuffer

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

func (*QueryRegisteredReactionsRequest) ProtoMessage

func (*QueryRegisteredReactionsRequest) ProtoMessage()

func (*QueryRegisteredReactionsRequest) Reset

func (*QueryRegisteredReactionsRequest) Size

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

func (*QueryRegisteredReactionsRequest) String

func (*QueryRegisteredReactionsRequest) Unmarshal

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

func (*QueryRegisteredReactionsRequest) XXX_DiscardUnknown

func (m *QueryRegisteredReactionsRequest) XXX_DiscardUnknown()

func (*QueryRegisteredReactionsRequest) XXX_Marshal

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

func (*QueryRegisteredReactionsRequest) XXX_Merge

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

func (*QueryRegisteredReactionsRequest) XXX_Size

func (m *QueryRegisteredReactionsRequest) XXX_Size() int

func (*QueryRegisteredReactionsRequest) XXX_Unmarshal

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

type QueryRegisteredReactionsResponse

type QueryRegisteredReactionsResponse struct {
	Reactions  []RegisteredReaction `protobuf:"bytes,1,rep,name=reactions,proto3" json:"reactions"`
	Pagination *query.PageResponse  `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

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

func (*QueryRegisteredReactionsResponse) Descriptor

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

func (*QueryRegisteredReactionsResponse) GetPagination added in v0.17.0

func (*QueryRegisteredReactionsResponse) GetReactions added in v0.17.0

func (*QueryRegisteredReactionsResponse) Marshal

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

func (*QueryRegisteredReactionsResponse) MarshalTo

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

func (*QueryRegisteredReactionsResponse) MarshalToSizedBuffer

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

func (*QueryRegisteredReactionsResponse) ProtoMessage

func (*QueryRegisteredReactionsResponse) ProtoMessage()

func (*QueryRegisteredReactionsResponse) Reset

func (*QueryRegisteredReactionsResponse) Size

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

func (*QueryRegisteredReactionsResponse) String

func (*QueryRegisteredReactionsResponse) Unmarshal

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

func (*QueryRegisteredReactionsResponse) XXX_DiscardUnknown

func (m *QueryRegisteredReactionsResponse) XXX_DiscardUnknown()

func (*QueryRegisteredReactionsResponse) XXX_Marshal

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

func (*QueryRegisteredReactionsResponse) XXX_Merge

func (*QueryRegisteredReactionsResponse) XXX_Size

func (m *QueryRegisteredReactionsResponse) XXX_Size() int

func (*QueryRegisteredReactionsResponse) XXX_Unmarshal

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

type QueryReportsRequest added in v0.16.3

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

QueryReportsRequest is the request type for the Query/Reports RPC method.

func (*QueryReportsRequest) Descriptor added in v0.16.3

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

func (*QueryReportsRequest) Marshal added in v0.16.3

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

func (*QueryReportsRequest) MarshalTo added in v0.16.3

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

func (*QueryReportsRequest) MarshalToSizedBuffer added in v0.16.3

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

func (*QueryReportsRequest) ProtoMessage added in v0.16.3

func (*QueryReportsRequest) ProtoMessage()

func (*QueryReportsRequest) Reset added in v0.16.3

func (m *QueryReportsRequest) Reset()

func (*QueryReportsRequest) Size added in v0.16.3

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

func (*QueryReportsRequest) String added in v0.16.3

func (m *QueryReportsRequest) String() string

func (*QueryReportsRequest) Unmarshal added in v0.16.3

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

func (*QueryReportsRequest) XXX_DiscardUnknown added in v0.16.3

func (m *QueryReportsRequest) XXX_DiscardUnknown()

func (*QueryReportsRequest) XXX_Marshal added in v0.16.3

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

func (*QueryReportsRequest) XXX_Merge added in v0.16.3

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

func (*QueryReportsRequest) XXX_Size added in v0.16.3

func (m *QueryReportsRequest) XXX_Size() int

func (*QueryReportsRequest) XXX_Unmarshal added in v0.16.3

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

type QueryReportsResponse added in v0.16.3

type QueryReportsResponse struct {
	Reports []Report `protobuf:"bytes,1,rep,name=reports,proto3" json:"reports"`
}

QueryReportsResponse is the response type for the Query/Reports RPC method.

func (*QueryReportsResponse) Descriptor added in v0.16.3

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

func (*QueryReportsResponse) GetReports added in v0.16.3

func (m *QueryReportsResponse) GetReports() []Report

func (*QueryReportsResponse) Marshal added in v0.16.3

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

func (*QueryReportsResponse) MarshalTo added in v0.16.3

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

func (*QueryReportsResponse) MarshalToSizedBuffer added in v0.16.3

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

func (*QueryReportsResponse) ProtoMessage added in v0.16.3

func (*QueryReportsResponse) ProtoMessage()

func (*QueryReportsResponse) Reset added in v0.16.3

func (m *QueryReportsResponse) Reset()

func (*QueryReportsResponse) Size added in v0.16.3

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

func (*QueryReportsResponse) String added in v0.16.3

func (m *QueryReportsResponse) String() string

func (*QueryReportsResponse) Unmarshal added in v0.16.3

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

func (*QueryReportsResponse) XXX_DiscardUnknown added in v0.16.3

func (m *QueryReportsResponse) XXX_DiscardUnknown()

func (*QueryReportsResponse) XXX_Marshal added in v0.16.3

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

func (*QueryReportsResponse) XXX_Merge added in v0.16.3

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

func (*QueryReportsResponse) XXX_Size added in v0.16.3

func (m *QueryReportsResponse) XXX_Size() int

func (*QueryReportsResponse) XXX_Unmarshal added in v0.16.3

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

type QueryServer

type QueryServer interface {
	// Posts queries all the stored posts
	Posts(context.Context, *QueryPostsRequest) (*QueryPostsResponse, error)
	// Post queries a specific post
	Post(context.Context, *QueryPostRequest) (*QueryPostResponse, error)
	// Reports queries the reports for the post having the given id
	Reports(context.Context, *QueryReportsRequest) (*QueryReportsResponse, error)
	// UserAnswers queries the user answers of the post having a specific id
	UserAnswers(context.Context, *QueryUserAnswersRequest) (*QueryUserAnswersResponse, 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)
	// PostComments queries the comments of the post having the given id
	PostComments(context.Context, *QueryPostCommentsRequest) (*QueryPostCommentsResponse, error)
	// PostReactions queries all the reactions of the post having the given id
	PostReactions(context.Context, *QueryPostReactionsRequest) (*QueryPostReactionsResponse, error)
}

QueryServer is the server API for Query service.

type QueryUserAnswersRequest added in v0.17.0

type QueryUserAnswersRequest struct {
	PostId string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
	User   string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryUserAnswersRequest is the request type for the Query/UserAnswers RPC method.

func (*QueryUserAnswersRequest) Descriptor added in v0.17.0

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

func (*QueryUserAnswersRequest) Marshal added in v0.17.0

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

func (*QueryUserAnswersRequest) MarshalTo added in v0.17.0

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

func (*QueryUserAnswersRequest) MarshalToSizedBuffer added in v0.17.0

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

func (*QueryUserAnswersRequest) ProtoMessage added in v0.17.0

func (*QueryUserAnswersRequest) ProtoMessage()

func (*QueryUserAnswersRequest) Reset added in v0.17.0

func (m *QueryUserAnswersRequest) Reset()

func (*QueryUserAnswersRequest) Size added in v0.17.0

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

func (*QueryUserAnswersRequest) String added in v0.17.0

func (m *QueryUserAnswersRequest) String() string

func (*QueryUserAnswersRequest) Unmarshal added in v0.17.0

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

func (*QueryUserAnswersRequest) XXX_DiscardUnknown added in v0.17.0

func (m *QueryUserAnswersRequest) XXX_DiscardUnknown()

func (*QueryUserAnswersRequest) XXX_Marshal added in v0.17.0

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

func (*QueryUserAnswersRequest) XXX_Merge added in v0.17.0

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

func (*QueryUserAnswersRequest) XXX_Size added in v0.17.0

func (m *QueryUserAnswersRequest) XXX_Size() int

func (*QueryUserAnswersRequest) XXX_Unmarshal added in v0.17.0

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

type QueryUserAnswersResponse added in v0.17.0

type QueryUserAnswersResponse struct {
	Answers    []UserAnswer        `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryUserAnswersResponse is the response type for the Query/UserAnswers RPC method

func (*QueryUserAnswersResponse) Descriptor added in v0.17.0

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

func (*QueryUserAnswersResponse) GetAnswers added in v0.17.0

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

func (*QueryUserAnswersResponse) GetPagination added in v0.17.0

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

func (*QueryUserAnswersResponse) Marshal added in v0.17.0

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

func (*QueryUserAnswersResponse) MarshalTo added in v0.17.0

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

func (*QueryUserAnswersResponse) MarshalToSizedBuffer added in v0.17.0

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

func (*QueryUserAnswersResponse) ProtoMessage added in v0.17.0

func (*QueryUserAnswersResponse) ProtoMessage()

func (*QueryUserAnswersResponse) Reset added in v0.17.0

func (m *QueryUserAnswersResponse) Reset()

func (*QueryUserAnswersResponse) Size added in v0.17.0

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

func (*QueryUserAnswersResponse) String added in v0.17.0

func (m *QueryUserAnswersResponse) String() string

func (*QueryUserAnswersResponse) Unmarshal added in v0.17.0

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

func (*QueryUserAnswersResponse) XXX_DiscardUnknown added in v0.17.0

func (m *QueryUserAnswersResponse) XXX_DiscardUnknown()

func (*QueryUserAnswersResponse) XXX_Marshal added in v0.17.0

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

func (*QueryUserAnswersResponse) XXX_Merge added in v0.17.0

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

func (*QueryUserAnswersResponse) XXX_Size added in v0.17.0

func (m *QueryUserAnswersResponse) XXX_Size() int

func (*QueryUserAnswersResponse) XXX_Unmarshal added in v0.17.0

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

type RegisteredReaction

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

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

func MustUnmarshalRegisteredReaction added in v0.17.0

func MustUnmarshalRegisteredReaction(cdc codec.BinaryMarshaler, bz []byte) RegisteredReaction

MustUnmarshalRegisteredReaction deserializes the given byte array as a registered reaction using the provided BinaryMarshaler

func NewRegisteredReaction

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

NewRegisteredReaction returns a new RegisteredReaction

func (*RegisteredReaction) Descriptor

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

func (*RegisteredReaction) Equal

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

func (*RegisteredReaction) GetCreator

func (m *RegisteredReaction) GetCreator() string

func (*RegisteredReaction) GetShortCode

func (m *RegisteredReaction) GetShortCode() string

func (*RegisteredReaction) GetSubspace

func (m *RegisteredReaction) GetSubspace() string

func (*RegisteredReaction) GetValue

func (m *RegisteredReaction) GetValue() string

func (*RegisteredReaction) Marshal

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

func (*RegisteredReaction) MarshalTo

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

func (*RegisteredReaction) MarshalToSizedBuffer

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

func (*RegisteredReaction) ProtoMessage

func (*RegisteredReaction) ProtoMessage()

func (*RegisteredReaction) Reset

func (m *RegisteredReaction) Reset()

func (*RegisteredReaction) Size

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

func (*RegisteredReaction) String

func (m *RegisteredReaction) String() string

func (*RegisteredReaction) Unmarshal

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

func (RegisteredReaction) Validate

func (reaction RegisteredReaction) Validate() error

Validate implements validator

func (*RegisteredReaction) XXX_DiscardUnknown

func (m *RegisteredReaction) XXX_DiscardUnknown()

func (*RegisteredReaction) XXX_Marshal

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

func (*RegisteredReaction) XXX_Merge

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

func (*RegisteredReaction) XXX_Size

func (m *RegisteredReaction) XXX_Size() int

func (*RegisteredReaction) XXX_Unmarshal

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

type Report added in v0.16.3

type Report struct {
	// ID of the post for which the report has been created
	PostID string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id" yaml:"post_id"`
	// Identifies the type of the reports
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type" yaml:"type"`
	// User message
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message" yaml:"message"`
	// Identifies the reporting user
	User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user" yaml:"user"`
}

Report is the struct of a post's reports

func AppendIfMissing added in v0.16.3

func AppendIfMissing(reports []Report, report Report) (newSlice []Report, appended bool)

AppendIfMissing appends the given report to the provided reports slice if not already present. If appended, returns the new slice and true. If not appended, returns the original slice and false.

func MustUnmarshalReports added in v0.16.3

func MustUnmarshalReports(bz []byte, cdc codec.BinaryMarshaler) []Report

MustUnmarshalReports tries unmarshalling the given bz to a list of reports. Panics on error.

func NewReport added in v0.16.3

func NewReport(postID string, reportType string, message string, user string) Report

NewReport returns a Report

func (*Report) Descriptor added in v0.16.3

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

func (*Report) Equal added in v0.16.3

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

func (*Report) GetMessage added in v0.16.3

func (m *Report) GetMessage() string

func (*Report) GetPostID added in v0.16.3

func (m *Report) GetPostID() string

func (*Report) GetType added in v0.16.3

func (m *Report) GetType() string

func (*Report) GetUser added in v0.16.3

func (m *Report) GetUser() string

func (*Report) Marshal added in v0.16.3

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

func (*Report) MarshalTo added in v0.16.3

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

func (*Report) MarshalToSizedBuffer added in v0.16.3

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

func (*Report) ProtoMessage added in v0.16.3

func (*Report) ProtoMessage()

func (*Report) Reset added in v0.16.3

func (m *Report) Reset()

func (*Report) Size added in v0.16.3

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

func (*Report) String added in v0.16.3

func (m *Report) String() string

func (*Report) Unmarshal added in v0.16.3

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

func (Report) Validate added in v0.16.3

func (r Report) Validate() error

Validate implements validator

func (*Report) XXX_DiscardUnknown added in v0.16.3

func (m *Report) XXX_DiscardUnknown()

func (*Report) XXX_Marshal added in v0.16.3

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

func (*Report) XXX_Merge added in v0.16.3

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

func (*Report) XXX_Size added in v0.16.3

func (m *Report) XXX_Size() int

func (*Report) XXX_Unmarshal added in v0.16.3

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

type Reports added in v0.16.3

type Reports struct {
	Reports []Report `protobuf:"bytes,1,rep,name=reports,proto3" json:"reports"`
}

Reports wraps a list of Report objects

func (*Reports) Descriptor added in v0.16.3

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

func (*Reports) GetReports added in v0.16.3

func (m *Reports) GetReports() []Report

func (*Reports) Marshal added in v0.16.3

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

func (*Reports) MarshalTo added in v0.16.3

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

func (*Reports) MarshalToSizedBuffer added in v0.16.3

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

func (*Reports) ProtoMessage added in v0.16.3

func (*Reports) ProtoMessage()

func (*Reports) Reset added in v0.16.3

func (m *Reports) Reset()

func (*Reports) Size added in v0.16.3

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

func (*Reports) String added in v0.16.3

func (m *Reports) String() string

func (*Reports) Unmarshal added in v0.16.3

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

func (*Reports) XXX_DiscardUnknown added in v0.16.3

func (m *Reports) XXX_DiscardUnknown()

func (*Reports) XXX_Marshal added in v0.16.3

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

func (*Reports) XXX_Merge added in v0.16.3

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

func (*Reports) XXX_Size added in v0.16.3

func (m *Reports) XXX_Size() int

func (*Reports) XXX_Unmarshal added in v0.16.3

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AddPostReaction

func (*UnimplementedMsgServer) AnswerPoll

func (*UnimplementedMsgServer) CreatePost

func (*UnimplementedMsgServer) EditPost

func (*UnimplementedMsgServer) RegisterReaction

func (*UnimplementedMsgServer) RemovePostReaction

func (*UnimplementedMsgServer) ReportPost added in v0.16.3

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Post

func (*UnimplementedQueryServer) PostComments added in v0.17.0

func (*UnimplementedQueryServer) PostReactions added in v0.17.0

func (*UnimplementedQueryServer) Posts

func (*UnimplementedQueryServer) RegisteredReactions

func (*UnimplementedQueryServer) Reports added in v0.16.3

func (*UnimplementedQueryServer) UserAnswers added in v0.17.0

type UserAnswer

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

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

func MustUnmarshalUserAnswer added in v0.17.0

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

MustUnmarshalUserAnswer deserializes the given byte array as a user answer using the provided BinaryMarshaler

func NewUserAnswer

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

NewUserAnswer returns a new UserAnswer object containing the given poll

func (*UserAnswer) Descriptor

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

func (*UserAnswer) Equal

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

func (*UserAnswer) GetAnswers

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

func (*UserAnswer) GetPostID added in v0.17.0

func (m *UserAnswer) GetPostID() string

func (*UserAnswer) GetUser

func (m *UserAnswer) GetUser() string

func (*UserAnswer) Marshal

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

func (*UserAnswer) MarshalTo

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

func (*UserAnswer) MarshalToSizedBuffer

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

func (*UserAnswer) ProtoMessage

func (*UserAnswer) ProtoMessage()

func (*UserAnswer) Reset

func (m *UserAnswer) Reset()

func (*UserAnswer) Size

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

func (*UserAnswer) String

func (m *UserAnswer) String() string

func (*UserAnswer) Unmarshal

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

func (UserAnswer) Validate

func (ua UserAnswer) Validate() error

Validate implements validator

func (*UserAnswer) XXX_DiscardUnknown

func (m *UserAnswer) XXX_DiscardUnknown()

func (*UserAnswer) XXX_Marshal

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

func (*UserAnswer) XXX_Merge

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

func (*UserAnswer) XXX_Size

func (m *UserAnswer) XXX_Size() int

func (*UserAnswer) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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