Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) Codec() *codec.Codec
- func (k Keeper) CreateBid(ctx sdk.Context, oid types.OrderID, provider sdk.AccAddress, price sdk.Coin) (types.Bid, error)
- func (k Keeper) CreateLease(ctx sdk.Context, bid types.Bid)
- func (k Keeper) CreateOrder(ctx sdk.Context, gid dtypes.GroupID, spec dtypes.GroupSpec) (types.Order, error)
- func (k Keeper) GetBid(ctx sdk.Context, id types.BidID) (types.Bid, bool)
- func (k Keeper) GetLease(ctx sdk.Context, id types.LeaseID) (types.Lease, bool)
- func (k Keeper) GetOrder(ctx sdk.Context, id types.OrderID) (types.Order, bool)
- func (k Keeper) LeaseForOrder(ctx sdk.Context, oid types.OrderID) (types.Lease, bool)
- func (k Keeper) OnBidClosed(ctx sdk.Context, bid types.Bid)
- func (k Keeper) OnBidLost(ctx sdk.Context, bid types.Bid)
- func (k Keeper) OnBidMatched(ctx sdk.Context, bid types.Bid)
- func (k Keeper) OnGroupClosed(ctx sdk.Context, id dtypes.GroupID)
- func (k Keeper) OnInsufficientFunds(ctx sdk.Context, lease types.Lease)
- func (k Keeper) OnLeaseClosed(ctx sdk.Context, lease types.Lease)
- func (k Keeper) OnOrderClosed(ctx sdk.Context, order types.Order)
- func (k Keeper) OnOrderMatched(ctx sdk.Context, order types.Order)
- func (k Keeper) WithBids(ctx sdk.Context, fn func(types.Bid) bool)
- func (k Keeper) WithBidsForOrder(ctx sdk.Context, id types.OrderID, fn func(types.Bid) bool)
- func (k Keeper) WithLeases(ctx sdk.Context, fn func(types.Lease) bool)
- func (k Keeper) WithOrders(ctx sdk.Context, fn func(types.Order) bool)
- func (k Keeper) WithOrdersForGroup(ctx sdk.Context, id dtypes.GroupID, fn func(types.Order) bool)
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
}
Keeper of the market store
func SetupTestInput ¶
func SetupTestInput() (sdk.Context, auth.AccountKeeper, params.Keeper, bank.BaseKeeper, Keeper)
SetupTestInput will setup test inputs and return context and keeper
func (Keeper) CreateBid ¶
func (k Keeper) CreateBid(ctx sdk.Context, oid types.OrderID, provider sdk.AccAddress, price sdk.Coin) (types.Bid, error)
CreateBid creates a bid for a order with given orderID, price for bid and provider
func (Keeper) CreateLease ¶
CreateLease creates lease for bid with given bidID
func (Keeper) CreateOrder ¶
func (k Keeper) CreateOrder(ctx sdk.Context, gid dtypes.GroupID, spec dtypes.GroupSpec) (types.Order, error)
CreateOrder creates a new order with given group id and specifications. It returns created order
func (Keeper) LeaseForOrder ¶
LeaseForOrder returns lease for order with given ID and lease found status
func (Keeper) OnBidClosed ¶
OnBidClosed updates bid state to closed
func (Keeper) OnBidMatched ¶
OnBidMatched updates bid state to matched
func (Keeper) OnGroupClosed ¶
OnGroupClosed updates state of all orders, bids and leases in group to closed
func (Keeper) OnInsufficientFunds ¶
OnInsufficientFunds updates lease state to insufficient funds
func (Keeper) OnLeaseClosed ¶
OnLeaseClosed updates lease state to closed
func (Keeper) OnOrderClosed ¶
OnOrderClosed updates order state to closed
func (Keeper) OnOrderMatched ¶
OnOrderMatched updates order state to matched
func (Keeper) WithBidsForOrder ¶
WithBidsForOrder iterates all bids of a group in market with given GroupID
func (Keeper) WithLeases ¶
WithLeases iterates all leases in market
func (Keeper) WithOrders ¶
WithOrders iterates all orders in market