v2

package
v4.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthModels        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModels          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupModels = fmt.Errorf("proto: unexpected end of group")
)
View Source
var PostReferenceType_name = map[int32]string{
	0: "POST_REFERENCE_TYPE_UNSPECIFIED",
	1: "POST_REFERENCE_TYPE_REPLY",
	2: "POST_REFERENCE_TYPE_QUOTE",
	3: "POST_REFERENCE_TYPE_REPOST",
}
View Source
var PostReferenceType_value = map[string]int32{
	"POST_REFERENCE_TYPE_UNSPECIFIED": 0,
	"POST_REFERENCE_TYPE_REPLY":       1,
	"POST_REFERENCE_TYPE_QUOTE":       2,
	"POST_REFERENCE_TYPE_REPOST":      3,
}
View Source
var ReplySetting_name = map[int32]string{
	0: "REPLY_SETTING_UNSPECIFIED",
	1: "REPLY_SETTING_EVERYONE",
	2: "REPLY_SETTING_FOLLOWERS",
	3: "REPLY_SETTING_MUTUAL",
	4: "REPLY_SETTING_MENTIONS",
}
View Source
var ReplySetting_value = map[string]int32{
	"REPLY_SETTING_UNSPECIFIED": 0,
	"REPLY_SETTING_EVERYONE":    1,
	"REPLY_SETTING_FOLLOWERS":   2,
	"REPLY_SETTING_MUTUAL":      3,
	"REPLY_SETTING_MENTIONS":    4,
}

Functions

func MigrateStore

func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, paramsSubspace paramstypes.Subspace, sk SubspacesKeeper) error

MigrateStore performs in-place store migrations from v1 to v2 The things done here are: 1. setting up the next post id key for existing subspaces 2. setting up the module parameters

func RegisterInterfaces added in v4.1.0

func RegisterInterfaces(registry types.InterfaceRegistry)

Types

type Attachment added in v4.1.0

