storage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JSONFILE ...
	JSONFILE = "json"
	// POSTGRESQL ...
	POSTGRESQL = "postgresql"
)

Variables

This section is empty.

Functions

func PostgreSQLConnection

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

PostgreSQLConnection func for connection to PostgreSQL database.

func WalletsFromJsonToMAP added in v0.3.0

func WalletsFromJsonToMAP(path, filename string) ([]map[string]interface{}, error)

WalletsFromJsonToMAP read json filename and path

Types

type NotifierService added in v0.3.0

type NotifierService struct {
	Name   string `json:"name"`
	UserID string `json:"user_id"`
}

type OptionsSource added in v0.3.0

type OptionsSource struct {
	FileName string
	PathName string
}

type Source added in v0.3.0

type Source struct {
	SourceType string
	Options    OptionsSource
}

func NewSource added in v0.3.0

func NewSource(sourceType string, options OptionsSource) Source

func (*Source) Wallets added in v0.3.0

func (s *Source) Wallets() (wallets []Wallet, err error)

func (*Source) WalletsTONotify added in v0.3.0

func (s *Source) WalletsTONotify() (wallets []Wallet, err error)

type Sourcer added in v0.3.0

type Sourcer interface {
	Wallets() (wallets []Wallet, err error)
	WalletsTONotify() (wallets []Wallet, err error)
}

Sourcer ...

type Wallet added in v0.3.0

type Wallet struct {
	Address         string            `json:"address"`
	Symbol          string            `json:"symbol"`
	IsActive        bool              `json:"is_active"`
	NotifierService []NotifierService `json:"notifier_service"`
	NetworkType     string            `json:"network_type"`
}

func WalletsFromJsonToStruct added in v0.3.0

func WalletsFromJsonToStruct(path, filename string) ([]Wallet, error)

WalletsFromJsonToStruct read json filename and path

Jump to

Keyboard shortcuts

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