Documentation ¶
Index ¶
- Variables
- func EventContextFromAuthz(ctx db.EventContext, msgIndex int) (db.EventContext, error)
- func GetIncomesFromBuySellNftMsg(events types.StringEvents, txHash string) []db.NftIncome
- func GetIncomesFromSendNftMsgs(eventsList db.EventsList, msgIndex int, txHash string) []db.NftIncome
- func GetIscnVersion(iscn string) int
- func Run(pool *pgxpool.Pool) chan<- int64
- type EventExtractor
- func (e *EventExtractor) Extract(ctx db.EventContext) error
- func (e *EventExtractor) RegisterAll(processor EventProcessor)
- func (e *EventExtractor) RegisterType(eventType string, processor EventProcessor)
- func (e *EventExtractor) RegisterTypeKey(eventType, key string, processor EventProcessor)
- func (e *EventExtractor) RegisterTypeKeyValue(eventType, key, value string, processor EventProcessor)
- type EventProcessor
- type Payload
Constants ¶
This section is empty.
Variables ¶
View Source
var ExtractFunc db.Extractor
Functions ¶
func EventContextFromAuthz ¶
func EventContextFromAuthz(ctx db.EventContext, msgIndex int) (db.EventContext, error)
func GetIncomesFromBuySellNftMsg ¶
func GetIncomesFromBuySellNftMsg(events types.StringEvents, txHash string) []db.NftIncome
marketplace messages may contain multiple coin_received events, should not directly use GetEventValue() or GetEventsValue() since it only returns the first one
func GetIscnVersion ¶
Types ¶
type EventExtractor ¶
type EventExtractor struct {
// contains filtered or unexported fields
}
func NewEventExtractor ¶
func NewEventExtractor() *EventExtractor
func (*EventExtractor) Extract ¶
func (e *EventExtractor) Extract(ctx db.EventContext) error
func (*EventExtractor) RegisterAll ¶
func (e *EventExtractor) RegisterAll(processor EventProcessor)
func (*EventExtractor) RegisterType ¶
func (e *EventExtractor) RegisterType(eventType string, processor EventProcessor)
func (*EventExtractor) RegisterTypeKey ¶
func (e *EventExtractor) RegisterTypeKey(eventType, key string, processor EventProcessor)
func (*EventExtractor) RegisterTypeKeyValue ¶
func (e *EventExtractor) RegisterTypeKeyValue(eventType, key, value string, processor EventProcessor)
type EventProcessor ¶
type EventProcessor func(payload *Payload, event *types.StringEvent) error
type Payload ¶
type Payload struct { db.EventContext MsgIndex int }
func PayloadFromEventContext ¶
func PayloadFromEventContext(ctx db.EventContext) *Payload
func (*Payload) GetEvents ¶
func (payload *Payload) GetEvents() types.StringEvents
func (*Payload) GetMessage ¶
func (payload *Payload) GetMessage() json.RawMessage
Click to show internal directories.
Click to hide internal directories.