v2

package
v0.0.0-...-0943177 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 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

func RegisterInterfaces(registry types.InterfaceRegistry)

Types

type Attachment

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

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

func (*Attachment) Equal

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

func (*Attachment) GetContent

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

func (*Attachment) GetID

func (m *Attachment) GetID() uint32

func (*Attachment) GetPostID

func (m *Attachment) GetPostID() uint64

func (*Attachment) GetSectionID

func (m *Attachment) GetSectionID() uint32

func (*Attachment) GetSubspaceID

func (m *Attachment) GetSubspaceID() uint64

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

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

UnpackInterfaces implements codectypes.UnpackInterfacesMessage

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 AttachmentContent

type AttachmentContent interface{}

type Entities

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

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

NewEntities returns a new Entities instance

func (*Entities) Descriptor

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

func (*Entities) Equal

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

func (*Entities) GetHashtags

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

func (*Entities) GetMentions

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

func (*Entities) GetUrls

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

func (*Entities) Marshal

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

func (*Entities) MarshalTo

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

func (*Entities) MarshalToSizedBuffer

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

func (*Entities) ProtoMessage

func (*Entities) ProtoMessage()

func (*Entities) Reset

func (m *Entities) Reset()

func (*Entities) Size

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

func (*Entities) String

func (m *Entities) String() string

func (*Entities) Unmarshal

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

func (*Entities) XXX_DiscardUnknown

func (m *Entities) XXX_DiscardUnknown()

func (*Entities) XXX_Marshal

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

func (*Entities) XXX_Merge

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

func (*Entities) XXX_Size

func (m *Entities) XXX_Size() int

func (*Entities) XXX_Unmarshal

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

type Media

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

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

func (*Media) Equal

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

func (*Media) GetMimeType

func (m *Media) GetMimeType() string

func (*Media) GetUri

func (m *Media) GetUri() string

func (*Media) Marshal

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

func (*Media) MarshalTo

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

func (*Media) MarshalToSizedBuffer

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

func (*Media) ProtoMessage

func (*Media) ProtoMessage()

func (*Media) Reset

func (m *Media) Reset()

func (*Media) Size

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

func (*Media) String

func (m *Media) String() string

func (*Media) Unmarshal

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

func (*Media) XXX_DiscardUnknown

func (m *Media) XXX_DiscardUnknown()

func (*Media) XXX_Marshal

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

func (*Media) XXX_Merge

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

func (*Media) XXX_Size

func (m *Media) XXX_Size() int

func (*Media) XXX_Unmarshal

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

type Params

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

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

func (*Params) Equal

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

func (*Params) GetMaxTextLength

func (m *Params) GetMaxTextLength() uint32

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

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

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

func (*Poll) Equal

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

func (*Poll) GetAllowsAnswerEdits

func (m *Poll) GetAllowsAnswerEdits() bool

func (*Poll) GetAllowsMultipleAnswers

func (m *Poll) GetAllowsMultipleAnswers() bool

func (*Poll) GetEndDate

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

func (*Poll) GetFinalTallyResults

func (m *Poll) GetFinalTallyResults() *PollTallyResults

func (*Poll) GetProvidedAnswers

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

func (*Poll) GetQuestion

func (m *Poll) GetQuestion() string

func (*Poll) Marshal

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

func (*Poll) MarshalTo

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

func (*Poll) MarshalToSizedBuffer

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

func (*Poll) ProtoMessage

func (*Poll) ProtoMessage()

func (*Poll) Reset

func (m *Poll) Reset()

func (*Poll) Size

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

func (*Poll) String

func (m *Poll) String() string

func (*Poll) Unmarshal

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

func (*Poll) XXX_DiscardUnknown

func (m *Poll) XXX_DiscardUnknown()

func (*Poll) XXX_Marshal

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

func (*Poll) XXX_Merge

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

func (*Poll) XXX_Size

func (m *Poll) XXX_Size() int

func (*Poll) XXX_Unmarshal

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

type PollTallyResults

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

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

func (*PollTallyResults) Equal

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

func (*PollTallyResults) GetResults

func (*PollTallyResults) Marshal

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

func (*PollTallyResults) MarshalTo

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

func (*PollTallyResults) MarshalToSizedBuffer

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

func (*PollTallyResults) ProtoMessage

func (*PollTallyResults) ProtoMessage()

