query

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPath = errors.New("query: invalid path")
	ErrStateValue  = errors.New("query: invalid state value")
)

Functions

func LeasePath

func LeasePath(id types.LeaseID) string

LeasePath return lease path of given lease id for queries

func NewQuerier

func NewQuerier(keeper keeper.Keeper) sdk.Querier

NewQuerier creates and returns a new market querier instance

func OrderPath

func OrderPath(id types.OrderID) string

OrderPath return order path of given order id for queries

func ParseLeasePath added in v0.7.3

func ParseLeasePath(parts []string) (types.LeaseID, error)

parseLeasePath returns leaseID details with provided queries, and return error if occurred due to wrong query

Types

type Bid

type Bid types.Bid

Bid type

func (Bid) String

func (obj Bid) String() string

type BidFilters added in v0.7.3

type BidFilters struct {
	Owner sdk.AccAddress
	// State flag value given
	StateFlagVal string
	// Actual state value decoded from BidStateMap
	State types.BidState
}

BidFilters defines flags for bid list filter

func (BidFilters) Accept added in v0.7.3

func (f BidFilters) Accept(obj types.Bid, isValidState bool) bool

Accept returns true if object matches filter requirements

type Bids

type Bids []Bid

Bids - Slice of Bid Struct

func (Bids) String

func (obj Bids) String() string

type Client

type Client interface {
	Orders(filters OrderFilters) (Orders, error)
	Order(id types.OrderID) (Order, error)
	Bids(filters BidFilters) (Bids, error)
	Bid(id types.BidID) (Bid, error)
	Leases(filters LeaseFilters) (Leases, error)
	Lease(id types.LeaseID) (Lease, error)
}

Client interface

func NewClient

func NewClient(ctx context.CLIContext, key string) Client

NewClient creates a client instance with provided context and key

type Lease

type Lease types.Lease

Lease type

func (Lease) String

func (obj Lease) String() string

type LeaseFilters added in v0.7.3

type LeaseFilters struct {
	Owner sdk.AccAddress
	// State flag value given
	StateFlagVal string
	// Actual state value decoded from LeaseStateMap
	State types.LeaseState
}

LeaseFilters defines flags for lease list filter

func (LeaseFilters) Accept added in v0.7.3

func (f LeaseFilters) Accept(obj types.Lease, isValidState bool) bool

Accept returns true if object matches filter requirements

type Leases

type Leases []Lease

Leases - Slice of Lease Struct

func (Leases) String

func (obj Leases) String() string

type Order

type Order types.Order

Order type

func (Order) String

func (obj Order) String() string

type OrderFilters added in v0.7.3

type OrderFilters struct {
	Owner sdk.AccAddress
	// State flag value given
	StateFlagVal string
	// Actual state value decoded from OrderStateMap
	State types.OrderState
}

OrderFilters defines flags for order list filter

func (OrderFilters) Accept added in v0.7.3

func (f OrderFilters) Accept(obj types.Order, isValidState bool) bool

Accept returns true if object matches filter requirements

type Orders

type Orders []Order

Orders - Slice of Order Struct

func (Orders) String

func (obj Orders) String() string

type RawClient

type RawClient interface {
	Orders(filters OrderFilters) ([]byte, error)
	Order(id types.OrderID) ([]byte, error)
	Bids(filters BidFilters) ([]byte, error)
	Bid(id types.BidID) ([]byte, error)
	Leases(filters LeaseFilters) ([]byte, error)
	Lease(id types.LeaseID) ([]byte, error)
}

RawClient interface

func NewRawClient

func NewRawClient(ctx context.CLIContext, key string) RawClient

NewRawClient creates a raw client instance with provided context and key

Jump to

Keyboard shortcuts

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