type Attachment struct {
	// Id of the subspace inside which the post to which this attachment should be
	// connected is
	SubspaceID uint64 `protobuf:"varint,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
	// Id of the subspace section inside which the post to which this attachment
	// should be connected is
	SectionID uint32 `protobuf:"varint,2,opt,name=section_id,json=sectionId,proto3" json:"section_id,omitempty"`
	// Id of the post to which this attachment should be connected
	PostID uint64 `protobuf:"varint,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	// Id of this attachment
	ID uint32 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
	// Content of the attachment
	Content *types.Any `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
}

Attachment contains the data of a single post attachment

func (*Attachment) Descriptor added in v4.1.0

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

func (*Attachment) Equal added in v4.1.0

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

func (*Attachment) GetContent added in v4.1.0

func (m *Attachment) GetContent() *types.Any

func (*Attachment) GetID added in v4.1.0

func (m *Attachment) GetID() uint32

func (*Attachment) GetPostID added in v4.1.0

func (m *Attachment) GetPostID() uint64

func (*Attachment) GetSectionID added in v4.1.0

func (m *Attachment) GetSectionID() uint32

func (*Attachment) GetSubspaceID added in v4.1.0

func (m *Attachment) GetSubspaceID() uint64

func (*Attachment) Marshal added in v4.1.0

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

func (*Attachment) MarshalTo added in v4.1.0

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

func (*Attachment) MarshalToSizedBuffer added in v4.1.0

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

func (*Attachment) ProtoMessage added in v4.1.0

func (*Attachment) ProtoMessage()

func (*Attachment) Reset added in v4.1.0

func (m *Attachment) Reset()

func (*Attachment) Size added in v4.1.0

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

func (*Attachment) String added in v4.1.0

func (m *Attachment) String() string

func (*Attachment) Unmarshal added in v4.1.0

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

func (*Attachment) UnpackInterfaces added in v4.1.0

func (a *Attachment) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements codectypes.UnpackInterfacesMessage

func (*Attachment) XXX_DiscardUnknown added in v4.1.0

func (m *Attachment) XXX_DiscardUnknown()

func (*Attachment) XXX_Marshal added in v4.1.0

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

func (*Attachment) XXX_Merge added in v4.1.0

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

func (*Attachment) XXX_Size added in v4.1.0

func (m *Attachment) XXX_Size() int

func (*Attachment) XXX_Unmarshal added in v4.1.0

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

type AttachmentContent added in v4.1.0

type AttachmentContent interface{}

type Entities added in v4.1.0

type Entities struct {
	Hashtags []Tag `protobuf:"bytes,1,rep,name=hashtags,proto3" json:"hashtags"`
	Mentions []Tag `protobuf:"bytes,2,rep,name=mentions,proto3" json:"mentions"`
	Urls     []Url `protobuf:"bytes,3,rep,name=urls,proto3" json:"urls"`
}

Contains the details of entities parsed out of the post text

func NewEntities added in v4.1.0

func NewEntities(hashtags []Tag, mentions []Tag, urls []Url) *Entities

NewEntities returns a new Entities instance

func (*Entities) Descriptor added in v4.1.0

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

func (*Entities) Equal added in v4.1.0

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

func (*Entities) GetHashtags added in v4.1.0

func (m *Entities) GetHashtags() []Tag

func (*Entities) GetMentions added in v4.1.0

func (m *Entities) GetMentions() []Tag

func (*Entities) GetUrls added in v4.1.0

func (m *Entities) GetUrls() []Url

func (*Entities) Marshal added in v4.1.0

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

func (*Entities) MarshalTo added in v4.1.0

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

func (*Entities) MarshalToSizedBuffer added in v4.1.0

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

func (*Entities) ProtoMessage added in v4.1.0

func (*Entities) ProtoMessage()

func (*Entities) Reset added in v4.1.0

func (m *Entities) Reset()

func (*Entities) Size added in v4.1.0

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

func (*Entities) String added in v4.1.0

func (m *Entities) String() string

func (*Entities) Unmarshal added in v4.1.0

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

func (*Entities) XXX_DiscardUnknown added in v4.1.0

func (m *Entities) XXX_DiscardUnknown()

func (*Entities) XXX_Marshal added in v4.1.0

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

func (*Entities) XXX_Merge added in v4.1.0

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

func (*Entities) XXX_Size added in v4.1.0

func (m *Entities) XXX_Size() int

func (*Entities) XXX_Unmarshal added in v4.1.0

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

type Media added in v4.1.0

type Media struct {
	Uri      string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
	MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
}

Media represents a media attachment

func (*Media) Descriptor added in v4.1.0

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

func (*Media) Equal added in v4.1.0

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

func (*Media) GetMimeType added in v4.1.0

func (m *Media) GetMimeType() string

func (*Media) GetUri added in v4.1.0

func (m *Media) GetUri() string

func (*Media) Marshal added in v4.1.0

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

func (*Media) MarshalTo added in v4.1.0

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

func (*Media) MarshalToSizedBuffer added in v4.1.0

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

func (*Media) ProtoMessage added in v4.1.0

func (*Media) ProtoMessage()

func (*Media) Reset added in v4.1.0

func (m *Media) Reset()

func (*Media) Size added in v4.1.0

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

func (*Media) String added in v4.1.0

func (m *Media) String() string

func (*Media) Unmarshal added in v4.1.0

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

func (*Media) XXX_DiscardUnknown added in v4.1.0

func (m *Media) XXX_DiscardUnknown()

func (*Media) XXX_Marshal added in v4.1.0

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

func (*Media) XXX_Merge added in v4.1.0

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

func (*Media) XXX_Size added in v4.1.0

func (m *Media) XXX_Size() int

func (*Media) XXX_Unmarshal added in v4.1.0

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

type Params added in v4.1.0

type Params struct {
	// Maximum length of the post text
	MaxTextLength uint32 `protobuf:"varint,1,opt,name=max_text_length,json=maxTextLength,proto3" json:"max_text_length,omitempty"`
}

Params contains the parameters for the posts module

func (*Params) Descriptor added in v4.1.0

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

func (*Params) Equal added in v4.1.0

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

func (*Params) GetMaxTextLength added in v4.1.0

func (m *Params) GetMaxTextLength() uint32

func (*Params) Marshal added in v4.1.0

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

func (*Params) MarshalTo added in v4.1.0

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

func (*Params) MarshalToSizedBuffer added in v4.1.0

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

func (*Params) ProtoMessage added in v4.1.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v4.1.0

func (m *Params) Reset()

func (*Params) Size added in v4.1.0

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

func (*Params) String added in v4.1.0

func (m *Params) String() string

func (*Params) Unmarshal added in v4.1.0

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

func (*Params) XXX_DiscardUnknown added in v4.1.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v4.1.0

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

func (*Params) XXX_Merge added in v4.1.0

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

func (*Params) XXX_Size added in v4.1.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v4.1.0

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

type Poll added in v4.1.0

type Poll struct {
	// Question of the poll
	Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"`
	// Answers the users can choose from
	ProvidedAnswers []Poll_ProvidedAnswer `protobuf:"bytes,2,rep,name=provided_answers,json=providedAnswers,proto3" json:"provided_answers"`
	// Date at which the poll will close
	EndDate time.Time `protobuf:"bytes,3,opt,name=end_date,json=endDate,proto3,stdtime" json:"end_date"`
	// Whether the poll allows multiple choices from the same user or not
	AllowsMultipleAnswers bool `` /* 127-byte string literal not displayed */
	// Whether the poll allows to edit an answer or not
	AllowsAnswerEdits bool `protobuf:"varint,5,opt,name=allows_answer_edits,json=allowsAnswerEdits,proto3" json:"allows_answer_edits,omitempty"`
	// Final poll results
	FinalTallyResults *PollTallyResults `protobuf:"bytes,6,opt,name=final_tally_results,json=finalTallyResults,proto3" json:"final_tally_results,omitempty"`
}