func (*PollTallyResults) Reset

func (m *PollTallyResults) Reset()

func (*PollTallyResults) Size

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

func (*PollTallyResults) String

func (m *PollTallyResults) String() string

func (*PollTallyResults) Unmarshal

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

func (*PollTallyResults) XXX_DiscardUnknown

func (m *PollTallyResults) XXX_DiscardUnknown()

func (*PollTallyResults) XXX_Marshal

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

func (*PollTallyResults) XXX_Merge

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

func (*PollTallyResults) XXX_Size

func (m *PollTallyResults) XXX_Size() int

func (*PollTallyResults) XXX_Unmarshal

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

type PollTallyResults_AnswerResult

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

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

func (*PollTallyResults_AnswerResult) Equal

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

func (*PollTallyResults_AnswerResult) GetAnswerIndex

func (m *PollTallyResults_AnswerResult) GetAnswerIndex() uint32

func (*PollTallyResults_AnswerResult) GetVotes

func (m *PollTallyResults_AnswerResult) GetVotes() uint64

func (*PollTallyResults_AnswerResult) Marshal

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

func (*PollTallyResults_AnswerResult) MarshalTo

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

func (*PollTallyResults_AnswerResult) MarshalToSizedBuffer

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

func (*PollTallyResults_AnswerResult) ProtoMessage

func (*PollTallyResults_AnswerResult) ProtoMessage()

func (*PollTallyResults_AnswerResult) Reset

func (m *PollTallyResults_AnswerResult) Reset()

func (*PollTallyResults_AnswerResult) Size

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

func (*PollTallyResults_AnswerResult) String

func (*PollTallyResults_AnswerResult) Unmarshal

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

func (*PollTallyResults_AnswerResult) XXX_DiscardUnknown

func (m *PollTallyResults_AnswerResult) XXX_DiscardUnknown()

func (*PollTallyResults_AnswerResult) XXX_Marshal

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

func (*PollTallyResults_AnswerResult) XXX_Merge

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

func (*PollTallyResults_AnswerResult) XXX_Size

func (m *PollTallyResults_AnswerResult) XXX_Size() int

func (*PollTallyResults_AnswerResult) XXX_Unmarshal

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

type Poll_ProvidedAnswer

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

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

func (*Poll_ProvidedAnswer) Equal

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

func (*Poll_ProvidedAnswer) GetAttachments

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

func (*Poll_ProvidedAnswer) GetText

func (m *Poll_ProvidedAnswer) GetText() string

func (*Poll_ProvidedAnswer) Marshal

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

func (*Poll_ProvidedAnswer) MarshalTo

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

func (*Poll_ProvidedAnswer) MarshalToSizedBuffer

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

func (*Poll_ProvidedAnswer) ProtoMessage

func (*Poll_ProvidedAnswer) ProtoMessage()

func (*Poll_ProvidedAnswer) Reset

func (m *Poll_ProvidedAnswer) Reset()

func (*Poll_ProvidedAnswer) Size

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

func (*Poll_ProvidedAnswer) String

func (m *Poll_ProvidedAnswer) String() string

func (*Poll_ProvidedAnswer) Unmarshal

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

func (*Poll_ProvidedAnswer) XXX_DiscardUnknown

func (m *Poll_ProvidedAnswer) XXX_DiscardUnknown()

func (*Poll_ProvidedAnswer) XXX_Marshal

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

func (*Poll_ProvidedAnswer) XXX_Merge

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

func (*Poll_ProvidedAnswer) XXX_Size

func (m *Poll_ProvidedAnswer) XXX_Size() int

func (*Poll_ProvidedAnswer) XXX_Unmarshal

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

