keeper

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl added in v0.15.0

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func (k Keeper) DeleteUserBlock(ctx sdk.Context, blocker, blocked string, subspace string) error

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

func (k Keeper) GetAllUsersBlocks(ctx sdk.Context) []types.UserBlock

GetAllUsersBlocks returns a list of all the users blocks inside the given context.

func (Keeper) GetUserBlocks added in v0.12.0

func (k Keeper) GetUserBlocks(ctx sdk.Context, user string) []types.UserBlock

GetUserBlocks returns the list of users that the specified user has blocked.

func (Keeper) GetUserRelationships

func (k Keeper) GetUserRelationships(ctx sdk.Context, user string) []types.Relationship

GetUserRelationships allows to list all the stored relationships that involve the given user.

func (Keeper) HasUserBlocked added in v0.15.0

func (k Keeper) HasUserBlocked(ctx sdk.Context, blocker, user, subspace string) bool

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

func (k Keeper) RemoveRelationship(ctx sdk.Context, relationship types.Relationship) error

RemoveRelationship allows to delete the relationship between the given user and his counterparty

func (Keeper) SaveRelationship added in v0.15.0

func (k Keeper) SaveRelationship(ctx sdk.Context, relationship types.Relationship) error

SaveRelationship allows to store the given relationship returning an error if he's already present.

func (Keeper) SaveUserBlock added in v0.12.0

func (k Keeper) SaveUserBlock(ctx sdk.Context, userBlock types.UserBlock) error

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

UserBlocks implements the Query/UserBlocks gRPC method

func (Keeper) UserRelationships added in v0.15.0

UserRelationships implements the Query/UserRelationships gRPC method

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL