Documentation
¶
Index ¶
- type Keeper
- func (k *Keeper) DeleteActivePlan(ctx sdk.Context, id uint64)
- func (k *Keeper) DeleteInactivePlan(ctx sdk.Context, id uint64)
- func (k *Keeper) DeletePlanForNodeByProvider(ctx sdk.Context, nodeAddr base.NodeAddress, provAddr base.ProvAddress, ...)
- func (k *Keeper) DeletePlanForProvider(ctx sdk.Context, addr base.ProvAddress, id uint64)
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *v3.GenesisState
- func (k *Keeper) GetActivePlan(ctx sdk.Context, id uint64) (plan v3.Plan, found bool)
- func (k *Keeper) GetCount(ctx sdk.Context) uint64
- func (k *Keeper) GetInactivePlan(ctx sdk.Context, id uint64) (plan v3.Plan, found bool)
- func (k *Keeper) GetPlan(ctx sdk.Context, id uint64) (plan v3.Plan, found bool)
- func (k *Keeper) GetPlans(ctx sdk.Context) (items []v3.Plan)
- func (k *Keeper) GetPlansForProvider(ctx sdk.Context, addr base.ProvAddress) (items []v3.Plan)
- func (k *Keeper) HandleMsgCreatePlan(ctx sdk.Context, msg *v3.MsgCreatePlanRequest) (*v3.MsgCreatePlanResponse, error)
- func (k *Keeper) HandleMsgLinkNode(ctx sdk.Context, msg *v3.MsgLinkNodeRequest) (*v3.MsgLinkNodeResponse, error)
- func (k *Keeper) HandleMsgStartSession(ctx sdk.Context, msg *v3.MsgStartSessionRequest) (*v3.MsgStartSessionResponse, error)
- func (k *Keeper) HandleMsgUnlinkNode(ctx sdk.Context, msg *v3.MsgUnlinkNodeRequest) (*v3.MsgUnlinkNodeResponse, error)
- func (k *Keeper) HandleMsgUpdatePlanStatus(ctx sdk.Context, msg *v3.MsgUpdatePlanStatusRequest) (*v3.MsgUpdatePlanStatusResponse, error)
- func (k *Keeper) HandleQueryPlan(ctx sdk.Context, req *v3.QueryPlanRequest) (*v3.QueryPlanResponse, error)
- func (k *Keeper) HandleQueryPlans(ctx sdk.Context, req *v3.QueryPlansRequest) (res *v3.QueryPlansResponse, err error)
- func (k *Keeper) HandleQueryPlansForProvider(ctx sdk.Context, req *v3.QueryPlansForProviderRequest) (res *v3.QueryPlansForProviderResponse, err error)
- func (k *Keeper) HasActivePlan(ctx sdk.Context, id uint64) bool
- func (k *Keeper) HasInactivePlan(ctx sdk.Context, id uint64) bool
- func (k *Keeper) HasPlan(ctx sdk.Context, id uint64) bool
- func (k *Keeper) HasPlanForNodeByProvider(ctx sdk.Context, nodeAddr base.NodeAddress, provAddr base.ProvAddress, ...) bool
- func (k *Keeper) InitGenesis(ctx sdk.Context, state *v3.GenesisState)
- func (k *Keeper) IteratePlansForNode(ctx sdk.Context, addr base.NodeAddress, ...)
- func (k *Keeper) IteratePlansForNodeByProvider(ctx sdk.Context, nodeAddr base.NodeAddress, provAddr base.ProvAddress, ...)
- func (k *Keeper) IteratePlansForProvider(ctx sdk.Context, addr base.ProvAddress, ...)
- func (k *Keeper) LeaseInactivePreHook(ctx sdk.Context, id uint64) error
- func (k *Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) PlanUnlinkNodePreHook(ctx sdk.Context, id uint64, addr base.NodeAddress) error
- func (k *Keeper) ProviderInactivePreHook(ctx sdk.Context, addr base.ProvAddress) error
- func (k *Keeper) SetActivePlan(ctx sdk.Context, plan v3.Plan)
- func (k *Keeper) SetCount(ctx sdk.Context, count uint64)
- func (k *Keeper) SetInactivePlan(ctx sdk.Context, plan v3.Plan)
- func (k *Keeper) SetPlan(ctx sdk.Context, plan v3.Plan)
- func (k *Keeper) SetPlanForNodeByProvider(ctx sdk.Context, nodeAddr base.NodeAddress, provAddr base.ProvAddress, ...)
- func (k *Keeper) SetPlanForProvider(ctx sdk.Context, addr base.ProvAddress, id uint64)
- func (k *Keeper) Store(ctx sdk.Context) sdk.KVStore
- func (k *Keeper) WithLeaseKeeper(keeper expected.LeaseKeeper)
- func (k *Keeper) WithNodeKeeper(keeper expected.NodeKeeper)
- func (k *Keeper) WithProviderKeeper(keeper expected.ProviderKeeper)
- func (k *Keeper) WithSessionKeeper(keeper expected.SessionKeeper)
- func (k *Keeper) WithSubscriptionKeeper(keeper expected.SubscriptionKeeper)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey) Keeper
func (*Keeper) DeleteActivePlan ¶
DeleteActivePlan removes an active plan from the module's KVStore.
func (*Keeper) DeleteInactivePlan ¶
DeleteInactivePlan removes an inactive plan from the module's KVStore.
func (*Keeper) DeletePlanForNodeByProvider ¶
func (k *Keeper) DeletePlanForNodeByProvider(ctx sdk.Context, nodeAddr base.NodeAddress, provAddr base.ProvAddress, id uint64)
DeletePlanForNodeByProvider removes a plan for a node by provider from the module's KVStore based on the node and provider addresses and plan ID.
func (*Keeper) DeletePlanForProvider ¶
DeletePlanForProvider removes the association between a plan ID and a provider address.
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx sdk.Context) *v3.GenesisState
func (*Keeper) GetActivePlan ¶
GetActivePlan retrieves an active plan from the module's KVStore.
func (*Keeper) GetInactivePlan ¶
GetInactivePlan retrieves an inactive plan from the module's KVStore.
func (*Keeper) GetPlans ¶
GetPlans retrieves all plans (both active and inactive) from the module's KVStore.
func (*Keeper) GetPlansForProvider ¶
GetPlansForProvider retrieves all plans associated with a specific provider address.
func (*Keeper) HandleMsgCreatePlan ¶
func (k *Keeper) HandleMsgCreatePlan(ctx sdk.Context, msg *v3.MsgCreatePlanRequest) (*v3.MsgCreatePlanResponse, error)
func (*Keeper) HandleMsgLinkNode ¶
func (k *Keeper) HandleMsgLinkNode(ctx sdk.Context, msg *v3.MsgLinkNodeRequest) (*v3.MsgLinkNodeResponse, error)
func (*Keeper) HandleMsgStartSession ¶
func (k *Keeper) HandleMsgStartSession(ctx sdk.Context, msg *v3.MsgStartSessionRequest) (*v3.MsgStartSessionResponse, error)
func (*Keeper) HandleMsgUnlinkNode ¶
func (k *Keeper) HandleMsgUnlinkNode(ctx sdk.Context, msg *v3.MsgUnlinkNodeRequest) (*v3.MsgUnlinkNodeResponse, error)
func (*Keeper) HandleMsgUpdatePlanStatus ¶
func (k *Keeper) HandleMsgUpdatePlanStatus(ctx sdk.Context, msg *v3.MsgUpdatePlanStatusRequest) (*v3.MsgUpdatePlanStatusResponse, error)
func (*Keeper) HandleQueryPlan ¶
func (k *Keeper) HandleQueryPlan(ctx sdk.Context, req *v3.QueryPlanRequest) (*v3.QueryPlanResponse, error)
func (*Keeper) HandleQueryPlans ¶
func (k *Keeper) HandleQueryPlans(ctx sdk.Context, req *v3.QueryPlansRequest) (res *v3.QueryPlansResponse, err error)
func (*Keeper) HandleQueryPlansForProvider ¶
func (k *Keeper) HandleQueryPlansForProvider(ctx sdk.Context, req *v3.QueryPlansForProviderRequest) (res *v3.QueryPlansForProviderResponse, err error)
func (*Keeper) HasActivePlan ¶
HasActivePlan checks if an active plan exists in the module's KVStore.
func (*Keeper) HasInactivePlan ¶
HasInactivePlan checks if an inactive plan exists in the module's KVStore.
func (*Keeper) HasPlanForNodeByProvider ¶
func (k *Keeper) HasPlanForNodeByProvider(ctx sdk.Context, nodeAddr base.NodeAddress, provAddr base.ProvAddress, id uint64) bool
HasPlanForNodeByProvider checks if a plan for a node by provider exists in the module's KVStore based on the node and provider addresses and plan ID.
func (*Keeper) InitGenesis ¶
func (k *Keeper) InitGenesis(ctx sdk.Context, state *v3.GenesisState)
func (*Keeper) IteratePlansForNode ¶
func (k *Keeper) IteratePlansForNode(ctx sdk.Context, addr base.NodeAddress, fn func(index int, item v3.Plan) (stop bool))
IteratePlansForNode iterates over all plans for a specific node and calls the provided function for each plan. The iteration stops when the provided function returns 'true'.
func (*Keeper) IteratePlansForNodeByProvider ¶
func (k *Keeper) IteratePlansForNodeByProvider(ctx sdk.Context, nodeAddr base.NodeAddress, provAddr base.ProvAddress, fn func(index int, item v3.Plan) (stop bool))
IteratePlansForNodeByProvider iterates over all plans for a specific node and provider and calls the provided function for each plan. The iteration stops when the provided function returns 'true'.
func (*Keeper) IteratePlansForProvider ¶
func (*Keeper) LeaseInactivePreHook ¶
func (*Keeper) PlanUnlinkNodePreHook ¶
func (*Keeper) ProviderInactivePreHook ¶
func (*Keeper) SetActivePlan ¶
SetActivePlan stores an active plan in the module's KVStore.
func (*Keeper) SetInactivePlan ¶
SetInactivePlan stores an inactive plan in the module's KVStore.
func (*Keeper) SetPlan ¶
SetPlan stores a plan in the KVStore based on its status (Active or Inactive).
func (*Keeper) SetPlanForNodeByProvider ¶
func (k *Keeper) SetPlanForNodeByProvider(ctx sdk.Context, nodeAddr base.NodeAddress, provAddr base.ProvAddress, id uint64)
SetPlanForNodeByProvider stores a plan for a node by provider in the module's KVStore.
func (*Keeper) SetPlanForProvider ¶
SetPlanForProvider associates a plan ID with a provider address.
func (*Keeper) WithLeaseKeeper ¶
func (k *Keeper) WithLeaseKeeper(keeper expected.LeaseKeeper)
func (*Keeper) WithNodeKeeper ¶
func (k *Keeper) WithNodeKeeper(keeper expected.NodeKeeper)
func (*Keeper) WithProviderKeeper ¶
func (k *Keeper) WithProviderKeeper(keeper expected.ProviderKeeper)
func (*Keeper) WithSessionKeeper ¶
func (k *Keeper) WithSessionKeeper(keeper expected.SessionKeeper)
func (*Keeper) WithSubscriptionKeeper ¶
func (k *Keeper) WithSubscriptionKeeper(keeper expected.SubscriptionKeeper)