toecutter

package module
v0.0.0-...-c02957d Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 6 Imported by: 0

README

toecuter

micro service for coinimp

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAccountPayments

func SetAccountPayments(db *leveldb.DB, respAccountPayments RespAccountPayments) error

func SetAccountSite

func SetAccountSite(db *leveldb.DB, respAccountSite RespAccountSite) error

func SetAccountStats

func SetAccountStats(db *leveldb.DB, respAccountStats RespAccountStats) error

func SetHashes

func SetHashes(db *leveldb.DB, respHashes RespHashes) error

func SetPayout1MHash

func SetPayout1MHash(db *leveldb.DB, respPayout RespPayout) error

func SetReward

func SetReward(db *leveldb.DB, respReward RespReward) error

func SetSiteStats

func SetSiteStats(db *leveldb.DB, respSiteStats RespSiteStats) error

Types

type Coin

type Coin int
const (
	Mintme Coin = iota
)

func (Coin) String

func (c Coin) String() string

type Config

type Config struct {
	Main MainConfig `toml:"main"`
}

func DecodeConfigToml

func DecodeConfigToml(tomlfile string) (Config, error)

DecodeConfigToml ...

type MainConfig

type MainConfig struct {
	Curl       string `toml:"curl"`
	URL        string `toml:"url"`
	SiteKey    string `toml:"site-key"`
	APIPublic  string `toml:"api-public"`
	APIPrivate string `toml:"api-private"`
	Schedule   string `toml:"schedule"`
	Sleep      int    `toml:"sleep"`
}

MainConfig ...

type Payments

type Payments struct {
	Amount        string `json:"amount"`
	Fee           string `json:"fee"`
	Status        string `json:"status"`
	WalletAddress string `json:"wallet_address"`
	TxID          string `json:"tx_id"`
	Timestamp     uint64 `json:"timestamp"`
}

type Payout

type Payout struct {
	Result string `json:"result"`
}

type RespAccountPayments

type RespAccountPayments struct {
	Message []Payments `json:"message"`
	Status  string     `json:"status"`
}

func AccountPayments

func AccountPayments(conf Config, coin Coin) (RespAccountPayments, error)

func GetAccountPayments

func GetAccountPayments(db *leveldb.DB) (RespAccountPayments, error)

type RespAccountSite

type RespAccountSite struct {
	Message []Site `json:"message"`
	Status  string `json:"status"`
}

func AccountSite

func AccountSite(conf Config, coin Coin) (RespAccountSite, error)

func GetAccountSite

func GetAccountSite(db *leveldb.DB) (RespAccountSite, error)

type RespAccountStats

type RespAccountStats struct {
	Message Stats  `json:"message"`
	Status  string `json:"status"`
}

func AccountStats

func AccountStats(conf Config, coin Coin) (RespAccountStats, error)

func GetAccountStats

func GetAccountStats(db *leveldb.DB) (RespAccountStats, error)

type RespHashes

type RespHashes struct {
	Message uint64 `json:"message"`
	Status  string `json:"status"`
}

func GetHashes

func GetHashes(db *leveldb.DB) (RespHashes, error)

func Hashes

func Hashes(conf Config, coin Coin, sitekey string) (RespHashes, error)

type RespPayout

type RespPayout struct {
	Message Payout `json:"message"`
	Status  string `json:"status"`
}

func GetPayout1MHash

func GetPayout1MHash(db *leveldb.DB) (RespPayout, error)

func Payout1MHash

func Payout1MHash(conf Config, coin Coin) (RespPayout, error)

type RespReward

type RespReward struct {
	Message string `json:"message"`
	Status  string `json:"status"`
}

func GetReward

func GetReward(db *leveldb.DB) (RespReward, error)

func Reward

func Reward(conf Config, coin Coin, sitekey string) (RespReward, error)

type RespSiteStats

type RespSiteStats struct {
	Message SiteData `json:"message"`
	Status  string   `json:"status"`
}

func GetSiteStats

func GetSiteStats(db *leveldb.DB) (RespSiteStats, error)

func SiteStats

func SiteStats(conf Config) (RespSiteStats, error)

type Site

type Site struct {
	Name    string `json:"name"`
	SiteKey string `json:"site-key"`
}

type SiteData

type SiteData struct {
	Name     string  `json:"name"`
	Hashrate float32 `json:"hashrate"`
	Hashes   uint64  `json:"hashes"`
	Reward   string  `json:"reward"`
}

type Stats

type Stats struct {
	Hashrate      float32 `json:"hashrate"`
	Hashes        uint64  `json:"hashes"`
	Reward        string  `json:"reward"`
	RewardPending string  `json:"reward-pending"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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