ports

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoManager added in v0.3.1

type RepoManager interface {
	VaultRepository() domain.VaultRepository
	MarketRepository() domain.MarketRepository
	UnspentRepository() domain.UnspentRepository
	TradeRepository() domain.TradeRepository

	Close()

	NewTransaction() Transaction
	NewPricesTransaction() Transaction
	NewUnspentsTransaction() Transaction
	RunTransaction(
		ctx context.Context,
		readOnly bool,
		handler func(ctx context.Context) (interface{}, error),
	) (interface{}, error)
	RunUnspentsTransaction(
		ctx context.Context,
		readOnly bool,
		handler func(ctx context.Context) (interface{}, error),
	) (interface{}, error)
	RunPricesTransaction(
		ctx context.Context,
		readOnly bool,
		handler func(ctx context.Context) (interface{}, error),
	) (interface{}, error)
}

RepoManager interface defines the methods for swap, price and unspent.

type Transaction

type Transaction interface {
	Commit() error
	Discard()
}

Transaction interface defines the method to commit or discard a database transaction.

Jump to

Keyboard shortcuts

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