digest

package
v3.0.0-alpha.0...-b49f957 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: GPL-3.0 Imports: 51 Imported by: 24

Documentation

Overview

Package digest provides api features.

Index

Constants

View Source
const (
	PNameDigester      = ps.Name("digester")
	PNameStartDigester = ps.Name("start_digester")
)

Variables

View Source
var (
	ContextValueDigestDesign    util.ContextKey = "digest_design"
	ContextValueSequencerDesign util.ContextKey = "sequencer_design"
	ContextValueDigestDatabase  util.ContextKey = "digest_database"

	ContextValueDigester     util.ContextKey = "digester"
	ContextValueLocalNetwork util.ContextKey = "local_network"
)
View Source
var (
	DefaultColNameAccount         = "digest_ac"
	DefaultColNameContractAccount = "digest_ca"
	DefaultColNameBalance         = "digest_bl"
	DefaultColNameCurrency        = "digest_cr"
	DefaultColNameOperation       = "digest_op"
	DefaultColNameBlock           = "digest_bm"
)
View Source
var (
	DefaultColNameDIDRegistry = "digest_did_registry"
	DefaultColNameDIDData     = "digest_did_registry_data"
	DefaultColNameDIDDocument = "digest_did_registry_document"
)
View Source
var (
	DefaultDigestAPICache *url.URL
	DefaultDigestAPIBind  string
)
View Source
var (
	DefaultDigestURL  = "https://localhost:4430"
	DefaultDigestBind = "https://0.0.0.0:4430"
)
View Source
var (
	ErrBadRequest      = util.NewIDError("bad request")
	UnknownProblemJSON []byte
)
View Source
var AccountIndexModels = []mongo.IndexModel{
	{
		Keys: bson.D{bson.E{Key: "address", Value: 1}, bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName("mitum_digest_account"),
	},
	{
		Keys: bson.D{bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName("mitum_digest_account_height"),
	},
	{
		Keys: bson.D{bson.E{Key: "pubs", Value: 1}, bson.E{Key: "height", Value: 1}, bson.E{Key: "address", Value: 1}},
		Options: options.Index().
			SetName("mitum_digest_account_publiskeys"),
	},
}
View Source
var (
	AccountValueHint = hint.MustNewHint("mitum-currency-account-value-v0.0.1")
)
View Source
var BalanceIndexModels = []mongo.IndexModel{
	{
		Keys: bson.D{bson.E{Key: "address", Value: 1}, bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName("mitum_digest_balance"),
	},
	{
		Keys: bson.D{
			bson.E{Key: "address", Value: 1},
			bson.E{Key: "currency", Value: 1},
			bson.E{Key: "height", Value: -1},
		},
		Options: options.Index().
			SetName("mitum_digest_balance_currency"),
	},
}
View Source
var BlockIndexModels = []mongo.IndexModel{
	{
		Keys: bson.D{bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName("mitum_digest_block_height"),
	},
}
View Source
var DefaultIndexes = map[string][]mongo.IndexModel{
	DefaultColNameBlock:       BlockIndexModels,
	DefaultColNameAccount:     AccountIndexModels,
	DefaultColNameBalance:     BalanceIndexModels,
	DefaultColNameOperation:   OperationIndexModels,
	DefaultColNameDIDRegistry: DidRegistryIndexModels,
	DefaultColNameDIDData:     DidRegistryDataIndexModels,
	DefaultColNameDIDDocument: DidRegistryDocumentIndexModels,
}
View Source
var DidRegistryDataIndexModels = []mongo.IndexModel{
	{
		Keys: bson.D{
			bson.E{Key: "contract", Value: 1},
			bson.E{Key: "method_specific_id", Value: 1},
			bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName(IndexPrefix + "did_registry_data_contract_publicKey_height"),
	},
}
View Source
var DidRegistryDocumentIndexModels = []mongo.IndexModel{
	{
		Keys: bson.D{
			bson.E{Key: "contract", Value: 1},
			bson.E{Key: "did", Value: 1},
			bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName(IndexPrefix + "did_registry_document_contract_did_height"),
	},
}
View Source
var DidRegistryIndexModels = []mongo.IndexModel{
	{
		Keys: bson.D{
			bson.E{Key: "contract", Value: 1},
			bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName(IndexPrefix + "did_registry_contract_height"),
	},
}
View Source
var DigestStorageLastBlockKey = "digest_last_block"
View Source
var IndexPrefix = "mitum_digest_"
View Source
var (
	ManifestValueHint = hint.MustNewHint("mitum-currency-manifest-value-v0.0.1")
)
View Source
var OperationIndexModels = []mongo.IndexModel{
	{
		Keys: bson.D{bson.E{Key: "addresses", Value: 1}, bson.E{Key: "height", Value: 1}, bson.E{Key: "index", Value: 1}},
		Options: options.Index().
			SetName("mitum_digest_account_operation"),
	},
	{
		Keys: bson.D{bson.E{Key: "height", Value: 1}, bson.E{Key: "index", Value: 1}},
		Options: options.Index().
			SetName("mitum_digest_operation"),
	},
	{
		Keys: bson.D{bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName("mitum_digest_operation_height"),
	},
}
View Source
var (
	OperationValueHint = hint.MustNewHint("mitum-currency-operation-value-v0.0.1")
)
View Source
var (
	PNameDigesterDataBase = ps.Name("digester_database")
)

Functions

func DIDData

func DIDData(db *Database, contract, key string) (*types.Data, base.State, error)

func DIDDesign

func DIDDesign(st *Database, contract string) (types.Design, base.State, error)

func DIDDocument

func DIDDocument(db *Database, contract, key string) (*types.DIDDocument, base.State, error)

func DigestFollowup

func DigestFollowup(ctx context.Context, height base.Height) error

func GenerateED25519PrivateKey

func GenerateED25519PrivateKey() (ed25519.PrivateKey, error)

func GenerateTLSCerts

func GenerateTLSCerts(host string, key ed25519.PrivateKey) ([]tls.Certificate, error)

func GenerateTLSCertsPair

func GenerateTLSCertsPair(host string, key ed25519.PrivateKey) (*pem.Block, *pem.Block, error)

func IsAccountState

func IsAccountState(st base.State) (types.Account, bool, error)

func IsBalanceState

func IsBalanceState(st base.State) (types.Amount, bool, error)

func LoadBalance

func LoadBalance(decoder func(interface{}) error, encs *encoder.Encoders) (base.State, error)

func LoadContractAccountStatus

func LoadContractAccountStatus(decoder func(interface{}) error, encs *encoder.Encoders) (base.State, error)

func LoadCurrency

func LoadCurrency(decoder func(interface{}) error, encs *encoder.Encoders) (base.State, error)

func LoadManifest

func LoadManifest(decoder func(interface{}) error, encs *encoder.Encoders) (
	base.Manifest, *mongodbst.OperationItemInfo, string, string, uint64, error,
)

func LoadOperationHash

func LoadOperationHash(decoder func(interface{}) error) (util.Hash, error)

func LoadState

func LoadState(decoder func(interface{}) error, encs *encoder.Encoders) (base.State, error)

func PdigesterFollowUp

func PdigesterFollowUp(ctx context.Context) (context.Context, error)

func PrepareAccounts

func PrepareAccounts(bs *BlockSession, st base.State) (string, []mongo.WriteModel, error)

func PrepareCurrencies

func PrepareCurrencies(bs *BlockSession, st base.State) (string, []mongo.WriteModel, error)

func PrepareDIDRegistry

func PrepareDIDRegistry(bs *BlockSession, st base.State) (string, []mongo.WriteModel, error)

func ProcessDigester

func ProcessDigester(ctx context.Context) (context.Context, error)

func ProcessDigesterDatabase

func ProcessDigesterDatabase(ctx context.Context) (context.Context, error)

func ProcessStartDigester

func ProcessStartDigester(ctx context.Context) (context.Context, error)

Types

type AccountDoc

type AccountDoc struct {
	mongodbst.BaseDoc
	// contains filtered or unexported fields
}

func NewAccountDoc

func NewAccountDoc(rs AccountValue, enc encoder.Encoder) (AccountDoc, error)

func (AccountDoc) MarshalBSON

func (doc AccountDoc) MarshalBSON() ([]byte, error)

type AccountValue

type AccountValue struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func LoadAccountValue

func LoadAccountValue(decoder func(interface{}) error, encs *encoder.Encoders) (AccountValue, error)

func NewAccountValue

func NewAccountValue(st base.State) (AccountValue, error)

func (AccountValue) Account

func (va AccountValue) Account() types.Account

func (AccountValue) Balance

func (va AccountValue) Balance() []types.Amount

func (AccountValue) ContractAccountStatus

func (va AccountValue) ContractAccountStatus() types.ContractAccountStatus

func (*AccountValue) DecodeBSON

func (va *AccountValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*AccountValue) DecodeJSON

func (va *AccountValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (AccountValue) Height

func (va AccountValue) Height() base.Height

func (AccountValue) IsZeroValue

func (va AccountValue) IsZeroValue() bool

func (AccountValue) MarshalBSON

func (va AccountValue) MarshalBSON() ([]byte, error)

func (AccountValue) MarshalJSON

func (va AccountValue) MarshalJSON() ([]byte, error)

func (AccountValue) SetBalance

func (va AccountValue) SetBalance(balance []types.Amount) AccountValue

func (AccountValue) SetContractAccountStatus

func (va AccountValue) SetContractAccountStatus(status types.ContractAccountStatus) AccountValue

func (AccountValue) SetHeight

func (va AccountValue) SetHeight(height base.Height) AccountValue

type AccountValueBSONUnmarshaler

type AccountValueBSONUnmarshaler struct {
	Hint                  string      `bson:"_hint"`
	Account               bson.Raw    `bson:"ac"`
	Balance               bson.Raw    `bson:"balance"`
	Height                base.Height `bson:"height"`
	ContractAccountStatus bson.Raw    `bson:"contract_account_status"`
}

type AccountValueJSONMarshaler

type AccountValueJSONMarshaler struct {
	hint.BaseHinter
	types.AccountJSONMarshaler
	Balance               []types.Amount              `json:"balance,omitempty"`
	Height                base.Height                 `json:"height"`
	ContractAccountStatus types.ContractAccountStatus `json:"contract_account_status"`
}

type AccountValueJSONUnmarshaler

type AccountValueJSONUnmarshaler struct {
	Hint                  hint.Hint
	Balance               json.RawMessage `json:"balance"`
	Height                base.Height     `json:"height"`
	ContractAccountStatus json.RawMessage `json:"contract_account_status"`
}

type BalanceDoc

type BalanceDoc struct {
	mongodbst.BaseDoc
	// contains filtered or unexported fields
}

func NewBalanceDoc

func NewBalanceDoc(st base.State, enc encoder.Encoder) (BalanceDoc, string, error)

NewBalanceDoc gets the State of Amount

func (BalanceDoc) MarshalBSON

func (doc BalanceDoc) MarshalBSON() ([]byte, error)

type BlockSession

type BlockSession struct {
	sync.RWMutex

	WriteModels map[string][]mongo.WriteModel
	PrepareFunc []BlockSessionPrepareFunc
	// contains filtered or unexported fields
}

func NewBlockSession

func NewBlockSession(
	st *Database, blk base.BlockMap, ops []base.Operation, opsTree fixedtree.Tree,
	sts []base.State, proposal base.ProposalSignFact, vs string) (
	*BlockSession, error,
)

func (*BlockSession) BlockMap

func (bs *BlockSession) BlockMap() base.BlockMap

func (*BlockSession) Close

func (bs *BlockSession) Close() error

func (*BlockSession) Commit

func (bs *BlockSession) Commit(ctx context.Context) error

func (*BlockSession) Database

func (bs *BlockSession) Database() *Database

func (*BlockSession) Prepare

func (bs *BlockSession) Prepare() error

type BlockSessionPrepareFunc

type BlockSessionPrepareFunc func(*BlockSession, base.State) (string, []mongo.WriteModel, error)

type BlockSessioner

type BlockSessioner interface {
	Prepare() error
	Commit(context.Context) error
	Close() error
}

type ContractAccountStatusDoc

type ContractAccountStatusDoc struct {
	mongodbst.BaseDoc
	// contains filtered or unexported fields
}

func NewContractAccountStatusDoc

func NewContractAccountStatusDoc(st base.State, enc encoder.Encoder) (ContractAccountStatusDoc, error)

func (ContractAccountStatusDoc) MarshalBSON

func (doc ContractAccountStatusDoc) MarshalBSON() ([]byte, error)

type CurrencyDoc

type CurrencyDoc struct {
	mongodbst.BaseDoc
	// contains filtered or unexported fields
}

func NewCurrencyDoc

func NewCurrencyDoc(st base.State, enc encoder.Encoder) (CurrencyDoc, error)

func (CurrencyDoc) MarshalBSON

func (doc CurrencyDoc) MarshalBSON() ([]byte, error)

type DIDDataDoc

type DIDDataDoc struct {
	mongodb.BaseDoc
	// contains filtered or unexported fields
}

func NewDIDDataDoc

func NewDIDDataDoc(st base.State, enc encoder.Encoder) (DIDDataDoc, error)

func (DIDDataDoc) MarshalBSON

func (doc DIDDataDoc) MarshalBSON() ([]byte, error)

type DIDDocumentDoc

type DIDDocumentDoc struct {
	mongodb.BaseDoc
	// contains filtered or unexported fields
}

func NewDIDDocumentDoc

func NewDIDDocumentDoc(st base.State, enc encoder.Encoder) (DIDDocumentDoc, error)

func (DIDDocumentDoc) MarshalBSON

func (doc DIDDocumentDoc) MarshalBSON() ([]byte, error)

type DIDRegistryDesignDoc

type DIDRegistryDesignDoc struct {
	mongodb.BaseDoc
	// contains filtered or unexported fields
}

func NewDIDRegistryDesignDoc

func NewDIDRegistryDesignDoc(st base.State, enc encoder.Encoder) (DIDRegistryDesignDoc, error)

NewDIDRegistryDesignDoc get the State of DID Design

func (DIDRegistryDesignDoc) MarshalBSON

func (doc DIDRegistryDesignDoc) MarshalBSON() ([]byte, error)

type Database

type Database struct {
	sync.RWMutex
	*logging.Logging
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(mitumDB *isaacdatabase.Center, digestDB *digestmongo.Database) (*Database, error)

func NewReadonlyDatabase

func NewReadonlyDatabase(mitumDB *isaacdatabase.Center, digestDB *digestmongo.Database) (*Database, error)

func (*Database) Account

func (db *Database) Account(a base.Address) (AccountValue, bool, error)

Account returns AccountValue.

func (*Database) AccountsByPublickey

func (db *Database) AccountsByPublickey(
	pub base.Publickey,
	loadBalance bool,
	offsetHeight base.Height,
	offsetAddress string,
	limit int64,
	callback func(AccountValue) (bool, error),
) error

AccountsByPublickey finds Accounts, which are related with the given Publickey. * offset: returns from next of offset, usually it is "<height>,<address>".

func (*Database) Clean

func (db *Database) Clean() error

func (*Database) CleanByHeight

func (db *Database) CleanByHeight(ctx context.Context, height base.Height) error

func (*Database) CleanByHeightColName

func (db *Database) CleanByHeightColName(
	ctx context.Context,
	height base.Height,
	colName string,
	filters ...bson.D,
) error

func (*Database) Close

func (db *Database) Close() error

func (*Database) CreateIndex

func (db *Database) CreateIndex(dIndexes map[string][]mongo.IndexModel) error

func (*Database) Currencies

func (db *Database) Currencies() ([]string, error)

func (*Database) Currency

func (db *Database) Currency(cid string) (types.CurrencyDesign, base.State, error)

func (*Database) Encoder

func (db *Database) Encoder() encoder.Encoder

func (*Database) Encoders

func (db *Database) Encoders() *encoder.Encoders

func (*Database) Initialize

func (db *Database) Initialize(dIndexes map[string][]mongo.IndexModel) error

func (*Database) LastBlock

func (db *Database) LastBlock() base.Height

func (*Database) ManifestByHash

func (db *Database) ManifestByHash(hash util.Hash) (
	base.Manifest, *digestmongo.OperationItemInfo, string, string, uint64, error,
)

func (*Database) ManifestByHeight

func (db *Database) ManifestByHeight(height base.Height) (
	base.Manifest, *digestmongo.OperationItemInfo, string, string, uint64, error,
)

func (*Database) Manifests

func (db *Database) Manifests(
	load bool,
	reverse bool,
	offset base.Height,
	limit int64,
	callback func(base.Height, base.Manifest, *digestmongo.OperationItemInfo, string, string, uint64) (bool, error),
) error

Manifests returns block.Manifests by order and height.

func (*Database) MongoClient

func (db *Database) MongoClient() *digestmongo.Client

func (*Database) New

func (db *Database) New() (*Database, error)

func (*Database) Operation

func (db *Database) Operation(
	h util.Hash,
	load bool,
) (OperationValue, bool, error)

Operation returns operation.Operation. If load is false, just returns nil Operation.

func (*Database) Operations

func (db *Database) Operations(
	filter bson.M,
	load bool,
	reverse bool,
	limit int64,
	callback func(util.Hash, OperationValue, int64) (bool, error),
) error

Operations returns operation.Operations by order, height and index.

func (*Database) OperationsByAddress

func (db *Database) OperationsByAddress(
	address base.Address,
	load,
	reverse bool,
	offset string,
	limit int64,
	callback func(util.Hash, OperationValue) (bool, error),
) error

OperationsByAddress finds the operation.Operations, which are related with the given Address. The returned valuehash.Hash is the operation.Operation.Fact().Hash(). * load:if true, load operation.Operation and returns it. If not, just hash will be returned * reverse: order by height; if true, higher height will be returned first. * offset: returns from next of offset, usually it is combination of "<height>,<fact>".

func (*Database) OperationsByHash

func (db *Database) OperationsByHash(
	filter bson.M,
	callback func(util.Hash, OperationValue, int64) (bool, error),
) error

OperationsByHash returns operation.Operations by order, height and index.

func (*Database) Readonly

func (db *Database) Readonly() bool

func (*Database) SetEncoder

func (db *Database) SetEncoder(enc encoder.Encoder)

func (*Database) SetEncoders

func (db *Database) SetEncoders(encs *encoder.Encoders)

func (*Database) SetLastBlock

func (db *Database) SetLastBlock(height base.Height) error

func (*Database) TopHeightByPublickey

func (db *Database) TopHeightByPublickey(pub base.Publickey) (base.Height, error)

type DigestError

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

func NewDigestError

func NewDigestError(err error, height base.Height) DigestError

func (DigestError) Error

func (de DigestError) Error() string

func (DigestError) Height

func (de DigestError) Height() base.Height

func (DigestError) IsError

func (de DigestError) IsError() bool

type Digester

type Digester struct {
	sync.RWMutex
	*util.ContextDaemon
	*logging.Logging

	PrepareFunc []BlockSessionPrepareFunc
	// contains filtered or unexported fields
}

func NewDigester

func NewDigester(
	st *Database,
	root string,
	sourceReaders *isaac.BlockItemReaders,
	fromRemotes isaac.RemotesBlockItemReadFunc,
	networkID base.NetworkID,
	vs string,
	errChan chan error,
) *Digester

func (*Digester) Database

func (di *Digester) Database() *Database

func (*Digester) Digest

func (di *Digester) Digest(blocks []base.BlockMap)

func (*Digester) DigestBlockMap

func (di *Digester) DigestBlockMap(ctx context.Context, blk base.Height) error

type ExpendedOperationValueJSONMarshaler

type ExpendedOperationValueJSONMarshaler struct {
	hint.BaseHinter
	Hash        util.Hash                  `json:"hash"`
	Operation   ExpendedOperationMarshaler `json:"operation"`
	Height      base.Height                `json:"height"`
	ConfirmedAt localtime.Time             `json:"confirmed_at"`
	Reason      string                     `json:"reason"`
	InState     bool                       `json:"in_state"`
	Index       uint64                     `json:"index"`
}

type LocalNetwork

type LocalNetwork struct {
	Bind        *string `yaml:"bind"`
	URL         *string `yaml:"url"`
	CertKeyFile *string `yaml:"cert-key,omitempty"`
	CertFile    *string `yaml:"cert,omitempty"`
	Cache       *string `yaml:",omitempty"`
	SealCache   *string `yaml:"seal-cache,omitempty"`
}

func (LocalNetwork) Set

type ManifestDoc

type ManifestDoc struct {
	mongodbst.BaseDoc
	// contains filtered or unexported fields
}

func NewManifestDoc

func NewManifestDoc(
	manifest base.Manifest,
	enc encoder.Encoder,
	height base.Height,
	operations mongodbst.OperationItemInfo,
	confirmedAt time.Time,
	proposer base.Address,
	round base.Round,
	gitInfo string,
) (ManifestDoc, error)

func (ManifestDoc) MarshalBSON

func (doc ManifestDoc) MarshalBSON() ([]byte, error)

type ManifestValue

type ManifestValue struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewManifestValue

func NewManifestValue(
	manifest base.Manifest,
	height base.Height,
	confirmedAt time.Time,
) ManifestValue

func (ManifestValue) ConfirmedAt

func (va ManifestValue) ConfirmedAt() time.Time

func (ManifestValue) Height

func (va ManifestValue) Height() base.Height

func (ManifestValue) Hint

func (ManifestValue) Hint() hint.Hint

func (ManifestValue) Manifest

func (va ManifestValue) Manifest() base.Manifest

type NodeInfoHandler

type NodeInfoHandler func() (isaacnetwork.NodeInfo, error)

type NodeMetricHandler

type NodeMetricHandler func() (isaacnetwork.NodeMetrics, error)

type OperationDoc

type OperationDoc struct {
	mongodbst.BaseDoc
	// contains filtered or unexported fields
}

func NewOperationDoc

func NewOperationDoc(
	op base.Operation,
	enc encoder.Encoder,
	height base.Height,
	confirmedAt time.Time,
	inState bool,
	reason string,
	index uint64,
) (OperationDoc, error)

func (OperationDoc) MarshalBSON

func (doc OperationDoc) MarshalBSON() ([]byte, error)

type OperationValue

type OperationValue struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func LoadOperation

func LoadOperation(decoder func(interface{}) error, encs *encoder.Encoders) (OperationValue, error)

func NewOperationValue

func NewOperationValue(
	op base.Operation,
	height base.Height,
	confirmedAt time.Time,
	inState bool,
	reason string,
	index uint64,
) OperationValue

func (OperationValue) ConfirmedAt

func (va OperationValue) ConfirmedAt() time.Time

func (*OperationValue) DecodeBSON

func (va *OperationValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (OperationValue) Height

func (va OperationValue) Height() base.Height

func (OperationValue) Hint

func (OperationValue) Hint() hint.Hint

func (OperationValue) InState

func (va OperationValue) InState() bool

func (OperationValue) Index

func (va OperationValue) Index() uint64

Index indicates the index number of Operation in OperationTree of block.

func (OperationValue) IsZeroValue

func (va OperationValue) IsZeroValue() bool

func (OperationValue) MarshalBSON

func (va OperationValue) MarshalBSON() ([]byte, error)

func (OperationValue) MarshalJSON

func (va OperationValue) MarshalJSON() ([]byte, error)

func (OperationValue) Operation

func (va OperationValue) Operation() base.Operation

func (OperationValue) Reason

func (va OperationValue) Reason() string

type OperationValueBSONUnmarshaler

type OperationValueBSONUnmarshaler struct {
	Hint        string      `bson:"_hint"`
	OP          bson.Raw    `bson:"op"`
	Height      base.Height `bson:"height"`
	ConfirmedAt time.Time   `bson:"confirmed_at"`
	InState     bool        `bson:"in_state"`
	RS          string      `bson:"reason"`
	Index       uint64      `bson:"index"`
}

type OperationValueJSONMarshaler

type OperationValueJSONMarshaler struct {
	hint.BaseHinter
	Hash        util.Hash                         `json:"hash"`
	Operation   common.BaseOperationJSONMarshaler `json:"operation"`
	Height      base.Height                       `json:"height"`
	ConfirmedAt localtime.Time                    `json:"confirmed_at"`
	Reason      string                            `json:"reason"`
	InState     bool                              `json:"in_state"`
	Index       uint64                            `json:"index"`
}

type YamlDigestDesign

type YamlDigestDesign struct {
	NetworkYAML  *LocalNetwork         `yaml:"network,omitempty"`
	CacheYAML    *string               `yaml:"cache,omitempty"`
	DatabaseYAML *config.DatabaseYAML  `yaml:"database"`
	ConnInfo     []quicstream.ConnInfo `yaml:"conn_info,omitempty"`
	Digest       bool                  `yaml:"digest"`
	// contains filtered or unexported fields
}

func (*YamlDigestDesign) Cache

func (d *YamlDigestDesign) Cache() *url.URL

func (*YamlDigestDesign) Database

func (d *YamlDigestDesign) Database() config.BaseDatabase

func (YamlDigestDesign) Equal

func (YamlDigestDesign) MarshalZerologObject

func (d YamlDigestDesign) MarshalZerologObject(e *zerolog.Event)

func (*YamlDigestDesign) Network

func (d *YamlDigestDesign) Network() config.LocalNetwork

func (*YamlDigestDesign) Set

Directories

Path Synopsis
Package cache provides caching.
Package cache provides caching.

Jump to

Keyboard shortcuts

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