data

package
v0.0.0-...-456edf8 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Db

func Db() (*sqlx.DB, error)

func MigratePgSchema

func MigratePgSchema(db *sqlx.DB, sourceURL string, config *postgres.Config) error

MigratePgSchema migrate postgres schema

Types

type Account

type Account interface {
	GetUser(id int64) (user *model.User, err error)
	GetUserByLogin(username string, hashedPassword string) (user *model.User, err error)
	GetApiKey(apiKey int64) (api *model.Api, err error)
	GetApiKeyByUserId(userId int64) (api *model.Api, err error)
	CreateUser(ctx context.Context, userModel *model.User) error
	CreateApiKey(ctx context.Context, apiModel *model.Api) error
	CreateTransaction(ctx context.Context, transactionModel *model.Transaction) error
}

func NewAccount

func NewAccount(db *sqlx.DB) Account

data manager for users and api keys

type Config

type Config interface {
	GetUrl() string
	GetUser() string
}

type PrysmClient

type PrysmClient interface {
	GetChainedHead() (*model.ChainHeadResponse, error)
}

func NewPrysmClient

func NewPrysmClient() PrysmClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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