persistence

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 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

View Source
var ConfirmationFilters = &ffapi.QueryFields{
	"sequence":    &ffapi.Int64Field{},
	"id":          &ffapi.UUIDField{},
	"transaction": &ffapi.StringField{},
	"blocknumber": &ffapi.Int64Field{},
	"blockhash":   &ffapi.StringField{},
	"parenthash":  &ffapi.StringField{},
}
View Source
var EventStreamFilters = &ffapi.QueryFields{
	"sequence":            &ffapi.Int64Field{},
	"id":                  &ffapi.UUIDField{},
	"name":                &ffapi.StringField{},
	"created":             &ffapi.TimeField{},
	"updated":             &ffapi.TimeField{},
	"suspended":           &ffapi.BoolField{},
	"type":                &ffapi.StringField{},
	"errorhandling":       &ffapi.StringField{},
	"batchsize":           &ffapi.Int64Field{},
	"batchtimeout":        &ffapi.Int64Field{},
	"retrytimeout":        &ffapi.Int64Field{},
	"blockedretrytimeout": &ffapi.Int64Field{},
	"webhook":             &ffapi.JSONField{},
	"websocket":           &ffapi.JSONField{},
}
View Source
var ListenerFilters = &ffapi.QueryFields{
	"sequence":  &ffapi.Int64Field{},
	"id":        &ffapi.UUIDField{},
	"name":      &ffapi.StringField{},
	"created":   &ffapi.TimeField{},
	"updated":   &ffapi.TimeField{},
	"streamid":  &ffapi.UUIDField{},
	"filters":   &ffapi.JSONField{},
	"options":   &ffapi.JSONField{},
	"signature": &ffapi.StringField{},
	"fromblock": &ffapi.StringField{},
}
View Source
var ReceiptFilters = &ffapi.QueryFields{
	"sequence":         &ffapi.Int64Field{},
	"transaction":      &ffapi.StringField{},
	"created":          &ffapi.TimeField{},
	"updated":          &ffapi.TimeField{},
	"blocknumber":      &ffapi.Int64Field{},
	"transactionindex": &ffapi.BigIntField{},
	"blockhash":        &ffapi.StringField{},
	"success":          &ffapi.BoolField{},
	"protocolid":       &ffapi.StringField{},
	"extrainfo":        &ffapi.JSONField{},
	"contractlocation": &ffapi.JSONField{},
}
View Source
var TXHistoryFilters = &ffapi.QueryFields{
	"sequence":       &ffapi.Int64Field{},
	"id":             &ffapi.UUIDField{},
	"transaction":    &ffapi.StringField{},
	"time":           &ffapi.TimeField{},
	"lastoccurrence": &ffapi.TimeField{},
	"substatus":      &ffapi.StringField{},
	"action":         &ffapi.StringField{},
	"occurrences":    &ffapi.Int64Field{},
	"lasterror":      &ffapi.JSONField{},
	"lasterrortime":  &ffapi.TimeField{},
	"lastinfo":       &ffapi.JSONField{},
}
View Source
var TransactionFilters = &ffapi.QueryFields{
	"sequence":        &ffapi.Int64Field{},
	"id":              &ffapi.StringField{},
	"created":         &ffapi.TimeField{},
	"updated":         &ffapi.TimeField{},
	"status":          &ffapi.StringField{},
	"deleterequested": &ffapi.TimeField{},
	"from":            &ffapi.StringField{},
	"to":              &ffapi.StringField{},
	"nonce":           &ffapi.BigIntField{},
	"gas":             &ffapi.BigIntField{},
	"value":           &ffapi.BigIntField{},
	"gasprice":        &ffapi.JSONField{},
	"transactiondata": &ffapi.StringField{},
	"transactionhash": &ffapi.StringField{},
	"policyinfo":      &ffapi.JSONField{},
	"firstsubmit":     &ffapi.TimeField{},
	"lastsubmit":      &ffapi.TimeField{},
	"errormessage":    &ffapi.StringField{},
}

Functions

func JSONOrString

func JSONOrString(value *fftypes.JSONAny) *fftypes.JSONAny

Takes a string that might be valid JSON, and returns valid JSON that is either: a) The original JSON if it is valid b) An escaped string

Types

type CheckpointPersistence

type CheckpointPersistence interface {
	WriteCheckpoint(ctx context.Context, checkpoint *apitypes.EventStreamCheckpoint) error
	GetCheckpoint(ctx context.Context, streamID *fftypes.UUID) (*apitypes.EventStreamCheckpoint, error)
	DeleteCheckpoint(ctx context.Context, streamID *fftypes.UUID) error
}

type EventStreamPersistence

type EventStreamPersistence interface {
	ListStreamsByCreateTime(ctx context.Context, after *fftypes.UUID, limit int, dir txhandler.SortDirection) ([]*apitypes.EventStream, error) // reverse insertion order
	GetStream(ctx context.Context, streamID *fftypes.UUID) (*apitypes.EventStream, error)
	WriteStream(ctx context.Context, spec *apitypes.EventStream) error
	DeleteStream(ctx context.Context, streamID *fftypes.UUID) error
}

type ListenerPersistence

type ListenerPersistence interface {
	ListListenersByCreateTime(ctx context.Context, after *fftypes.UUID, limit int, dir txhandler.SortDirection) ([]*apitypes.Listener, error) // reverse insertion
	ListStreamListenersByCreateTime(ctx context.Context, after *fftypes.UUID, limit int, dir txhandler.SortDirection, streamID *fftypes.UUID) ([]*apitypes.Listener, error)
	GetListener(ctx context.Context, listenerID *fftypes.UUID) (*apitypes.Listener, error)
	WriteListener(ctx context.Context, spec *apitypes.Listener) error
	DeleteListener(ctx context.Context, listenerID *fftypes.UUID) error
}

type Persistence

type Persistence interface {
	EventStreamPersistence
	CheckpointPersistence
	ListenerPersistence
	TransactionPersistence
	TransactionHistoryPersistence

	RichQuery() RichQuery                           // panics if not supported
	TransactionCompletions() TransactionCompletions // panics if not supported
	Close(ctx context.Context)                      // close function is controlled by the manager
}

Persistence interface contains all the functions a persistence instance needs to implement. Sub set of functions are grouped into sub interfaces to provide a clear view of what persistent functions will be made available for each sub components to use after the persistent instance is initialized by the manager.

type RichQuery

type RichQuery interface {
	txhandler.RichQuery
}

type TransactionCompletions

type TransactionCompletions interface {
	txhandler.TransactionCompletions
}

type TransactionHistoryPersistence

type TransactionHistoryPersistence interface {
	txhandler.TransactionHistoryPersistence
}

type TransactionPersistence

type TransactionPersistence interface {
	txhandler.TransactionPersistence
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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