Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) DeleteUserBlock(ctx sdk.Context, blocker, blocked string, subspace string) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAllRelationships(ctx sdk.Context) []types.Relationship
- func (k Keeper) GetAllUsersBlocks(ctx sdk.Context) []types.UserBlock
- func (k Keeper) GetUserBlocks(ctx sdk.Context, user string) []types.UserBlock
- func (k Keeper) GetUserRelationships(ctx sdk.Context, user string) []types.Relationship
- func (k Keeper) HasUserBlocked(ctx sdk.Context, blocker, user, subspace string) bool
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) IterateRelationships(ctx sdk.Context, ...)
- func (k Keeper) RemoveRelationship(ctx sdk.Context, relationship types.Relationship) error
- func (k Keeper) SaveRelationship(ctx sdk.Context, relationship types.Relationship) error
- func (k Keeper) SaveUserBlock(ctx sdk.Context, userBlock types.UserBlock) error
- func (k Keeper) UserBlocks(ctx context.Context, request *types.QueryUserBlocksRequest) (*types.QueryUserBlocksResponse, error)
- func (k Keeper) UserRelationships(ctx context.Context, request *types.QueryUserRelationshipsRequest) (*types.QueryUserRelationshipsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶ added in v0.15.0
NewMsgServerImpl returns an implementation of the relationships MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier is the module level router for state queries
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryMarshaler, storeKey sdk.StoreKey) Keeper
NewKeeper creates new instances of the relationships Keeper
func (Keeper) DeleteUserBlock ¶ added in v0.15.0
DeleteUserBlock allows to the specified blocker to unblock the given blocked user.
func (Keeper) ExportGenesis ¶ added in v0.15.0
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the GenesisState associated with the given context
func (Keeper) GetAllRelationships ¶ added in v0.15.0
func (k Keeper) GetAllRelationships(ctx sdk.Context) []types.Relationship
GetAllRelationships allows to returns the list of all stored relationships
func (Keeper) GetAllUsersBlocks ¶ added in v0.15.0
GetAllUsersBlocks returns a list of all the users blocks inside the given context.
func (Keeper) GetUserBlocks ¶ added in v0.12.0
GetUserBlocks returns the list of users that the specified user has blocked.
func (Keeper) GetUserRelationships ¶
GetUserRelationships allows to list all the stored relationships that involve the given user.
func (Keeper) HasUserBlocked ¶ added in v0.15.0
HasUserBlocked returns true if the provided blocker has blocked the given user for the given subspace. If the provided subspace is empty, all subspaces will be checked
func (Keeper) InitGenesis ¶ added in v0.15.0
func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
InitGenesis initializes the chain state based on the given GenesisState
func (Keeper) IterateRelationships ¶ added in v0.15.0
func (k Keeper) IterateRelationships(ctx sdk.Context, fn func(index int64, relationship types.Relationship) (stop bool))
IterateRelationships iterates through the relationships and perform the provided function
func (Keeper) RemoveRelationship ¶ added in v0.15.0
RemoveRelationship allows to delete the relationship between the given user and his counterparty
func (Keeper) SaveRelationship ¶ added in v0.15.0
SaveRelationship allows to store the given relationship returning an error if he's already present.
func (Keeper) SaveUserBlock ¶ added in v0.12.0
SaveUserBlock allows to store the given block inside the store, returning an error if something goes wrong.
func (Keeper) UserBlocks ¶ added in v0.15.0
func (k Keeper) UserBlocks( ctx context.Context, request *types.QueryUserBlocksRequest, ) (*types.QueryUserBlocksResponse, error)
UserBlocks implements the Query/UserBlocks gRPC method
func (Keeper) UserRelationships ¶ added in v0.15.0
func (k Keeper) UserRelationships( ctx context.Context, request *types.QueryUserRelationshipsRequest, ) (*types.QueryUserRelationshipsResponse, error)
UserRelationships implements the Query/UserRelationships gRPC method