Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ModuleName is the name of the module ModuleName = "booking" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey is the module name router key RouterKey = ModuleName // QuerierRoute to be used for querierer msgs QuerierRoute = ModuleName )
View Source
const ( TypeBookMsg = "booking" TypeBookCompleteMsg = "book_complete" )
Variables ¶
View Source
var ( ErrAssetDoesNotExist = sdkerrors.New(ModuleName, 1, "asset does not exist") ErrIllegalAssetRate = sdkerrors.New(ModuleName, 2, "asset is negative") ErrAssetAlreadyBooked = sdkerrors.New(ModuleName, 3, "asset is already booked") ErrUnableToGenerateBookID = sdkerrors.New(ModuleName, 4, "unable to generate bookID") ErrInvalidBooking = sdkerrors.New(ModuleName, 5, "booking field values are invalid") ErrNotBookerOfAsset = sdkerrors.New(ModuleName, 6, "Signer didn't booking this booking") ErrAssetNotBooked = sdkerrors.New(ModuleName, 7, "Asset is not booked") ErrBookingIsCompleted = sdkerrors.New(ModuleName, 8, "Booking is completed") ErrUUIDMismatch = sdkerrors.New(ModuleName, 9, "uuid of booking and asset not matched") )
View Source
var ModuleCdc = codec.New()
ModuleCdc is the codec for the module
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type Booking ¶
type Booking struct { BookID string `json:"bookingId"` Booker sdk.AccAddress `json:"renter"` UUID string `json:"uuid"` Duration int64 `json:"duration"` IsCompleted bool `json:"isCompleted` }
func NewBooking ¶
func NewBooking() Booking
func NewBookingFromMsgBook ¶
type MsgBook ¶
type MsgBook struct { Booker sdk.AccAddress `json:"booker"` UUID string `json:"uuid"` Duration int64 `json:"duration"` }
func NewMsgBook ¶
func NewMsgBook(booker sdk.AccAddress, uuid string, duration int64) MsgBook
func (MsgBook) GetSignBytes ¶
func (MsgBook) GetSigners ¶
func (msg MsgBook) GetSigners() []sdk.AccAddress
func (MsgBook) ValidateBasic ¶
type MsgComplete ¶
type MsgComplete struct { Booker sdk.AccAddress `json:"booker"` BookID string `json:"uuid"` }
func NewMsgComplete ¶
func NewMsgComplete(booker sdk.AccAddress, bookid string) MsgComplete
func (MsgComplete) GetSignBytes ¶
func (msg MsgComplete) GetSignBytes() []byte
func (MsgComplete) GetSigners ¶
func (msg MsgComplete) GetSigners() []sdk.AccAddress
func (MsgComplete) Route ¶
func (msg MsgComplete) Route() string
func (MsgComplete) String ¶
func (msg MsgComplete) String() string
func (MsgComplete) Type ¶
func (msg MsgComplete) Type() string
func (MsgComplete) ValidateBasic ¶
func (msg MsgComplete) ValidateBasic() error
type QueryResNames ¶
type QueryResNames []string
QueryResNames Queries Result Payload for a names query
type QueryResResolve ¶
type QueryResResolve struct {
Value string `json:"value"`
}
QueryResResolve Queries Result Payload for a resolve query
Click to show internal directories.
Click to hide internal directories.