subscription

package
v0.0.0-...-d0e4e46 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QuerySubscription = "subscription"
)

Variables

View Source
var (
	ModuleName   = types.ModuleName
	StoreKey     = types.StoreKey
	RouterKey    = types.RouterKey
	QuerierRoute = types.QuerierRoute

	RegisterCodec = types.RegisterCodec
)
View Source
var (
	ChannelKey      = []byte{0x00}
	SubscriptionKey = []byte{0x10}
)

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, keeper Keeper)

func GetChannelKey

func GetChannelKey(channelID uint64) []byte

func GetSubscriptionKey

func GetSubscriptionKey(subscriber sdk.AccAddress, channel uint64) []byte

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)

func NewHandler

func NewHandler(k Keeper) sdk.Handler

func NewQuerier

func NewQuerier(k Keeper, cdc *codec.Codec) sdk.Querier

Types

type GenesisState

type GenesisState struct {
	Channels []types.Channel `json:"channels"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, storeKey sdk.StoreKey, cdc *codec.Codec) Keeper

func (Keeper) GetChannel

func (k Keeper) GetChannel(ctx sdk.Context, channelID uint64) types.Channel

func (Keeper) GetSubscription

func (k Keeper) GetSubscription(ctx sdk.Context, subscriber sdk.AccAddress, channelID uint64) types.Subscription

func (Keeper) HasChannel

func (k Keeper) HasChannel(ctx sdk.Context, channelID uint64) bool

func (Keeper) HasSubscription

func (k Keeper) HasSubscription(ctx sdk.Context, subscriber sdk.AccAddress, channelID uint64) bool

func (Keeper) IterateChannels

func (k Keeper) IterateChannels(ctx sdk.Context, fn func(index int64, ch types.Channel) (stop bool))

func (Keeper) IterateSubscriptions

func (k Keeper) IterateSubscriptions(ctx sdk.Context, fn func(index int64, sub types.Subscription) (stop bool))

func (Keeper) SetChannel

func (k Keeper) SetChannel(ctx sdk.Context, channel types.Channel)

func (*Keeper) SetPaymentHooks

func (k *Keeper) SetPaymentHooks(hooks PaymentHooks)

func (Keeper) SetSubscription

func (k Keeper) SetSubscription(ctx sdk.Context, sub types.Subscription)

type PaymentHook

type PaymentHook func(ctx sdk.Context, sub *types.Subscription, ch types.Channel)

type PaymentHooks

type PaymentHooks []PaymentHook

type QuerySubscriptionParams

type QuerySubscriptionParams struct {
	Subscriber sdk.AccAddress `json:"subscriber"`
	ChannelID  uint64         `json:"channel_id"`
}

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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