Documentation
¶
Index ¶
- Constants
- func OutMembershipKey(topic string) string
- func OutputTopicKey(outpoint *transaction.Outpoint, topic string) string
- func TxMembershipKey(topic string) string
- type BSONBeef
- type BSONOutput
- type MongoStorage
- func (s *MongoStorage) DeleteOutput(ctx context.Context, outpoint *transaction.Outpoint, topic string) error
- func (s *MongoStorage) DoesAppliedTransactionExist(ctx context.Context, tx *overlay.AppliedTransaction) (bool, error)
- func (s *MongoStorage) FindOutput(ctx context.Context, outpoint *transaction.Outpoint, topic *string, ...) (o *engine.Output, err error)
- func (s *MongoStorage) FindOutputs(ctx context.Context, outpoints []*transaction.Outpoint, topic string, ...) ([]*engine.Output, error)
- func (s *MongoStorage) FindOutputsForTransaction(ctx context.Context, txid *chainhash.Hash, includeBEEF bool) ([]*engine.Output, error)
- func (s *MongoStorage) FindUTXOsForTopic(ctx context.Context, topic string, since float64, limit uint32, ...) ([]*engine.Output, error)
- func (s *MongoStorage) GetLastInteraction(ctx context.Context, host string, topic string) (float64, error)
- func (s *MongoStorage) InsertAppliedTransaction(ctx context.Context, tx *overlay.AppliedTransaction) error
- func (s *MongoStorage) InsertOutput(ctx context.Context, utxo *engine.Output) (err error)
- func (s *MongoStorage) MarkUTXOAsSpent(ctx context.Context, outpoint *transaction.Outpoint, topic string, beef []byte) error
- func (s *MongoStorage) MarkUTXOsAsSpent(ctx context.Context, outpoints []*transaction.Outpoint, topic string, ...) error
- func (s *MongoStorage) UpdateConsumedBy(ctx context.Context, outpoint *transaction.Outpoint, topic string, ...) error
- func (s *MongoStorage) UpdateLastInteraction(ctx context.Context, host string, topic string, since float64) error
- func (s *MongoStorage) UpdateOutputBlockHeight(ctx context.Context, outpoint *transaction.Outpoint, topic string, ...) error
- func (s *MongoStorage) UpdateTransactionBEEF(ctx context.Context, txid *chainhash.Hash, beef []byte) error
- type RedisStorage
- func (s *RedisStorage) Close() error
- func (s *RedisStorage) DeleteOutput(ctx context.Context, outpoint *transaction.Outpoint, topic string) error
- func (s *RedisStorage) DoesAppliedTransactionExist(ctx context.Context, tx *overlay.AppliedTransaction) (bool, error)
- func (s *RedisStorage) FindOutput(ctx context.Context, outpoint *transaction.Outpoint, topic *string, ...) (o *engine.Output, err error)
- func (s *RedisStorage) FindOutputs(ctx context.Context, outpoints []*transaction.Outpoint, topic string, ...) ([]*engine.Output, error)
- func (s *RedisStorage) FindOutputsForTransaction(ctx context.Context, txid *chainhash.Hash, includeBEEF bool) ([]*engine.Output, error)
- func (s *RedisStorage) FindUTXOsForTopic(ctx context.Context, topic string, since uint32, includeBEEF bool) ([]*engine.Output, error)
- func (s *RedisStorage) InsertAppliedTransaction(ctx context.Context, tx *overlay.AppliedTransaction) error
- func (s *RedisStorage) InsertOutput(ctx context.Context, utxo *engine.Output) (err error)
- func (s *RedisStorage) MarkUTXOAsSpent(ctx context.Context, outpoint *transaction.Outpoint, topic string, beef []byte) error
- func (s *RedisStorage) MarkUTXOsAsSpent(ctx context.Context, outpoints []*transaction.Outpoint, topic string, ...) error
- func (s *RedisStorage) UpdateConsumedBy(ctx context.Context, outpoint *transaction.Outpoint, topic string, ...) error
- func (s *RedisStorage) UpdateOutputBlockHeight(ctx context.Context, outpoint *transaction.Outpoint, topic string, ...) error
- func (s *RedisStorage) UpdateTransactionBEEF(ctx context.Context, txid *chainhash.Hash, beef []byte) error
Constants ¶
View Source
const SpendsKey = "spends"
Variables ¶
This section is empty.
Functions ¶
func OutMembershipKey ¶
func OutputTopicKey ¶
func OutputTopicKey(outpoint *transaction.Outpoint, topic string) string
func TxMembershipKey ¶
Types ¶
type BSONOutput ¶
type BSONOutput struct { Outpoint string `bson:"outpoint"` Txid string `bson:"txid"` Topic string `bson:"topic"` // Script []byte `bson:"script"` Satoshis uint64 `bson:"satoshis"` Spent bool `bson:"spent"` OutputsConsumed []string `bson:"outputsConsumed"` ConsumedBy []string `bson:"consumedBy"` BlockHeight uint32 `bson:"blockHeight"` BlockIdx uint64 `bson:"blockIdx"` Score float64 `bson:"score"` AncillaryTxids []string `bson:"ancillaryTxids"` AncillaryBeef []byte `bson:"ancillaryBeef"` }
func NewBSONOutput ¶
func NewBSONOutput(o *engine.Output) *BSONOutput
func (*BSONOutput) ToEngineOutput ¶
func (o *BSONOutput) ToEngineOutput() *engine.Output
type MongoStorage ¶
type MongoStorage struct { DB *mongo.Database BeefStore beef.BeefStorage // contains filtered or unexported fields }
func NewMongoStorage ¶
func NewMongoStorage(connString string, dbName string, beefStore beef.BeefStorage, pub publish.Publisher) (*MongoStorage, error)
func (*MongoStorage) DeleteOutput ¶
func (s *MongoStorage) DeleteOutput(ctx context.Context, outpoint *transaction.Outpoint, topic string) error
func (*MongoStorage) DoesAppliedTransactionExist ¶
func (s *MongoStorage) DoesAppliedTransactionExist(ctx context.Context, tx *overlay.AppliedTransaction) (bool, error)
func (*MongoStorage) FindOutput ¶
func (*MongoStorage) FindOutputs ¶
func (*MongoStorage) FindOutputsForTransaction ¶
func (*MongoStorage) FindUTXOsForTopic ¶
func (*MongoStorage) GetLastInteraction ¶
func (*MongoStorage) InsertAppliedTransaction ¶
func (s *MongoStorage) InsertAppliedTransaction(ctx context.Context, tx *overlay.AppliedTransaction) error
func (*MongoStorage) InsertOutput ¶
func (*MongoStorage) MarkUTXOAsSpent ¶
func (s *MongoStorage) MarkUTXOAsSpent(ctx context.Context, outpoint *transaction.Outpoint, topic string, beef []byte) error
func (*MongoStorage) MarkUTXOsAsSpent ¶
func (s *MongoStorage) MarkUTXOsAsSpent(ctx context.Context, outpoints []*transaction.Outpoint, topic string, spendTxid *chainhash.Hash) error
func (*MongoStorage) UpdateConsumedBy ¶
func (s *MongoStorage) UpdateConsumedBy(ctx context.Context, outpoint *transaction.Outpoint, topic string, consumedBy []*transaction.Outpoint) error
func (*MongoStorage) UpdateLastInteraction ¶
func (*MongoStorage) UpdateOutputBlockHeight ¶
func (s *MongoStorage) UpdateOutputBlockHeight(ctx context.Context, outpoint *transaction.Outpoint, topic string, blockHeight uint32, blockIndex uint64, ancelliaryBeef []byte) error
func (*MongoStorage) UpdateTransactionBEEF ¶
type RedisStorage ¶
type RedisStorage struct { DB *redis.Client BeefStore beef.BeefStorage // contains filtered or unexported fields }
func NewRedisStorage ¶
func NewRedisStorage(connString string, beefStore beef.BeefStorage, pub publish.Publisher) (r *RedisStorage, err error)
func (*RedisStorage) Close ¶
func (s *RedisStorage) Close() error
func (*RedisStorage) DeleteOutput ¶
func (s *RedisStorage) DeleteOutput(ctx context.Context, outpoint *transaction.Outpoint, topic string) error
func (*RedisStorage) DoesAppliedTransactionExist ¶
func (s *RedisStorage) DoesAppliedTransactionExist(ctx context.Context, tx *overlay.AppliedTransaction) (bool, error)
func (*RedisStorage) FindOutput ¶
func (*RedisStorage) FindOutputs ¶
func (*RedisStorage) FindOutputsForTransaction ¶
func (*RedisStorage) FindUTXOsForTopic ¶
func (*RedisStorage) InsertAppliedTransaction ¶
func (s *RedisStorage) InsertAppliedTransaction(ctx context.Context, tx *overlay.AppliedTransaction) error
func (*RedisStorage) InsertOutput ¶
func (*RedisStorage) MarkUTXOAsSpent ¶
func (s *RedisStorage) MarkUTXOAsSpent(ctx context.Context, outpoint *transaction.Outpoint, topic string, beef []byte) error
func (*RedisStorage) MarkUTXOsAsSpent ¶
func (s *RedisStorage) MarkUTXOsAsSpent(ctx context.Context, outpoints []*transaction.Outpoint, topic string, spendTxid *chainhash.Hash) error
func (*RedisStorage) UpdateConsumedBy ¶
func (s *RedisStorage) UpdateConsumedBy(ctx context.Context, outpoint *transaction.Outpoint, topic string, consumedBy []*transaction.Outpoint) error
func (*RedisStorage) UpdateOutputBlockHeight ¶
func (s *RedisStorage) UpdateOutputBlockHeight(ctx context.Context, outpoint *transaction.Outpoint, topic string, blockHeight uint32, blockIndex uint64, ancelliaryBeef []byte) error
func (*RedisStorage) UpdateTransactionBEEF ¶
Click to show internal directories.
Click to hide internal directories.