Poll represents a poll attachment

func (*Poll) Descriptor added in v4.1.0

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

func (*Poll) Equal added in v4.1.0

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

func (*Poll) GetAllowsAnswerEdits added in v4.1.0

func (m *Poll) GetAllowsAnswerEdits() bool

func (*Poll) GetAllowsMultipleAnswers added in v4.1.0

func (m *Poll) GetAllowsMultipleAnswers() bool

func (*Poll) GetEndDate added in v4.1.0

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

func (*Poll) GetFinalTallyResults added in v4.1.0

func (m *Poll) GetFinalTallyResults() *PollTallyResults

func (*Poll) GetProvidedAnswers added in v4.1.0

func (m *Poll) GetProvidedAnswers() []Poll_ProvidedAnswer

func (*Poll) GetQuestion added in v4.1.0

func (m *Poll) GetQuestion() string

func (*Poll) Marshal added in v4.1.0

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

func (*Poll) MarshalTo added in v4.1.0

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

func (*Poll) MarshalToSizedBuffer added in v4.1.0

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

func (*Poll) ProtoMessage added in v4.1.0

func (*Poll) ProtoMessage()

func (*Poll) Reset added in v4.1.0

func (m *Poll) Reset()

func (*Poll) Size added in v4.1.0

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

func (*Poll) String added in v4.1.0

func (m *Poll) String() string

func (*Poll) Unmarshal added in v4.1.0

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

func (*Poll) XXX_DiscardUnknown added in v4.1.0

func (m *Poll) XXX_DiscardUnknown()

func (*Poll) XXX_Marshal added in v4.1.0

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

func (*Poll) XXX_Merge added in v4.1.0

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

func (*Poll) XXX_Size added in v4.1.0

func (m *Poll) XXX_Size() int

func (*Poll) XXX_Unmarshal added in v4.1.0

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

type PollTallyResults added in v4.1.0

type PollTallyResults struct {
	Results []PollTallyResults_AnswerResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results"`
}

PollTallyResults contains the tally results for a poll

func (*PollTallyResults) Descriptor added in v4.1.0

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

func (*PollTallyResults) Equal added in v4.1.0

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

func (*PollTallyResults) GetResults added in v4.1.0

func (*PollTallyResults) Marshal added in v4.1.0

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

func (*PollTallyResults) MarshalTo added in v4.1.0

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

