Documentation
¶
Overview ¶
Package digest provides api features.
Index ¶
- Variables
- func DigestBlock(ctx context.Context, st *cdigest.Database, blk base.BlockMap, ...) error
- func PaymentDesign(db *cdigest.Database, contract string) (*types.Design, base.State, error)
- type AccountInfoValue
- type AccountInfoValueJSONMarshaler
- type BlockSession
- type DepositRecordDoc
- type DesignDoc
- type Digester
- type Handlers
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultColNamePayment = "digest_pmt" DefaultColNamePaymentAccount = "digest_pmt_ac" )
View Source
var ( HandlerPathPaymentDesign = `/payment/{contract:(?i)` + types.REStringAddressString + `}` HandlerPathPaymentAccountInfo = `/payment/{contract:(?i)` + types.REStringAddressString + `}/account/{address:(?i)` + types.REStringAddressString + `}` )
View Source
var (
AccountInfoValueHint = hint.MustNewHint("mitum-payment-account-info-value-v0.0.1")
)
View Source
var DefaultIndexes = cdigest.DefaultIndexes
View Source
var PaymentAccountRecordIndexModels = []mongo.IndexModel{ { Keys: bson.D{ bson.E{Key: "contract", Value: 1}, bson.E{Key: "address", Value: 1}, bson.E{Key: "height", Value: -1}}, Options: options.Index(). SetName(cdigest.IndexPrefix + "payment_contract_address_height"), }, }
View Source
var PaymentIndexModels = []mongo.IndexModel{ { Keys: bson.D{ bson.E{Key: "contract", Value: 1}, bson.E{Key: "height", Value: -1}}, Options: options.Index(). SetName(cdigest.IndexPrefix + "payment_contract_height"), }, }
Functions ¶
func DigestBlock ¶
Types ¶
type AccountInfoValue ¶
type AccountInfoValue struct {
hint.BaseHinter
// contains filtered or unexported fields
}
func AccountInfo ¶
func AccountInfo(db *cdigest.Database, contract, account string) (*AccountInfoValue, error)
func NewAccountInfoValue ¶
func NewAccountInfoValue( setting types.Setting, record types.DepositRecord, ) AccountInfoValue
func (AccountInfoValue) AccountInfo ¶
func (ai AccountInfoValue) AccountInfo() types.Setting
func (AccountInfoValue) AccountRecord ¶
func (ai AccountInfoValue) AccountRecord() types.DepositRecord
func (AccountInfoValue) Hint ¶
func (ai AccountInfoValue) Hint() hint.Hint
func (AccountInfoValue) MarshalJSON ¶
func (ai AccountInfoValue) MarshalJSON() ([]byte, error)
type AccountInfoValueJSONMarshaler ¶
type AccountInfoValueJSONMarshaler struct {
hint.BaseHinter
Setting types.Setting `json:"transfer_setting"`
Record types.DepositRecord `json:"deposit_record"`
}
type BlockSession ¶
func NewBlockSession ¶
func (*BlockSession) Close ¶
func (bs *BlockSession) Close() error
func (*BlockSession) Prepare ¶
func (bs *BlockSession) Prepare() error
type DepositRecordDoc ¶
func NewDepositRecordDoc ¶
func (DepositRecordDoc) MarshalBSON ¶
func (doc DepositRecordDoc) MarshalBSON() ([]byte, error)
type DesignDoc ¶
func NewDesignDoc ¶
NewDesignDoc get the State of TimeStamp Design
func (DesignDoc) MarshalBSON ¶
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.