Documentation ¶
Index ¶
- Constants
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (k Keeper) AddOrder(ctx sdk.Context, buyer sdk.AccAddress, amount sdk.Coins) (uint64, error)
- func (k Keeper) DeleteReservation(ctx sdk.Context, key string)
- func (k Keeper) DeleteSell(ctx sdk.Context, key string)
- func (k Keeper) GetChannel(ctx sdk.Context, chainName string, port string) (string, error)
- func (k Keeper) GetNextOrderCount(ctx sdk.Context) uint64
- func (k Keeper) GetOrder(ctx sdk.Context, id uint64) (types.Order, error)
- func (k Keeper) GetOrderCount(ctx sdk.Context) uint64
- func (k Keeper) GetProduct(ctx sdk.Context, key string) (types.Product, error)
- func (k Keeper) GetProductCategory(ctx sdk.Context, key string) (string, error)
- func (k Keeper) GetProductDescription(ctx sdk.Context, key string) (string, error)
- func (k Keeper) GetProductImages(ctx sdk.Context, key string) (string, error)
- func (k Keeper) GetProductOwner(ctx sdk.Context, key string) (sdk.AccAddress, error)
- func (k Keeper) GetProductTitle(ctx sdk.Context, key string) (string, error)
- func (k Keeper) GetProductsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetReservation(ctx sdk.Context, key string) (types.Reservation, error)
- func (k Keeper) GetReservationsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetSell(ctx sdk.Context, key string) (types.Sell, error)
- func (k Keeper) GetSellsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) HasChannel(ctx sdk.Context, chainName string, port string) bool
- func (k Keeper) IsProductPresent(ctx sdk.Context, key string) bool
- func (k Keeper) IsReservationPresent(ctx sdk.Context, key string) bool
- func (k Keeper) IsSellPresent(ctx sdk.Context, key string) bool
- func (k Keeper) SetChannel(ctx sdk.Context, chainName string, port string, channel string)
- func (k Keeper) SetOrder(ctx sdk.Context, id uint64, order types.Order)
- func (k Keeper) SetProduct(ctx sdk.Context, key string, product types.Product)
- func (k Keeper) SetReservation(ctx sdk.Context, key string, reservation types.Reservation)
- func (k Keeper) SetSell(ctx sdk.Context, key string, sell types.Sell)
Constants ¶
const ( QueryOrder = "order" QueryProduct = "product" QueryProducts = "products" QuerySell = "sell" QuerySells = "sells" QueryReservation = "reservation" QueryReservations = "reservations" QueryReservationsBySellID = "reservationsBySellID" QueryProductsByOwner = "productsByOwner" )
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier is the module level router for state queries.
Types ¶
type Keeper ¶
type Keeper struct { BankKeeper types.BankKeeper ChannelKeeper types.ChannelKeeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, bankKeeper types.BankKeeper, channelKeeper types.ChannelKeeper, ) Keeper
NewKeeper creates a new band consumer Keeper instance.
func (Keeper) DeleteReservation ¶
DeleteSell deletes the entire Sell metadata struct for a sell
func (Keeper) DeleteSell ¶
DeleteSell deletes the entire Sell metadata struct for a sell
func (Keeper) GetChannel ¶
func (Keeper) GetNextOrderCount ¶
GetNextOrderCount increments and returns the current number of orders. If the global order count is not set, it initializes it with value 0.
func (Keeper) GetOrderCount ¶
GetOrderCount returns the current number of all orders ever exist.
func (Keeper) GetProduct ¶
GetProduct gets the entire Product metadata struct for a name
func (Keeper) GetProductCategory ¶
GetProductCategory gets product description
func (Keeper) GetProductDescription ¶
GetProductDescription gets product description
func (Keeper) GetProductImages ¶
GetProductImages gets product description
func (Keeper) GetProductOwner ¶
GetProductOwner gets product owner
func (Keeper) GetProductTitle ¶
GetProductTitle gets product title
func (Keeper) GetProductsIterator ¶
GetProductsIterator gets an iterator over all product in which the keys are the productID and the values are the product
func (Keeper) GetReservation ¶
GetReservation gets the entire reservation metadata struct for a reservation
func (Keeper) GetReservationsIterator ¶
GetReservationsIterator gets an iterator over all reservations in which the keys are the reservationID and the values are the reservation
func (Keeper) GetSellsIterator ¶
GetSellsIterator gets an iterator over all sell in which the keys are the sellID and the values are the sell
func (Keeper) HasChannel ¶
func (Keeper) IsProductPresent ¶
IsProductPresent checks if the product is present in the store or not
func (Keeper) IsReservationPresent ¶
IsReservationPresent checks if the reservation is present in the store or not
func (Keeper) IsSellPresent ¶
IsSellPresent checks if the sell is present in the store or not
func (Keeper) SetChannel ¶
func (Keeper) SetOrder ¶
SetOrder saves the given order to the store without performing any validation.
func (Keeper) SetProduct ¶
CreateProduct sets the entire Product metadata struct for a product
func (Keeper) SetReservation ¶
SetReservation sets the entire sell metadata struct for a reservation