func (*PollTallyResults) MarshalToSizedBuffer added in v4.1.0

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

func (*PollTallyResults) ProtoMessage added in v4.1.0

func (*PollTallyResults) ProtoMessage()

func (*PollTallyResults) Reset added in v4.1.0

func (m *PollTallyResults) Reset()

func (*PollTallyResults) Size added in v4.1.0

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

func (*PollTallyResults) String added in v4.1.0

func (m *PollTallyResults) String() string

func (*PollTallyResults) Unmarshal added in v4.1.0

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

func (*PollTallyResults) XXX_DiscardUnknown added in v4.1.0

func (m *PollTallyResults) XXX_DiscardUnknown()

func (*PollTallyResults) XXX_Marshal added in v4.1.0

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

func (*PollTallyResults) XXX_Merge added in v4.1.0

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

func (*PollTallyResults) XXX_Size added in v4.1.0

func (m *PollTallyResults) XXX_Size() int

func (*PollTallyResults) XXX_Unmarshal added in v4.1.0

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

type PollTallyResults_AnswerResult added in v4.1.0

type PollTallyResults_AnswerResult struct {
	// Index of the answer inside the poll's ProvidedAnswers slice
	AnswerIndex uint32 `protobuf:"varint,1,opt,name=answer_index,json=answerIndex,proto3" json:"answer_index,omitempty"`
	// Number of votes the answer has received
	Votes uint64 `protobuf:"varint,2,opt,name=votes,proto3" json:"votes,omitempty"`
}

AnswerResult contains the result of a single poll provided answer

func (*PollTallyResults_AnswerResult) Descriptor added in v4.1.0

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

func (*PollTallyResults_AnswerResult) Equal added in v4.1.0

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

func (*PollTallyResults_AnswerResult) GetAnswerIndex added in v4.1.0

func (m *PollTallyResults_AnswerResult) GetAnswerIndex() uint32

func (*PollTallyResults_AnswerResult) GetVotes added in v4.1.0

func (m *PollTallyResults_AnswerResult) GetVotes() uint64

func (*PollTallyResults_AnswerResult) Marshal added in v4.1.0

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

func (*PollTallyResults_AnswerResult) MarshalTo added in v4.1.0

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

func (*PollTallyResults_AnswerResult) MarshalToSizedBuffer added in v4.1.0

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

func (*PollTallyResults_AnswerResult) ProtoMessage added in v4.1.0

func (*PollTallyResults_AnswerResult) ProtoMessage()

func (*PollTallyResults_AnswerResult) Reset added in v4.1.0

func (m *PollTallyResults_AnswerResult) Reset()

func (*PollTallyResults_AnswerResult) Size added in v4.1.0

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

func (*PollTallyResults_AnswerResult) String added in v4.1.0

func (*PollTallyResults_AnswerResult) Unmarshal added in v4.1.0

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

func (*PollTallyResults_AnswerResult) XXX_DiscardUnknown added in v4.1.0

func (m *PollTallyResults_AnswerResult) XXX_DiscardUnknown()

func (*PollTallyResults_AnswerResult) XXX_Marshal added in v4.1.0

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

func (*PollTallyResults_AnswerResult) XXX_Merge added in v4.1.0

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

func (*PollTallyResults_AnswerResult) XXX_Size added in v4.1.0

func (m *PollTallyResults_AnswerResult) XXX_Size() int

func (*PollTallyResults_AnswerResult) XXX_Unmarshal added in v4.1.0

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

type Poll_ProvidedAnswer added in v4.1.0

type Poll_ProvidedAnswer struct {
	// (optional) Text of the answer
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// Attachments of the answer
	Attachments []Attachment `protobuf:"bytes,2,rep,name=attachments,proto3" json:"attachments"`
}

Provided answer contains the details of a possible poll answer

func (*Poll_ProvidedAnswer) Descriptor added in v4.1.0

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

func (*Poll_ProvidedAnswer) Equal added in v4.1.0

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

func (*Poll_ProvidedAnswer) GetAttachments added in v4.1.0

func (m *Poll_ProvidedAnswer) GetAttachments() []Attachment

