store

package
v1.4.2-beta Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pg

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

func (*Pg) Close

func (pg *Pg) Close()

func (*Pg) InsertFaucetGive

func (pg *Pg) InsertFaucetGive(ctx context.Context, eventPayload event.Event) error

func (*Pg) InsertPoolDeposit

func (pg *Pg) InsertPoolDeposit(ctx context.Context, eventPayload event.Event) error

func (*Pg) InsertPoolSwap

func (pg *Pg) InsertPoolSwap(ctx context.Context, eventPayload event.Event) error

func (*Pg) InsertPriceQuoteUpdate

func (pg *Pg) InsertPriceQuoteUpdate(ctx context.Context, eventPayload event.Event) error

func (*Pg) InsertTokenBurn

func (pg *Pg) InsertTokenBurn(ctx context.Context, eventPayload event.Event) error

func (*Pg) InsertTokenMint

func (pg *Pg) InsertTokenMint(ctx context.Context, eventPayload event.Event) error

func (*Pg) InsertTokenTransfer

func (pg *Pg) InsertTokenTransfer(ctx context.Context, eventPayload event.Event) error

func (*Pg) Pool

func (pg *Pg) Pool() *pgxpool.Pool

type PgOpts

type PgOpts struct {
	Logg                 *slog.Logger
	DSN                  string
	MigrationsFolderPath string
	QueriesFolderPath    string
}

type Store

type Store interface {
	InsertTokenTransfer(context.Context, event.Event) error
	InsertTokenMint(context.Context, event.Event) error
	InsertTokenBurn(context.Context, event.Event) error
	InsertFaucetGive(context.Context, event.Event) error
	InsertPoolSwap(context.Context, event.Event) error
	InsertPoolDeposit(context.Context, event.Event) error
	InsertPriceQuoteUpdate(context.Context, event.Event) error
	Pool() *pgxpool.Pool
	Close()
}

func NewPgStore

func NewPgStore(o PgOpts) (Store, error)

Jump to

Keyboard shortcuts

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