listener

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PostgresqlDriver = "postgres"
	MySQLDriver      = "mysql"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStorage

type BlockStorage interface {
	Store(block *cb.Block) error
	StoreBulk(blocks []*cb.Block) error
}

type DatabaseStorage

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

func NewPostgresStorage

func NewPostgresStorage(driverName DriverName, dataSourceName string, channelID string) (DatabaseStorage, error)

func (DatabaseStorage) Store

func (m DatabaseStorage) Store(block *cb.Block) error

func (DatabaseStorage) StoreBulk

func (m DatabaseStorage) StoreBulk(blocks []*cb.Block) error

type DriverName

type DriverName string

type ElasticSearchStorage

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

func NewElasticStorage

func NewElasticStorage(client *elasticsearch7.Client) ElasticSearchStorage

func (ElasticSearchStorage) Store

func (e ElasticSearchStorage) Store(block *cb.Block) error

func (ElasticSearchStorage) StoreBulk

func (e ElasticSearchStorage) StoreBulk(blocks []*cb.Block) error

type IndexDoc

type IndexDoc = map[string]interface{}

type IndexKey

type IndexKey struct {
	ChaincodeID string
	ChannelID   string
}

type Item

type Item struct {
	ID          string      `json:"id"`
	Data        interface{} `json:"data"`
	TXID        string      `json:"txid"`
	BlockNumber int         `json:"blockNumber"`
	TXDate      int         `json:"tx_date"`
}

type ItemHistory

type ItemHistory struct {
	Data    interface{}
	TXID    string `json:"txid"`
	BlockID string `json:"blockId"`
	TXDate  string `json:"tx_date"`
}

type MeilisearchStorage

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

func NewMeilisearchStorage

func NewMeilisearchStorage(client meilisearch.ClientInterface, channelID string) (MeilisearchStorage, error)

func (MeilisearchStorage) Store

func (m MeilisearchStorage) Store(block *cb.Block) error

func (MeilisearchStorage) StoreBulk

func (m MeilisearchStorage) StoreBulk(blocks []*cb.Block) error

type Record

type Record struct {
	ID        string
	Data      datatypes.JSON
	Chaincode string
	CreatedAt time.Time
	UpdatedAt time.Time
}

Jump to

Keyboard shortcuts

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