func (*Poll_ProvidedAnswer) GetText added in v4.1.0

func (m *Poll_ProvidedAnswer) GetText() string

func (*Poll_ProvidedAnswer) Marshal added in v4.1.0

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

func (*Poll_ProvidedAnswer) MarshalTo added in v4.1.0

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

func (*Poll_ProvidedAnswer) MarshalToSizedBuffer added in v4.1.0

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

func (*Poll_ProvidedAnswer) ProtoMessage added in v4.1.0

func (*Poll_ProvidedAnswer) ProtoMessage()

func (*Poll_ProvidedAnswer) Reset added in v4.1.0

func (m *Poll_ProvidedAnswer) Reset()

func (*Poll_ProvidedAnswer) Size added in v4.1.0

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

func (*Poll_ProvidedAnswer) String added in v4.1.0

func (m *Poll_ProvidedAnswer) String() string

func (*Poll_ProvidedAnswer) Unmarshal added in v4.1.0

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

func (*Poll_ProvidedAnswer) XXX_DiscardUnknown added in v4.1.0

func (m *Poll_ProvidedAnswer) XXX_DiscardUnknown()

func (*Poll_ProvidedAnswer) XXX_Marshal added in v4.1.0

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

func (*Poll_ProvidedAnswer) XXX_Merge added in v4.1.0

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

func (*Poll_ProvidedAnswer) XXX_Size added in v4.1.0

func (m *Poll_ProvidedAnswer) XXX_Size() int

func (*Poll_ProvidedAnswer) XXX_Unmarshal added in v4.1.0

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

type Post added in v4.1.0

type Post struct {
	// Id of the subspace inside which the post has been created
	SubspaceID uint64 `protobuf:"varint,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
	// Id of the section inside which the post has been created
	SectionID uint32 `protobuf:"varint,2,opt,name=section_id,json=sectionId,proto3" json:"section_id,omitempty"`
	// Unique id of the post
	ID uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
	// (optional) External id for this post
	ExternalID string `protobuf:"bytes,4,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
	// (optional) Text of the post
	Text string `protobuf:"bytes,5,opt,name=text,proto3" json:"text,omitempty"`
	// (optional) Entities connected to this post
	Entities *Entities `protobuf:"bytes,6,opt,name=entities,proto3" json:"entities,omitempty"`
	// Author of the post
	Author string `protobuf:"bytes,7,opt,name=author,proto3" json:"author,omitempty"`
	// (optional) Id of the original post of the conversation
	ConversationID uint64 `protobuf:"varint,8,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"`
	// A list this posts references (either as a reply, repost or quote)
	ReferencedPosts []PostReference `protobuf:"bytes,9,rep,name=referenced_posts,json=referencedPosts,proto3" json:"referenced_posts"`
	// Reply settings of this post
	ReplySettings ReplySetting `` /* 136-byte string literal not displayed */
	// Creation date of the post
	CreationDate time.Time `protobuf:"bytes,11,opt,name=creation_date,json=creationDate,proto3,stdtime" json:"creation_date"`
	// (optional) Last edited time of the post
	LastEditedDate *time.Time `protobuf:"bytes,12,opt,name=last_edited_date,json=lastEditedDate,proto3,stdtime" json:"last_edited_date,omitempty"`
}

Post contains all the information about a single post

func NewPost added in v4.1.0

func NewPost(
	subspaceID uint64,
	sectionID uint32,
	id uint64,
	externalID string,
	text string,
	author string,
	conversationID uint64,
	entities *Entities,
	referencedPosts []PostReference,
	replySetting ReplySetting,
	creationDate time.Time,
	lastEditedDate *time.Time,
) Post

NewPost allows to build a new Post instance

func (*Post) Descriptor added in v4.1.0

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

func (*Post) Equal added in v4.1.0

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

func (*Post) GetAuthor added in v4.1.0

func (m *Post) GetAuthor() string

func (*Post) GetConversationID added in v4.1.0

func (m *Post) GetConversationID() uint64

func (*Post) GetCreationDate added in v4.1.0

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

func (*Post) GetEntities added in v4.1.0

func (m *Post) GetEntities() *Entities

func (*Post) GetExternalID added in v4.1.0

func (m *Post) GetExternalID() string

func (*Post) GetID added in v4.1.0

func (m *Post) GetID() uint64

func (*Post) GetLastEditedDate added in v4.1.0

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

func (*Post) GetReferencedPosts added in v4.1.0

func (m *Post) GetReferencedPosts() []PostReference

func (*Post) GetReplySettings added in v4.1.0

func (m *Post) GetReplySettings() ReplySetting

func (*Post) GetSectionID added in v4.1.0

func (m *Post) GetSectionID() uint32

func (*Post) GetSubspaceID added in v4.1.0

func (m *Post) GetSubspaceID() uint64

func (*Post) GetText added in v4.1.0

func (m *Post) GetText() string

func (*Post) Marshal added in v4.1.0

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

func (*Post) MarshalTo added in v4.1.0

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

func (*Post) MarshalToSizedBuffer added in v4.1.0

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

func (*Post) ProtoMessage added in v4.1.0

func (*Post) ProtoMessage()

func (*Post) Reset added in v4.1.0

func (m *Post) Reset()

func (*Post) Size added in v4.1.0

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

func (*Post) String added in v4.1.0

func (m *Post) String() string

func (*Post) Unmarshal added in v4.1.0

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

func (*Post) XXX_DiscardUnknown added in v4.1.0

func (m *Post) XXX_DiscardUnknown()

func (*Post) XXX_Marshal added in v4.1.0

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

func (*Post) XXX_Merge added in v4.1.0

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

func (*Post) XXX_Size added in v4.1.0

func (m *Post) XXX_Size() int

func (*Post) XXX_Unmarshal added in v4.1.0

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

type PostReference added in v4.1.0

type PostReference struct {
	// Type of reference
	Type PostReferenceType `protobuf:"varint,1,opt,name=type,proto3,enum=desmos.posts.v1.PostReferenceType" json:"type,omitempty"`
	// Id of the referenced post
	PostID uint64 `protobuf:"varint,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	// Position of the reference inside the post's text. This should be used only
	// with the type set to TYPE_QUOTE
	Position uint64 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"`
}

PostReference contains the details of a post reference

func NewPostReference added in v4.1.0

func NewPostReference(referenceType PostReferenceType, postID uint64, position uint64) PostReference

NewPostReference returns a new PostReference instance

func (*PostReference) Descriptor added in v4.1.0

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

func (*PostReference) Equal added in v4.1.0

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

func (*PostReference) GetPosition added in v4.1.0

func (m *PostReference) GetPosition() uint64

func (*PostReference) GetPostID added in v4.1.0

func (m *PostReference) GetPostID() uint64

func (*PostReference) GetType added in v4.1.0

func (m *PostReference) GetType() PostReferenceType

func (*PostReference) Marshal added in v4.1.0

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

func (*PostReference) MarshalTo added in v4.1.0

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

func (*PostReference) MarshalToSizedBuffer added in v4.1.0

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

func (*PostReference) ProtoMessage added in v4.1.0

func (*PostReference) ProtoMessage()

func (*PostReference) Reset added in v4.1.0

func (m *PostReference) Reset()

func (*PostReference) Size added in v4.1.0

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

func (*PostReference) String added in v4.1.0

func (m *PostReference) String() string

func (*PostReference) Unmarshal added in v4.1.0

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

func (*PostReference) XXX_DiscardUnknown added in v4.1.0

func (m *PostReference) XXX_DiscardUnknown()

func (*PostReference) XXX_Marshal added in v4.1.0

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

func (*PostReference) XXX_Merge added in v4.1.0

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

func (*PostReference) XXX_Size added in v4.1.0

func (m *PostReference) XXX_Size() int

func (*PostReference) XXX_Unmarshal added in v4.1.0

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

type PostReferenceType added in v4.1.0

type PostReferenceType int32

PostReferenceType represents the different types of references

