repository

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: AGPL-3.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventRepository

func NewEventRepository(db *postgres.DB, mode types.Mode) *eventRepository

func NewMethodRepository

func NewMethodRepository(db *postgres.DB, mode types.Mode) *methodRepository

Types

type EventRepository

type EventRepository interface {
	PersistLogs(logs []types.Log, eventInfo types.Event, contractAddr, contractName string) error
	CreateEventTable(contractAddr string, event types.Event) (bool, error)
	CreateContractSchema(contractName string) (bool, error)
	CheckSchemaCache(key string) (interface{}, bool)
	CheckTableCache(key string) (interface{}, bool)
}

Event repository is used to persist event data into custom tables

type MethodRepository

type MethodRepository interface {
	PersistResults(results []types.Result, methodInfo types.Method, contractAddr, contractName string) error
	CreateMethodTable(contractAddr string, method types.Method) (bool, error)
	CreateContractSchema(contractAddr string) (bool, error)
	CheckSchemaCache(key string) (interface{}, bool)
	CheckTableCache(key string) (interface{}, bool)
}

Jump to

Keyboard shortcuts

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