type Post

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 `` /* 134-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

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

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

func (*Post) Equal

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

func (*Post) GetAuthor

func (m *Post) GetAuthor() string

func (*Post) GetConversationID

func (m *Post) GetConversationID() uint64

func (*Post) GetCreationDate

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

func (*Post) GetEntities

func (m *Post) GetEntities() *Entities

func (*Post) GetExternalID

func (m *Post) GetExternalID() string

func (*Post) GetID

func (m *Post) GetID() uint64

func (*Post) GetLastEditedDate

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

func (*Post) GetReferencedPosts

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

func (*Post) GetReplySettings

func (m *Post) GetReplySettings() ReplySetting

func (*Post) GetSectionID

func (m *Post) GetSectionID() uint32

func (*Post) GetSubspaceID

func (m *Post) GetSubspaceID() uint64

func (*Post) GetText

func (m *Post) GetText() 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) 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 PostReference

type PostReference struct {
	// Type of reference
	Type PostReferenceType `protobuf:"varint,1,opt,name=type,proto3,enum=mage.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

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

NewPostReference returns a new PostReference instance

func (*PostReference) Descriptor

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

func (*PostReference) Equal

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

func (*PostReference) GetPosition

func (m *PostReference) GetPosition() uint64

func (*PostReference) GetPostID

func (m *PostReference) GetPostID() uint64

func (*PostReference) GetType

func (m *PostReference) GetType() PostReferenceType

func (*PostReference) Marshal

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

func (*PostReference) MarshalTo

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

func (*PostReference) MarshalToSizedBuffer

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

func (*PostReference) ProtoMessage

func (*PostReference) ProtoMessage()

func (*PostReference) Reset

func (m *PostReference) Reset()

func (*PostReference) Size

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

func (*PostReference) String

func (m *PostReference) String() string

func (*PostReference) Unmarshal

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

func (*PostReference) XXX_DiscardUnknown

func (m *PostReference) XXX_DiscardUnknown()

func (*PostReference) XXX_Marshal

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

func (*PostReference) XXX_Merge

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

func (*PostReference) XXX_Size

func (m *PostReference) XXX_Size() int

func (*PostReference) XXX_Unmarshal

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

type PostReferenceType

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

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

func (PostReferenceType) String

func (x PostReferenceType) String() string

type ReplySetting

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

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

func (ReplySetting) String

func (x ReplySetting) String() string

type SubspacesKeeper

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

type Tag

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

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

NewTag returns a new Tag instance

func (*Tag) Descriptor

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

func (*Tag) Equal

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

func (*Tag) GetEnd

func (m *Tag) GetEnd() uint64

func (*Tag) GetStart

func (m *Tag) GetStart() uint64

func (*Tag) GetTag

func (m *Tag) GetTag() string

func (*Tag) Marshal

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

func (*Tag) MarshalTo

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

func (*Tag) MarshalToSizedBuffer

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

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) Reset

func (m *Tag) Reset()

func (*Tag) Size

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

func (*Tag) String

func (m *Tag) String() string

func (*Tag) Unmarshal

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

func (*Tag) XXX_DiscardUnknown

func (m *Tag) XXX_DiscardUnknown()

func (*Tag) XXX_Marshal

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

func (*Tag) XXX_Merge

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

func (*Tag) XXX_Size

func (m *Tag) XXX_Size() int

func (*Tag) XXX_Unmarshal

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

type Url

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

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

NewURL returns a new Url instance

func (*Url) Descriptor

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

func (*Url) Equal

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

func (*Url) GetDisplayUrl

func (m *Url) GetDisplayUrl() string

func (*Url) GetEnd

func (m *Url) GetEnd() uint64

func (*Url) GetStart

func (m *Url) GetStart() uint64

func (*Url) GetUrl

func (m *Url) GetUrl() string

func (*Url) Marshal

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

func (*Url) MarshalTo

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

func (*Url) MarshalToSizedBuffer

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

func (*Url) ProtoMessage

func (*Url) ProtoMessage()

func (*Url) Reset

func (m *Url) Reset()

func (*Url) Size

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

func (*Url) String

func (m *Url) String() string

func (*Url) Unmarshal

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

func (*Url) XXX_DiscardUnknown

func (m *Url) XXX_DiscardUnknown()

func (*Url) XXX_Marshal

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

func (*Url) XXX_Merge

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

func (*Url) XXX_Size

func (m *Url) XXX_Size() int

func (*Url) XXX_Unmarshal

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

type UserAnswer

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

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

func (*UserAnswer) Equal

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

func (*UserAnswer) GetAnswersIndexes

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

func (*UserAnswer) GetPollID

func (m *UserAnswer) GetPollID() uint32

func (*UserAnswer) GetPostID

func (m *UserAnswer) GetPostID() uint64

func (*UserAnswer) GetSectionID

func (m *UserAnswer) GetSectionID() uint32

func (*UserAnswer) GetSubspaceID

func (m *UserAnswer) GetSubspaceID() uint64

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