Documentation ¶
Index ¶
- Constants
- Variables
- func EndBlocker(ctx sdk.Context, keeper Keeper)
- func GetLikeRecordCountKey(liker sdk.AccAddress, url string) []byte
- func GetLikerStateKey(liker sdk.AccAddress) []byte
- func GetPaymentHook(keeper Keeper) func(sdk.Context, *subTypes.Subscription, subTypes.Channel)
- func NewHandler(k Keeper) sdk.Handler
- func NewQuerier(k Keeper, cdc *codec.Codec) sdk.Querier
- type Keeper
- func (k Keeper) GetBlockLikeRecordsCache() LikeRecordsCache
- func (k Keeper) GetLikeGlobalCount(ctx sdk.Context) uint64
- func (k Keeper) GetLikeRecordCount(ctx sdk.Context, liker sdk.AccAddress, url string) uint64
- func (k Keeper) GetLikerState(ctx sdk.Context, liker sdk.AccAddress) types.LikerState
- func (k Keeper) HasLikerState(ctx sdk.Context, liker sdk.AccAddress) bool
- func (k Keeper) IterateLikerLikeHistory(ctx sdk.Context, liker sdk.AccAddress, ...)
- func (k Keeper) SetLikeGlobalCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetLikeRecord(ctx sdk.Context, r types.LikeRecord)
- func (k Keeper) SetLikeRecordCount(ctx sdk.Context, liker sdk.AccAddress, url string, count uint64)
- func (k Keeper) SetLikerState(ctx sdk.Context, s types.LikerState)
- type LikeHistory
- type LikeRecordsCache
- type QueryLikeCountParams
- type QueryLikeHistoryParams
- type SubscriptionKeeper
Constants ¶
View Source
const ( QueryLikeCount = "like-count" QueryLikeHistory = "like-history" )
Variables ¶
View Source
var ( ModuleName = types.ModuleName StoreKey = types.StoreKey RouterKey = types.RouterKey QuerierRoute = types.QuerierRoute RegisterCodec = types.RegisterCodec )
View Source
var ( LikeGlobalCountKey = []byte{0x00} LikeRecordKey = []byte{0x10} LikeRecordCountKey = []byte{0x11} LikerStateKey = []byte{0x20} )
Functions ¶
func EndBlocker ¶
func GetLikeRecordCountKey ¶
func GetLikeRecordCountKey(liker sdk.AccAddress, url string) []byte
func GetLikerStateKey ¶
func GetLikerStateKey(liker sdk.AccAddress) []byte
func GetPaymentHook ¶
func NewHandler ¶
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) GetBlockLikeRecordsCache ¶
func (k Keeper) GetBlockLikeRecordsCache() LikeRecordsCache
func (Keeper) GetLikeRecordCount ¶
func (Keeper) GetLikerState ¶
func (k Keeper) GetLikerState(ctx sdk.Context, liker sdk.AccAddress) types.LikerState
func (Keeper) HasLikerState ¶
func (Keeper) IterateLikerLikeHistory ¶
func (k Keeper) IterateLikerLikeHistory(ctx sdk.Context, liker sdk.AccAddress, fn func(index int64, r types.LikeRecord) (stop bool))
func (Keeper) SetLikeGlobalCount ¶
func (Keeper) SetLikeRecord ¶
func (k Keeper) SetLikeRecord(ctx sdk.Context, r types.LikeRecord)
func (Keeper) SetLikeRecordCount ¶
func (Keeper) SetLikerState ¶
func (k Keeper) SetLikerState(ctx sdk.Context, s types.LikerState)
type LikeHistory ¶
type LikeHistory []types.LikeRecord
func (LikeHistory) Len ¶
func (h LikeHistory) Len() int
func (LikeHistory) Less ¶
func (h LikeHistory) Less(i, j int) bool
func (LikeHistory) Swap ¶
func (h LikeHistory) Swap(i, j int)
type LikeRecordsCache ¶
type LikeRecordsCache map[string][]types.LikeRecord // key: likers
type QueryLikeCountParams ¶
type QueryLikeCountParams struct { Liker sdk.AccAddress `json:"liker"` Url string `json:"url"` }
type QueryLikeHistoryParams ¶
type QueryLikeHistoryParams struct { Liker sdk.AccAddress `json:"liker"` Url string `json:"url"` }
type SubscriptionKeeper ¶
Click to show internal directories.
Click to hide internal directories.