Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper)
- func ValidReactionsInvariant(k Keeper) sdk.Invariant
- func ValidReactionsParamsInvariant(k Keeper) sdk.Invariant
- func ValidRegisteredReactionsInvariant(k Keeper) sdk.Invariant
- func ValidSubspacesInvariant(k Keeper) sdk.Invariant
- type Hooks
- func (h Hooks) AfterAttachmentDeleted(sdk.Context, uint64, uint64, uint32)
- func (h Hooks) AfterAttachmentSaved(sdk.Context, uint64, uint64, uint32)
- func (h Hooks) AfterPollAnswerDeleted(sdk.Context, uint64, uint64, uint32, string)
- func (h Hooks) AfterPollAnswerSaved(sdk.Context, uint64, uint64, uint32, string)
- func (h Hooks) AfterPollVotingPeriodEnded(sdk.Context, uint64, uint64, uint32)
- func (h Hooks) AfterPostDeleted(ctx sdk.Context, subspaceID uint64, postID uint64)
- func (h Hooks) AfterPostSaved(ctx sdk.Context, subspaceID uint64, postID uint64)
- func (h Hooks) AfterSubspaceDeleted(ctx sdk.Context, subspaceID uint64)
- func (h Hooks) AfterSubspaceGroupDeleted(sdk.Context, uint64, uint32)
- func (h Hooks) AfterSubspaceGroupMemberAdded(sdk.Context, uint64, uint32, string)
- func (h Hooks) AfterSubspaceGroupMemberRemoved(sdk.Context, uint64, uint32, string)
- func (h Hooks) AfterSubspaceGroupSaved(sdk.Context, uint64, uint32)
- func (h Hooks) AfterSubspaceSaved(ctx sdk.Context, subspaceID uint64)
- func (h Hooks) AfterSubspaceSectionDeleted(sdk.Context, uint64, uint32)
- func (h Hooks) AfterSubspaceSectionSaved(sdk.Context, uint64, uint32)
- func (h Hooks) AfterUserPermissionRemoved(sdk.Context, uint64, uint32, string)
- func (h Hooks) AfterUserPermissionSet(sdk.Context, uint64, uint32, string, subspacestypes.Permissions)
- type Keeper
- func (k Keeper) AfterReactionDeleted(ctx sdk.Context, subspaceID uint64, reactionID uint32)
- func (k Keeper) AfterReactionParamsSaved(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) AfterReactionSaved(ctx sdk.Context, subspaceID uint64, reactionID uint32)
- func (k Keeper) AfterRegisteredReactionDeleted(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32)
- func (k Keeper) AfterRegisteredReactionSaved(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32)
- func (k Keeper) DeleteNextReactionID(ctx sdk.Context, subspaceID uint64, postID uint64)
- func (k Keeper) DeleteNextRegisteredReactionID(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) DeleteReaction(ctx sdk.Context, subspaceID uint64, postID uint64, reactionID uint32)
- func (k Keeper) DeleteRegisteredReaction(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32)
- func (k Keeper) DeleteSubspaceReactionsParams(ctx sdk.Context, subspaceID uint64)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetNextReactionID(ctx sdk.Context, subspaceID uint64, postID uint64) (reactionID uint32, err error)
- func (k Keeper) GetNextRegisteredReactionID(ctx sdk.Context, subspaceID uint64) (registeredReactionID uint32, err error)
- func (k Keeper) GetPost(ctx sdk.Context, subspaceID uint64, postID uint64) (poststypes.Post, bool)
- func (k Keeper) GetReaction(ctx sdk.Context, subspaceID uint64, postID uint64, reactionID uint32) (reaction types.Reaction, found bool)
- func (k Keeper) GetReactions(ctx sdk.Context) []types.Reaction
- func (k Keeper) GetReactionsParams(ctx sdk.Context) []types.SubspaceReactionsParams
- func (k Keeper) GetRegisteredReaction(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32) (registeredReaction types.RegisteredReaction, found bool)
- func (k Keeper) GetRegisteredReactions(ctx sdk.Context) []types.RegisteredReaction
- func (k Keeper) GetSubspaceReactions(ctx sdk.Context, subspaceID uint64) []types.Reaction
- func (k Keeper) GetSubspaceReactionsParams(ctx sdk.Context, subspaceID uint64) (params types.SubspaceReactionsParams, err error)
- func (k Keeper) GetSubspaceRegisteredReactions(ctx sdk.Context, subspaceID uint64) []types.RegisteredReaction
- func (k Keeper) HasNextReactionID(ctx sdk.Context, subspaceID uint64, postID uint64) bool
- func (k Keeper) HasNextRegisteredReactionID(ctx sdk.Context, subspaceID uint64) bool
- func (k Keeper) HasPermission(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string, ...) bool
- func (k Keeper) HasPost(ctx sdk.Context, subspaceID uint64, postID uint64) bool
- func (k Keeper) HasProfile(ctx sdk.Context, user string) bool
- func (k Keeper) HasReacted(ctx sdk.Context, subspaceID uint64, postID uint64, user string, ...) bool
- func (k Keeper) HasReaction(ctx sdk.Context, subspaceID uint64, postID uint64, reactionID uint32) bool
- func (k Keeper) HasRegisteredReaction(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32) bool
- func (k Keeper) HasSubspace(ctx sdk.Context, subspaceID uint64) bool
- func (k Keeper) HasSubspaceReactionsParams(ctx sdk.Context, subspaceID uint64) bool
- func (k Keeper) HasUserBlocked(ctx sdk.Context, blocker, user string, subspaceID uint64) bool
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) IteratePostReactions(ctx sdk.Context, subspaceID uint64, postID uint64, ...)
- func (k Keeper) IterateReactions(ctx sdk.Context, fn func(reaction types.Reaction) (stop bool))
- func (k Keeper) IterateReactionsParams(ctx sdk.Context, fn func(params types.SubspaceReactionsParams) (stop bool))
- func (k Keeper) IterateRegisteredReactions(ctx sdk.Context, fn func(reaction types.RegisteredReaction) (stop bool))
- func (k Keeper) IterateSubspaceReactions(ctx sdk.Context, subspaceID uint64, ...)
- func (k Keeper) IterateSubspaceRegisteredReactions(ctx sdk.Context, subspaceID uint64, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Reaction(ctx context.Context, request *types.QueryReactionRequest) (*types.QueryReactionResponse, error)
- func (k Keeper) Reactions(ctx context.Context, request *types.QueryReactionsRequest) (*types.QueryReactionsResponse, error)
- func (k Keeper) ReactionsParams(ctx context.Context, request *types.QueryReactionsParamsRequest) (*types.QueryReactionsParamsResponse, error)
- func (k Keeper) RegisteredReaction(ctx context.Context, request *types.QueryRegisteredReactionRequest) (*types.QueryRegisteredReactionResponse, error)
- func (k Keeper) RegisteredReactions(ctx context.Context, request *types.QueryRegisteredReactionsRequest) (*types.QueryRegisteredReactionsResponse, error)
- func (k Keeper) SaveReaction(ctx sdk.Context, reaction types.Reaction)
- func (k Keeper) SaveRegisteredReaction(ctx sdk.Context, reaction types.RegisteredReaction)
- func (k Keeper) SaveSubspaceReactionsParams(ctx sdk.Context, params types.SubspaceReactionsParams)
- func (k *Keeper) SetHooks(rs types.ReactionsHooks) *Keeper
- func (k Keeper) SetNextReactionID(ctx sdk.Context, subspaceID uint64, postID uint64, reactionID uint32)
- func (k Keeper) SetNextRegisteredReactionID(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32)
- func (k Keeper) ValidateReaction(ctx sdk.Context, reaction types.Reaction) (err error)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the stored MsgServer interface for the provided keeper
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper)
RegisterInvariants registers all reactions invariants
func ValidReactionsInvariant ¶
ValidReactionsInvariant checks that all the stored reactions are valid
func ValidReactionsParamsInvariant ¶
ValidReactionsParamsInvariant checks that all the stored reactions params are valid
func ValidRegisteredReactionsInvariant ¶
ValidRegisteredReactionsInvariant checks that all the stored registered reactions are valid
func ValidSubspacesInvariant ¶
ValidSubspacesInvariant checks that all the subspaces have a valid registered reaction id and reaction params
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
func (Hooks) AfterAttachmentDeleted ¶
AfterAttachmentDeleted implements poststypes.PostsHooks
func (Hooks) AfterAttachmentSaved ¶
AfterAttachmentSaved implements poststypes.PostsHooks
func (Hooks) AfterPollAnswerDeleted ¶
AfterPollAnswerDeleted implements poststypes.PostsHooks
func (Hooks) AfterPollAnswerSaved ¶
AfterPollAnswerSaved implements poststypes.PostsHooks
func (Hooks) AfterPollVotingPeriodEnded ¶
AfterPollVotingPeriodEnded implements poststypes.PostsHooks
func (Hooks) AfterPostDeleted ¶
AfterPostDeleted implements poststypes.PostsHooks
func (Hooks) AfterPostSaved ¶
AfterPostSaved implements poststypes.PostsHooks
func (Hooks) AfterSubspaceDeleted ¶
AfterSubspaceDeleted implements subspacestypes.Hooks
func (Hooks) AfterSubspaceGroupDeleted ¶
AfterSubspaceGroupDeleted implements subspacestypes.Hooks
func (Hooks) AfterSubspaceGroupMemberAdded ¶
AfterSubspaceGroupMemberAdded implements subspacestypes.Hooks
func (Hooks) AfterSubspaceGroupMemberRemoved ¶
AfterSubspaceGroupMemberRemoved implements subspacestypes.Hooks
func (Hooks) AfterSubspaceGroupSaved ¶
AfterSubspaceGroupSaved implements subspacestypes.Hooks
func (Hooks) AfterSubspaceSaved ¶
AfterSubspaceSaved implements subspacestypes.Hooks
func (Hooks) AfterSubspaceSectionDeleted ¶
AfterSubspaceSectionDeleted implements subspacestypes.Hooks
func (Hooks) AfterSubspaceSectionSaved ¶
AfterSubspaceSectionSaved implements subspacestypes.Hooks
func (Hooks) AfterUserPermissionRemoved ¶
AfterUserPermissionRemoved implements subspacestypes.Hooks
func (Hooks) AfterUserPermissionSet ¶
func (h Hooks) AfterUserPermissionSet(sdk.Context, uint64, uint32, string, subspacestypes.Permissions)
AfterUserPermissionSet implements subspacestypes.Hooks
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey sdk.StoreKey, ak types.ProfilesKeeper, sk types.SubspacesKeeper, rk types.RelationshipsKeeper, pk types.PostsKeeper, ) Keeper
NewKeeper creates a new instance of the reactions Keeper.
func (Keeper) AfterReactionDeleted ¶
AfterReactionDeleted implements types.ReactionsHooks
func (Keeper) AfterReactionParamsSaved ¶
AfterReactionParamsSaved implements types.ReactionsHooks
func (Keeper) AfterReactionSaved ¶
AfterReactionSaved implements types.ReactionsHooks
func (Keeper) AfterRegisteredReactionDeleted ¶
func (k Keeper) AfterRegisteredReactionDeleted(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32)
AfterRegisteredReactionDeleted implements types.ReactionsHooks
func (Keeper) AfterRegisteredReactionSaved ¶
func (k Keeper) AfterRegisteredReactionSaved(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32)
AfterRegisteredReactionSaved implements types.ReactionsHooks
func (Keeper) DeleteNextReactionID ¶
DeleteNextReactionID removes the next reaction id for the given subspace
func (Keeper) DeleteNextRegisteredReactionID ¶
DeleteNextRegisteredReactionID removes the next registered reaction id for the given subspace
func (Keeper) DeleteReaction ¶
func (k Keeper) DeleteReaction(ctx sdk.Context, subspaceID uint64, postID uint64, reactionID uint32)
DeleteReaction deletes the reaction having the given id from the store
func (Keeper) DeleteRegisteredReaction ¶
func (k Keeper) DeleteRegisteredReaction(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32)
DeleteRegisteredReaction deletes the registered reaction having the given id from the store
func (Keeper) DeleteSubspaceReactionsParams ¶
DeleteSubspaceReactionsParams deletes the reactions params for the given subspace
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the GenesisState associated with the given context
func (Keeper) GetNextReactionID ¶
func (k Keeper) GetNextReactionID(ctx sdk.Context, subspaceID uint64, postID uint64) (reactionID uint32, err error)
GetNextReactionID gets the next reaction id for the given subspace
func (Keeper) GetNextRegisteredReactionID ¶
func (k Keeper) GetNextRegisteredReactionID(ctx sdk.Context, subspaceID uint64) (registeredReactionID uint32, err error)
GetNextRegisteredReactionID gets the next registered reaction id for the given subspace
func (Keeper) GetReaction ¶
func (k Keeper) GetReaction(ctx sdk.Context, subspaceID uint64, postID uint64, reactionID uint32) (reaction types.Reaction, found bool)
GetReaction returns the reaction associated with the given id. If there is no reaction with the given id the function will return an empty reaction and false.
func (Keeper) GetReactions ¶
GetReactions returns all the stored reactions
func (Keeper) GetReactionsParams ¶
func (k Keeper) GetReactionsParams(ctx sdk.Context) []types.SubspaceReactionsParams
GetReactionsParams returns all the stored reactions parameters
func (Keeper) GetRegisteredReaction ¶
func (k Keeper) GetRegisteredReaction(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32) (registeredReaction types.RegisteredReaction, found bool)
GetRegisteredReaction returns the registered reaction associated with the given id. If there is no registered reaction with the given id the function will return an empty registered reaction and false.
func (Keeper) GetRegisteredReactions ¶
func (k Keeper) GetRegisteredReactions(ctx sdk.Context) []types.RegisteredReaction
GetRegisteredReactions returns all the stored registered reactions
func (Keeper) GetSubspaceReactions ¶
GetSubspaceReactions returns all the reactions associated to this subspace
func (Keeper) GetSubspaceReactionsParams ¶
func (k Keeper) GetSubspaceReactionsParams(ctx sdk.Context, subspaceID uint64) (params types.SubspaceReactionsParams, err error)
GetSubspaceReactionsParams returns the reactions params for the given subspace
func (Keeper) GetSubspaceRegisteredReactions ¶
func (k Keeper) GetSubspaceRegisteredReactions(ctx sdk.Context, subspaceID uint64) []types.RegisteredReaction
GetSubspaceRegisteredReactions returns all the subspaces registered reactions
func (Keeper) HasNextReactionID ¶
HasNextReactionID tells whether the next reaction id exists for the given subspace
func (Keeper) HasNextRegisteredReactionID ¶
HasNextRegisteredReactionID tells whether the next registered reaction id exists for the given subspace
func (Keeper) HasPermission ¶
func (k Keeper) HasPermission(ctx sdk.Context, subspaceID uint64, sectionID uint32, user string, permission subspacestypes.Permission) bool
HasPermission tells whether the given user has the provided permission inside the subspace with the specified id
func (Keeper) HasProfile ¶
HasProfile returns true iff the given user has a profile, or an error if something is wrong.
func (Keeper) HasReacted ¶
func (k Keeper) HasReacted(ctx sdk.Context, subspaceID uint64, postID uint64, user string, value types.ReactionValue) bool
HasReacted tells whether the given user has already reacted with the same reaction value to the provided post
func (Keeper) HasReaction ¶
func (k Keeper) HasReaction(ctx sdk.Context, subspaceID uint64, postID uint64, reactionID uint32) bool
HasReaction tells whether the given reaction exists or not
func (Keeper) HasRegisteredReaction ¶
func (k Keeper) HasRegisteredReaction(ctx sdk.Context, subspaceID uint64, registeredReactionID uint32) bool
HasRegisteredReaction tells whether the given registered reaction exists or not
func (Keeper) HasSubspace ¶
HasSubspace tells whether the subspace with the given id exists or not
func (Keeper) HasSubspaceReactionsParams ¶
HasSubspaceReactionsParams tells whether the params for the given subspace exist or not
func (Keeper) HasUserBlocked ¶
HasUserBlocked tells whether the given blocker has blocked the user inside the provided subspace
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
InitGenesis initializes the chain state based on the given GenesisState
func (Keeper) IteratePostReactions ¶
func (k Keeper) IteratePostReactions(ctx sdk.Context, subspaceID uint64, postID uint64, fn func(reaction types.Reaction) (stop bool))
IteratePostReactions iterates over all the given post reactions and performs the provided function
func (Keeper) IterateReactions ¶
IterateReactions iterates over all the reactions and performs the provided function
func (Keeper) IterateReactionsParams ¶
func (k Keeper) IterateReactionsParams(ctx sdk.Context, fn func(params types.SubspaceReactionsParams) (stop bool))
IterateReactionsParams iterates over all the stored subspace reactions params and performs the provided function
func (Keeper) IterateRegisteredReactions ¶
func (k Keeper) IterateRegisteredReactions(ctx sdk.Context, fn func(reaction types.RegisteredReaction) (stop bool))
IterateRegisteredReactions iterates over all the registered reactions and performs the provided function
func (Keeper) IterateSubspaceReactions ¶
func (k Keeper) IterateSubspaceReactions(ctx sdk.Context, subspaceID uint64, fn func(reaction types.Reaction) (stop bool))
IterateSubspaceReactions iterates over all the given subspace reactions and performs the provided function
func (Keeper) IterateSubspaceRegisteredReactions ¶
func (k Keeper) IterateSubspaceRegisteredReactions(ctx sdk.Context, subspaceID uint64, fn func(reaction types.RegisteredReaction) (stop bool))
IterateSubspaceRegisteredReactions iterates over all the given subspace registered reactions and performs the provided function
func (Keeper) Reaction ¶
func (k Keeper) Reaction(ctx context.Context, request *types.QueryReactionRequest) (*types.QueryReactionResponse, error)
Reaction implements the QueryReaction gRPC method
func (Keeper) Reactions ¶
func (k Keeper) Reactions(ctx context.Context, request *types.QueryReactionsRequest) (*types.QueryReactionsResponse, error)
Reactions implements the QueryReactions gRPC method
func (Keeper) ReactionsParams ¶
func (k Keeper) ReactionsParams(ctx context.Context, request *types.QueryReactionsParamsRequest) (*types.QueryReactionsParamsResponse, error)
ReactionsParams implements the QueryReactionsParams gRPC method
func (Keeper) RegisteredReaction ¶
func (k Keeper) RegisteredReaction(ctx context.Context, request *types.QueryRegisteredReactionRequest) (*types.QueryRegisteredReactionResponse, error)
RegisteredReaction implements the QueryRegisteredReaction gRPC method
func (Keeper) RegisteredReactions ¶
func (k Keeper) RegisteredReactions(ctx context.Context, request *types.QueryRegisteredReactionsRequest) (*types.QueryRegisteredReactionsResponse, error)
RegisteredReactions implements the QueryRegisteredReactions gRPC method
func (Keeper) SaveReaction ¶
SaveReaction saves the given reaction inside the current context
func (Keeper) SaveRegisteredReaction ¶
func (k Keeper) SaveRegisteredReaction(ctx sdk.Context, reaction types.RegisteredReaction)
SaveRegisteredReaction saves the given registered reaction inside the current context
func (Keeper) SaveSubspaceReactionsParams ¶
func (k Keeper) SaveSubspaceReactionsParams(ctx sdk.Context, params types.SubspaceReactionsParams)
SaveSubspaceReactionsParams stores the given reactions params inside the store
func (*Keeper) SetHooks ¶
func (k *Keeper) SetHooks(rs types.ReactionsHooks) *Keeper
SetHooks allows to set the reactions hooks
func (Keeper) SetNextReactionID ¶
func (k Keeper) SetNextReactionID(ctx sdk.Context, subspaceID uint64, postID uint64, reactionID uint32)
SetNextReactionID sets the next reaction id for the given subspace
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func NewMigrator ¶
func NewMigrator(keeper Keeper, sk types.SubspacesKeeper, pk types.PostsKeeper) Migrator
NewMigrator returns a new Migrator