request

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: GPL-3.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook struct {
	// contains filtered or unexported fields
}

Hook inherits from Band app hook to save latest request into SQL database.

func NewHook

func NewHook(cdc *codec.Codec, oracleKeeper keeper.Keeper, connStr string) *Hook

NewHook creates a request hook instance that will be added in Band App.

func (*Hook) AfterBeginBlock

func (h *Hook) AfterBeginBlock(ctx sdk.Context, req abci.RequestBeginBlock, res abci.ResponseBeginBlock)

AfterBeginBlock specify actions need to do after begin block period (app.Hook interface).

func (*Hook) AfterDeliverTx

func (h *Hook) AfterDeliverTx(ctx sdk.Context, req abci.RequestDeliverTx, res abci.ResponseDeliverTx)

AfterDeliverTx specify actions need to do after transaction has been processed (app.Hook interface).

func (*Hook) AfterEndBlock

func (h *Hook) AfterEndBlock(ctx sdk.Context, req abci.RequestEndBlock, res abci.ResponseEndBlock)

AfterEndBlock specify actions need to do after end block period (app.Hook interface).

func (*Hook) AfterInitChain

func (h *Hook) AfterInitChain(ctx sdk.Context, req abci.RequestInitChain, res abci.ResponseInitChain)

AfterInitChain specify actions need to do after chain initialization (app.Hook interface).

func (*Hook) ApplyQuery

func (h *Hook) ApplyQuery(req abci.RequestQuery) (res abci.ResponseQuery, stop bool)

ApplyQuery catch the custom query that matches specific paths (app.Hook interface).

func (*Hook) BeforeCommit

func (h *Hook) BeforeCommit()

BeforeCommit specify actions need to do before commit block (app.Hook interface).

type Request

type Request struct {
	RequestID      types.RequestID      `db:"request_id, primarykey" json:"request_id"`
	OracleScriptID types.OracleScriptID `db:"oracle_script_id" json:"oracle_script_id"`
	Calldata       string               `db:"calldata" json:"calldata"`
	MinCount       uint64               `db:"min_count" json:"min_count"`
	AskCount       uint64               `db:"ask_count" json:"ask_count"`
	ResolveTime    int64                `db:"resolve_time" json:"resolve_time"`
}

Jump to

Keyboard shortcuts

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