const (
	// No reference specified
	POST_REFERENCE_TYPE_UNSPECIFIED PostReferenceType = 0
	// This reference represents a reply to the specified post
	POST_REFERENCE_TYPE_REPLY PostReferenceType = 1
	// This reference represents a quote of the specified post
	POST_REFERENCE_TYPE_QUOTE PostReferenceType = 2
	// This reference represents a repost of the specified post
	POST_REFERENCE_TYPE_REPOST PostReferenceType = 3
)

func (PostReferenceType) EnumDescriptor added in v4.1.0

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

func (PostReferenceType) String added in v4.1.0

func (x PostReferenceType) String() string

type ReplySetting added in v4.1.0

type ReplySetting int32

ReplySetting contains the possible reply settings that a post can have

const (
	// No reply setting specified
	REPLY_SETTING_UNSPECIFIED ReplySetting = 0
	// Everyone will be able to reply to this post
	REPLY_SETTING_EVERYONE ReplySetting = 1
	// Only followers of the author will be able to reply to this post
	REPLY_SETTING_FOLLOWERS ReplySetting = 2
	// Only the author mutual followers will be able to reply to this post
	REPLY_SETTING_MUTUAL ReplySetting = 3
	// Only people mentioned inside this post will be able to reply
	REPLY_SETTING_MENTIONS ReplySetting = 4
)

func (ReplySetting) EnumDescriptor added in v4.1.0

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

func (ReplySetting) String added in v4.1.0

func (x ReplySetting) String() string

type SubspacesKeeper

type SubspacesKeeper interface {
	IterateSubspaces(ctx sdk.Context, fn func(subspaces subspacestypes.Subspace) (stop bool))
}

type Tag added in v4.1.0

type Tag struct {
	// Index of the character inside the text at which the tag starts
	Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
	// Index of the character inside the text at which the tag ends
	End uint64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
	// Tag reference (user address, hashtag value, etc)
	Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
}

Tag represents a generic tag

func NewTag added in v4.1.0

func NewTag(start, end uint64, tag string) Tag

NewTag returns a new Tag instance

func (*Tag) Descriptor added in v4.1.0

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

func (*Tag) Equal added in v4.1.0

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

func (*Tag) GetEnd added in v4.1.0

func (m *Tag) GetEnd() uint64

func (*Tag) GetStart added in v4.1.0

func (m *Tag) GetStart() uint64

func (*Tag) GetTag added in v4.1.0

func (m *Tag) GetTag() string

func (*Tag) Marshal added in v4.1.0

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

func (*Tag) MarshalTo added in v4.1.0

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

func (*Tag) MarshalToSizedBuffer added in v4.1.0

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

func (*Tag) ProtoMessage added in v4.1.0

func (*Tag) ProtoMessage()

func (*Tag) Reset added in v4.1.0

func (m *Tag) Reset()

func (*Tag) Size added in v4.1.0

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

func (*Tag) String added in v4.1.0

func (m *Tag) String() string

func (*Tag) Unmarshal added in v4.1.0

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

func (*Tag) XXX_DiscardUnknown added in v4.1.0

func (m *Tag) XXX_DiscardUnknown()

func (*Tag) XXX_Marshal added in v4.1.0

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

func (*Tag) XXX_Merge added in v4.1.0

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

func (*Tag) XXX_Size added in v4.1.0

func (m *Tag) XXX_Size() int

func (*Tag) XXX_Unmarshal added in v4.1.0

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

type Url added in v4.1.0

type Url struct {
	// Index of the character inside the text at which the URL starts
	Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
	// Index of the character inside the text at which the URL ends
	End uint64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
	// Value of the URL where the user should be redirected to
	Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	// (optional) Display value of the URL
	DisplayUrl string `protobuf:"bytes,4,opt,name=display_url,json=displayUrl,proto3" json:"display_url,omitempty"`
}

Url contains the details of a generic URL

func NewURL added in v4.1.0

func NewURL(start, end uint64, url, displayURL string) Url

NewURL returns a new Url instance

func (*Url) Descriptor added in v4.1.0

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

func (*Url) Equal added in v4.1.0

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

func (*Url) GetDisplayUrl added in v4.1.0

func (m *Url) GetDisplayUrl() string

func (*Url) GetEnd added in v4.1.0

func (m *Url) GetEnd() uint64

