Documentation ¶
Index ¶
- type Database
- type Module
- func (m *Module) GetPost(height int64, subspaceID uint64, postID uint64) (types.Post, error)
- func (m *Module) GetPostAttachments(height int64, subspaceID uint64, postID uint64) ([]types.PostAttachment, error)
- func (m *Module) GetPostTxHashes(txs []*coretypes.ResultTx, post types.Post) []types.PostTransaction
- func (m *Module) HandleBlock(block *coretypes.ResultBlock, results *coretypes.ResultBlockResults, ...) error
- func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error
- func (m *Module) HandleMsg(index int, msg sdk.Msg, tx *juno.Tx) error
- func (m *Module) HandleMsgExec(index int, _ *authz.MsgExec, _ int, executedMsg sdk.Msg, tx *juno.Tx) error
- func (m *Module) Name() string
- func (m *Module) QueryPostAttachments(height int64, subspaceID uint64, postID uint64) ([]types.PostAttachment, error)
- func (m *Module) QueryPostsTxs(height int64, subspaceID uint64) ([]*coretypes.ResultTx, error)
- func (m *Module) QuerySubspacePosts(height int64, subspaceID uint64) ([]types.Post, error)
- func (m *Module) RefreshPostData(height int64, postTxs []types.PostTransaction, post types.Post) error
- func (m *Module) RefreshPostsData(height int64, subspaceID uint64) error
- func (m *Module) RegisterPeriodicOperations(scheduler *gocron.Scheduler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { SavePost(post types.Post) error HasPost(height int64, subspaceID uint64, postID uint64) (bool, error) DeletePost(height int64, subspaceID uint64, postID uint64) error DeleteAllPosts(height int64, subspaceID uint64) error SavePostTx(tx types.PostTransaction) error SavePostAttachment(attachment types.PostAttachment) error DeletePostAttachment(height int64, subspaceID uint64, postID uint64, attachmentID uint32) error SavePollAnswer(answer types.PollAnswer) error SavePostsParams(params types.PostsParams) error }
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents the x/fees module handler
func NewModule ¶
func NewModule(node node.Node, grpcConnection *grpc.ClientConn, cdc codec.Codec, db Database) *Module
NewModule allows to build a new Module instance
func (*Module) GetPostAttachments ¶
func (*Module) GetPostTxHashes ¶
func (m *Module) GetPostTxHashes(txs []*coretypes.ResultTx, post types.Post) []types.PostTransaction
GetPostTxHashes filters the given transactions and returns only the ones related to the given post
func (*Module) HandleBlock ¶
func (m *Module) HandleBlock(block *coretypes.ResultBlock, results *coretypes.ResultBlockResults, _ []*juno.Tx, _ *coretypes.ResultValidators) error
HandleBlock implements modules.BlockModule
func (*Module) HandleGenesis ¶
func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error
HandleGenesis implements modules.GenesisModule
func (*Module) HandleMsgExec ¶
func (m *Module) HandleMsgExec(index int, _ *authz.MsgExec, _ int, executedMsg sdk.Msg, tx *juno.Tx) error
HandleMsgExec implements modules.AuthzMessageModule
func (*Module) QueryPostAttachments ¶
func (m *Module) QueryPostAttachments(height int64, subspaceID uint64, postID uint64) ([]types.PostAttachment, error)
QueryPostAttachments queries all the attachments for the given post at the provided height
func (*Module) QueryPostsTxs ¶
QueryPostsTxs queries all the posts transactions made inside the given subspace
func (*Module) QuerySubspacePosts ¶
QuerySubspacePosts queries all the posts present inside the given subspace at the provided height
func (*Module) RefreshPostData ¶
func (m *Module) RefreshPostData(height int64, postTxs []types.PostTransaction, post types.Post) error
RefreshPostData refreshes the data associated with the given post at the specified height
func (*Module) RefreshPostsData ¶
RefreshPostsData refreshes all the posts' data for the given subspace