Documentation
¶
Overview ¶
Package digest provides api features.
Index ¶
- Constants
- Variables
- func ContractDesign(st *cdigest.Database, contract string) (types.Design, base.State, error)
- func ContractDesignFromChainState(db *cdigest.Database, contract string) (base.Address, types.Design, base.State, error)
- func ContractRuntimeFromChainState(db *cdigest.Database, contract string) (base.Address, state.RuntimeStateValue, base.State, bool, error)
- func ContractSnapshotFromChainState(db *cdigest.Database, contract string) (base.Address, state.SnapshotStateValue, base.State, bool, error)
- func DigestBlock(ctx context.Context, st *cdigest.Database, blk base.BlockMap, ...) error
- type BlockSession
- type ContractDesignDoc
- type ContractQueryOutput
- type ContractQueryResponse
- type ContractRuntimeDoc
- type ContractSnapshotDoc
- type Digester
- type Handlers
Constants ¶
View Source
const MaxContractQueryBodyBytes = 128 * 1024
Variables ¶
View Source
var ( DefaultColNameContract = "digest_sc" DefaultColNameContractRuntime = "digest_sc_runtime" DefaultColNameContractSnapshot = "digest_sc_snapshot" )
View Source
var ( HandlerPathContractDesign = `/contract/{contract:(?i)` + ctypes.REStringAddressString + `}` HandlerPathContractQuery = `/contract/{contract:(?i)` + ctypes.REStringAddressString + `}/query` )
View Source
var DefaultIndexes = map[string][]mongo.IndexModel{ DefaultColNameContract: contractDesignIndexModels, DefaultColNameContractRuntime: contractRuntimeIndexModels, DefaultColNameContractSnapshot: contractSnapshotIndexModels, // contains filtered or unexported fields }
Functions ¶
func ContractDesign ¶
Types ¶
type BlockSession ¶
func NewBlockSession ¶
func (*BlockSession) Close ¶
func (bs *BlockSession) Close() error
func (*BlockSession) Prepare ¶
func (bs *BlockSession) Prepare() error
type ContractDesignDoc ¶
func NewContractDesignDoc ¶
func (ContractDesignDoc) MarshalBSON ¶
func (doc ContractDesignDoc) MarshalBSON() ([]byte, error)
type ContractQueryOutput ¶
type ContractQueryOutput struct {
Result interface{} `json:"result"`
Ok *bool `json:"ok,omitempty"`
}
type ContractQueryResponse ¶
type ContractQueryResponse struct {
Contract string `json:"contract"`
Function string `json:"function"`
Engine string `json:"engine"`
ReadOnly bool `json:"read_only"`
Output ContractQueryOutput `json:"output"`
}
type ContractRuntimeDoc ¶
func NewContractRuntimeDoc ¶
func (ContractRuntimeDoc) MarshalBSON ¶
func (doc ContractRuntimeDoc) MarshalBSON() ([]byte, error)
type ContractSnapshotDoc ¶
func NewContractSnapshotDoc ¶
func (ContractSnapshotDoc) MarshalBSON ¶
func (doc ContractSnapshotDoc) MarshalBSON() ([]byte, error)
type Digester ¶
type Digester struct {
sync.RWMutex
*util.ContextDaemon
*logging.Logging
// contains filtered or unexported fields
}
func NewDigester ¶
Click to show internal directories.
Click to hide internal directories.