func (*Url) GetStart added in v4.1.0

func (m *Url) GetStart() uint64

func (*Url) GetUrl added in v4.1.0

func (m *Url) GetUrl() string

func (*Url) Marshal added in v4.1.0

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

func (*Url) MarshalTo added in v4.1.0

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

func (*Url) MarshalToSizedBuffer added in v4.1.0

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

func (*Url) ProtoMessage added in v4.1.0

func (*Url) ProtoMessage()

func (*Url) Reset added in v4.1.0

func (m *Url) Reset()

func (*Url) Size added in v4.1.0

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

func (*Url) String added in v4.1.0

func (m *Url) String() string

func (*Url) Unmarshal added in v4.1.0

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

func (*Url) XXX_DiscardUnknown added in v4.1.0

func (m *Url) XXX_DiscardUnknown()

func (*Url) XXX_Marshal added in v4.1.0

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

func (*Url) XXX_Merge added in v4.1.0

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

func (*Url) XXX_Size added in v4.1.0

func (m *Url) XXX_Size() int

func (*Url) XXX_Unmarshal added in v4.1.0

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

type UserAnswer added in v4.1.0

type UserAnswer struct {
	// Subspace id inside which the post related to this attachment is located
	SubspaceID uint64 `protobuf:"varint,1,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"`
	// Section id inside which the post related to this attachment is located
	SectionID uint32 `protobuf:"varint,2,opt,name=section_id,json=sectionId,proto3" json:"section_id,omitempty"`
	// Id of the post associated to this attachment
	PostID uint64 `protobuf:"varint,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	// Id of the poll to which this answer is associated
	PollID uint32 `protobuf:"varint,4,opt,name=poll_id,json=pollId,proto3" json:"poll_id,omitempty"`
	// Indexes of the answers inside the ProvidedAnswers array
	AnswersIndexes []uint32 `protobuf:"varint,5,rep,packed,name=answers_indexes,json=answersIndexes,proto3" json:"answers_indexes,omitempty"`
	// Address of the user answering the poll
	User string `protobuf:"bytes,6,opt,name=user,proto3" json:"user,omitempty"`
}

UserAnswer represents a user answer to a poll

func (*UserAnswer) Descriptor added in v4.1.0

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

func (*UserAnswer) Equal added in v4.1.0

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

func (*UserAnswer) GetAnswersIndexes added in v4.1.0

func (m *UserAnswer) GetAnswersIndexes() []uint32

func (*UserAnswer) GetPollID added in v4.1.0

func (m *UserAnswer) GetPollID() uint32

func (*UserAnswer) GetPostID added in v4.1.0

func (m *UserAnswer) GetPostID() uint64

func (*UserAnswer) GetSectionID added in v4.1.0

func (m *UserAnswer) GetSectionID() uint32

func (*UserAnswer) GetSubspaceID added in v4.1.0

func (m *UserAnswer) GetSubspaceID() uint64

func (*UserAnswer) GetUser added in v4.1.0

func (m *UserAnswer) GetUser() string

func (*UserAnswer) Marshal added in v4.1.0

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

func (*UserAnswer) MarshalTo added in v4.1.0

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

func (*UserAnswer) MarshalToSizedBuffer added in v4.1.0

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

func (*UserAnswer) ProtoMessage added in v4.1.0

func (*UserAnswer) ProtoMessage()

func (*UserAnswer) Reset added in v4.1.0

func (m *UserAnswer) Reset()

func (*UserAnswer) Size added in v4.1.0

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

func (*UserAnswer) String added in v4.1.0

func (m *UserAnswer) String() string

func (*UserAnswer) Unmarshal added in v4.1.0

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

func (*UserAnswer) XXX_DiscardUnknown added in v4.1.0

func (m *UserAnswer) XXX_DiscardUnknown()

func (*UserAnswer) XXX_Marshal added in v4.1.0

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

func (*UserAnswer) XXX_Merge added in v4.1.0

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

func (*UserAnswer) XXX_Size added in v4.1.0

func (m *UserAnswer) XXX_Size() int

func (*UserAnswer) XXX_Unmarshal added in v4.1.0

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