Documentation ¶
Index ¶
- func SetCoin(s strapi.StrapiRestClient, coins, logos []string, src, slug string, ...)
- func SetCoinsIndex() func(c map[string]interface{}) interface{}
- type AlgoCoins
- type AlgoCoinsLogo
- type BitnodedCoins
- type Blockchain
- type Coin
- func (c *Coin) SetAlgo(algo interface{})
- func (c *Coin) SetBitcoinTalk(bitcointalk interface{})
- func (c *Coin) SetBlockHeight(supply interface{})
- func (c *Coin) SetBlockReward(rew interface{})
- func (c *Coin) SetBlockRewardReduction(rew interface{})
- func (c *Coin) SetBlockTime(blockTime interface{})
- func (c *Coin) SetBuiltOn(proof interface{})
- func (c *Coin) SetChat(chat interface{})
- func (c *Coin) SetDescription(description interface{})
- func (c *Coin) SetDifficulty(diff interface{})
- func (c *Coin) SetDifficultyAdjustment(diffadj interface{})
- func (c *Coin) SetExplorer(explorer interface{})
- func (c *Coin) SetFacebook(facebook interface{})
- func (c *Coin) SetGenesisDate(start interface{})
- func (c *Coin) SetMaxSupply(supply interface{})
- func (c *Coin) SetName(name interface{})
- func (c *Coin) SetNetworkHashrate(supply interface{})
- func (c *Coin) SetProof(proof interface{})
- func (c *Coin) SetReddit(reddit interface{})
- func (c *Coin) SetSrcID(src, id string)
- func (c *Coin) SetSymbol(ticker interface{})
- func (c *Coin) SetTelegram(telegram interface{})
- func (c *Coin) SetTotalCoinsMined(supply interface{})
- func (c *Coin) SetTwitter(twitter interface{})
- func (c *Coin) SetWebSite(website interface{})
- type CoinShort
- type CoinShortLogo
- type CoinUser
- type Coins
- type CoinsQueries
- func (cq *CoinsQueries) CoinHandler(w http.ResponseWriter, r *http.Request)
- func (cq *CoinsQueries) CoinNodesHandler(w http.ResponseWriter, r *http.Request)
- func (cq *CoinsQueries) CoinsHandler(w http.ResponseWriter, r *http.Request)
- func (cq *CoinsQueries) GetAlgoCoins() AlgoCoins
- func (cq *CoinsQueries) GetAlgoCoinsLogo() AlgoCoinsLogo
- func (cq *CoinsQueries) GetAllCoins() (c Coins)
- func (cq *CoinsQueries) GetCoin(slug string) (Coin, error)
- func (cq *CoinsQueries) GetCoinShort(slug string) (CoinShort, error)
- func (cq *CoinsQueries) GetCoins() Coins
- func (cq *CoinsQueries) GetCoinsBin() Coins
- func (cq *CoinsQueries) GetCoinsWords() (c Coins)
- func (cq *CoinsQueries) GetLogo(coin string) (l string, err error)
- func (cq *CoinsQueries) GetNodeCoins() (n Coins)
- func (cq *CoinsQueries) GetRestCoins() (c Coins)
- func (cq *CoinsQueries) GetUsableCoins() Coins
- func (cq *CoinsQueries) LogoHandler(w http.ResponseWriter, r *http.Request)
- func (cq *CoinsQueries) ProcessCoins(s strapi.StrapiRestClient)
- func (cq *CoinsQueries) SetCoin(src, slug string, get func(c Coin))
- func (cq *CoinsQueries) SetCoinsLogoIndex(s strapi.StrapiRestClient) func(c map[string]interface{}) interface{}
- func (cq *CoinsQueries) WriteCoin(slug string, c interface{}) error
- func (cq *CoinsQueries) WriteIndex(slug string, c interface{}) error
- func (cq *CoinsQueries) WriteIndiceS(indices map[string]interface{}) error
- func (cq *CoinsQueries) WriteInfo(slug string, c interface{}) error
- func (cq *CoinsQueries) WriteInfoS(infos map[string]interface{}) error
- func (cq *CoinsQueries) WriteLogo(slug string, c interface{}) error
- type CoinsShort
- type General
- type Item
- type JormCoins
- type Link
- type Links
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetCoinsIndex ¶
func SetCoinsIndex() func(c map[string]interface{}) interface{}
func BitNodeCoins(c nodes.NodeCoins, j *jdb.JDB) { log.Print("Start Process BitNodes Coins") nodeCoins := nodes.NodeCoins{N: 0} //c := GetAllCoins(j) for _, nodeCoin := range c.C { coin := getCoin(j, nodeCoin.Slug) log.Print("Bitnode Coin: ", coin.Name) bitNodes := nodes.BitNodes{} if err := cfg.CFG.Read("nodes", coin.Slug, &bitNodes); err != nil { log.Print("Error", err) } nodeCoins.N++ nodeCoins.C = append(nodeCoins.C, nodes.NodeCoin{ Rank: coin.Rank, Name: coin.Name, Ticker: coin.Ticker, Slug: coin.Slug, Algo: coin.Algo, Nodes: bitNodes, }) coin.BitNode = true j.Write("coins", "coin_"+coin.Slug, coin) } j.Write("info", "nodecoins", nodeCoins) }
Types ¶
type AlgoCoinsLogo ¶
type AlgoCoinsLogo struct { N int `json:"n"` C []CoinShortLogo `json:"c"` A []string `json:"a"` }
type BitnodedCoins ¶
type Blockchain ¶
type Blockchain struct { GenesisDate time.Time `json:"genesis"` NetworkHashrate float64 `json:"hashrate"` MaxSupply float64 `json:"supply"` TotalCoinsMined float64 `json:"mined"` BlockHeight int `json:"block_height"` BlockTime int `json:"block_time"` Difficulty float64 `json:"difficulty"` DifficultyAdjustment string `json:"diffadj"` BlockReward float64 `json:"block_rew"` BlockRewardReduction string `json:"block_rewred"` }
GeneralCoin stores identifying information about a coin in a database
type Coin ¶
type Coin struct { Id int `json:"id" form:"id"` Name string `json:"name" form:"name"` Slug string `json:"slug" form:"slug"` Description string `json:"description" form:"description"` Published bool `json:"published" form:"published"` Selected bool `json:"selected" form:"selected"` Favorite bool `json:"fav" form:"favorite"` Checked map[string]bool `json:"checked"` CreatedAt time.Time `json:"created"` UpdatedAt time.Time `json:"updated"` Order int `json:"order" form:"order"` SubDomain bool `json:"subdomain" form:"subdomain"` Symbol string `json:"symbol" form:"symbol"` Token string `json:"token" form:"token"` Algo string `json:"algo" form:"algo"` Proof string `json:"proof" form:"proof"` Ico bool `json:"ico" form:"ico"` BuiltOn string `json:"builton"` GenesisDate time.Time `json:"genesis"` NetworkHashrate float64 `json:"hashrate"` MaxSupply float64 `json:"supply"` TotalCoinsMined float64 `json:"mined"` BlockHeight int `json:"blockheight"` BlockTime int `json:"blocktime"` Difficulty float64 `json:"difficulty"` DifficultyAdjustment string `json:"difficultyadjustment"` BlockReward float64 `json:"blockreward"` BlockRewardReduction string `json:"blockrewardreduction"` Rank int `json:"rank" form:"rank"` Platform string `json:"platform" form:"platform"` BitNode bool `json:"bitnode" form:"bitnode"` SrcID map[string]string `json:"srcid"` }
func GetCoins ¶
func GetCoins(s strapi.StrapiRestClient) (cc []*Coin)
func (*Coin) SetBitcoinTalk ¶
func (c *Coin) SetBitcoinTalk(bitcointalk interface{})
func (*Coin) SetBlockHeight ¶
func (c *Coin) SetBlockHeight(supply interface{})
func (*Coin) SetBlockReward ¶
func (c *Coin) SetBlockReward(rew interface{})
func (*Coin) SetBlockRewardReduction ¶
func (c *Coin) SetBlockRewardReduction(rew interface{})
func (*Coin) SetBlockTime ¶
func (c *Coin) SetBlockTime(blockTime interface{})
func (*Coin) SetBuiltOn ¶
func (c *Coin) SetBuiltOn(proof interface{})
func (*Coin) SetDescription ¶
func (c *Coin) SetDescription(description interface{})
func (*Coin) SetDifficulty ¶
func (c *Coin) SetDifficulty(diff interface{})
func (*Coin) SetDifficultyAdjustment ¶
func (c *Coin) SetDifficultyAdjustment(diffadj interface{})
func (*Coin) SetExplorer ¶
func (c *Coin) SetExplorer(explorer interface{})
func (*Coin) SetFacebook ¶
func (c *Coin) SetFacebook(facebook interface{})
func (*Coin) SetGenesisDate ¶
func (c *Coin) SetGenesisDate(start interface{})
func (*Coin) SetMaxSupply ¶
func (c *Coin) SetMaxSupply(supply interface{})
func (*Coin) SetNetworkHashrate ¶
func (c *Coin) SetNetworkHashrate(supply interface{})
func (*Coin) SetTelegram ¶
func (c *Coin) SetTelegram(telegram interface{})
func (*Coin) SetTotalCoinsMined ¶
func (c *Coin) SetTotalCoinsMined(supply interface{})
func (*Coin) SetTwitter ¶
func (c *Coin) SetTwitter(twitter interface{})
func (*Coin) SetWebSite ¶
func (c *Coin) SetWebSite(website interface{})
type CoinShort ¶
type CoinShort struct { Rank int `json:"r"` Name string `json:"n"` Symbol string `json:"y"` Slug string `json:"s"` Algo string `json:"a"` }
Coin stores identifying information about coins in the database
type CoinShortLogo ¶
type CoinShortLogo struct { Rank int `json:"r"` Name string `json:"n"` Symbol string `json:"y"` Slug string `json:"s"` Algo string `json:"a"` Logo string `json:"l"` }
Coin stores identifying information about coins in the database
type CoinUser ¶
type CoinUser struct { Id int `json:"id" form:"id"` Name string `json:"name" form:"name"` Slug string `json:"slug" form:"slug"` Description string `json:"description" form:"description"` Selected bool `json:"selected" form:"selected"` Favorite bool `json:"fav" form:"favorite"` UpdatedAt time.Time `json:"updated"` Order int `json:"order" form:"order"` Symbol string `json:"symbol" form:"symbol"` Token string `json:"token" form:"token"` Algo string `json:"algo" form:"algo"` Proof string `json:"proof" form:"proof"` Ico bool `json:"ico" form:"ico"` BuiltOn string `json:"builton"` GenesisDate time.Time `json:"genesis"` NetworkHashrate float64 `json:"hashrate"` MaxSupply float64 `json:"supply"` TotalCoinsMined float64 `json:"mined"` BlockHeight int `json:"blockheight"` BlockTime int `json:"blocktime"` Difficulty float64 `json:"difficulty"` DifficultyAdjustment string `json:"difficultyadjustment"` BlockReward float64 `json:"blockreward"` BlockRewardReduction string `json:"blockrewardreduction"` Rank int `json:"rank" form:"rank"` Platform string `json:"platform" form:"platform"` BitNode bool `json:"bitnode" form:"bitnode"` }
type CoinsQueries ¶
type CoinsQueries struct {
// contains filtered or unexported fields
}
func (*CoinsQueries) CoinHandler ¶
func (cq *CoinsQueries) CoinHandler(w http.ResponseWriter, r *http.Request)
CoinsHandler handles a request for coin data
func (*CoinsQueries) CoinNodesHandler ¶
func (cq *CoinsQueries) CoinNodesHandler(w http.ResponseWriter, r *http.Request)
CoinNodesHandler handles a request for (?)
func (*CoinsQueries) CoinsHandler ¶
func (cq *CoinsQueries) CoinsHandler(w http.ResponseWriter, r *http.Request)
CoinsHandler handles a request for coin data
func (*CoinsQueries) GetAlgoCoins ¶
func (cq *CoinsQueries) GetAlgoCoins() AlgoCoins
func (*CoinsQueries) GetAlgoCoinsLogo ¶
func (cq *CoinsQueries) GetAlgoCoinsLogo() AlgoCoinsLogo
func (*CoinsQueries) GetAllCoins ¶
func (cq *CoinsQueries) GetAllCoins() (c Coins)
func (*CoinsQueries) GetCoinShort ¶
func (cq *CoinsQueries) GetCoinShort(slug string) (CoinShort, error)
func (*CoinsQueries) GetCoins ¶
func (cq *CoinsQueries) GetCoins() Coins
func (*CoinsQueries) GetCoinsBin ¶
func (cq *CoinsQueries) GetCoinsBin() Coins
func (*CoinsQueries) GetCoinsWords ¶
func (cq *CoinsQueries) GetCoinsWords() (c Coins)
func (*CoinsQueries) GetNodeCoins ¶
func (cq *CoinsQueries) GetNodeCoins() (n Coins)
func (*CoinsQueries) GetRestCoins ¶
func (cq *CoinsQueries) GetRestCoins() (c Coins)
func (*CoinsQueries) GetUsableCoins ¶
func (cq *CoinsQueries) GetUsableCoins() Coins
func (*CoinsQueries) LogoHandler ¶
func (cq *CoinsQueries) LogoHandler(w http.ResponseWriter, r *http.Request)
LogoHandler handles a request for logo data
func (*CoinsQueries) ProcessCoins ¶
func (cq *CoinsQueries) ProcessCoins(s strapi.StrapiRestClient)
func (*CoinsQueries) SetCoin ¶
func (cq *CoinsQueries) SetCoin(src, slug string, get func(c Coin))
func (*CoinsQueries) SetCoinsLogoIndex ¶
func (cq *CoinsQueries) SetCoinsLogoIndex(s strapi.StrapiRestClient) func(c map[string]interface{}) interface{}
func (*CoinsQueries) WriteCoin ¶
func (cq *CoinsQueries) WriteCoin(slug string, c interface{}) error
func (*CoinsQueries) WriteIndex ¶
func (cq *CoinsQueries) WriteIndex(slug string, c interface{}) error
func (*CoinsQueries) WriteIndiceS ¶
func (cq *CoinsQueries) WriteIndiceS(indices map[string]interface{}) error
func (*CoinsQueries) WriteInfo ¶
func (cq *CoinsQueries) WriteInfo(slug string, c interface{}) error
func (*CoinsQueries) WriteInfoS ¶
func (cq *CoinsQueries) WriteInfoS(infos map[string]interface{}) error
func (*CoinsQueries) WriteLogo ¶
func (cq *CoinsQueries) WriteLogo(slug string, c interface{}) error
type CoinsShort ¶
type General ¶
type General struct { Symbol string `json:"symbol" form:"symbol"` Token string `json:"token" form:"token"` Algo string `json:"algo" form:"algo"` Proof string `json:"proof" form:"proof"` Ico bool `json:"ico" form:"ico"` BuiltOn string `json:"builton"` }
GeneralCoin stores identifying information about a coin in a database
type Item ¶
type Item struct { Name string `json:"name" form:"name"` Slug string `json:"slug" form:"slug"` Description string `json:"description" form:"description"` Published bool `json:"published" form:"published"` Selected bool `json:"selected" form:"selected"` Favorite bool `json:"fav" form:"favorite"` Checked map[string]bool `json:"checked"` CreatedAt time.Time `json:"created"` UpdatedAt time.Time `json:"updated"` Order int `json:"order" form:"order"` }
General stores identifying information about item in the database
type JormCoins ¶
type JormCoins interface { SetCoin(j *jdb.JDB, src, slug string, get func(c *Coin)) SetName(name interface{}) SetTicker(ticker interface{}) SetAlgo(algo interface{}) SetDescription(description interface{}) SetProof(proof interface{}) SetStart(start interface{}) SetBitcoinTalk(bitcointalk interface{}) SetTwitter(twitter interface{}) SetReddit(reddit interface{}) SetTelegram(telegram interface{}) SetFacebook(facebook interface{}) SetWebSite(website interface{}) SetExplorer(explorer interface{}) SetChat(chat interface{}) SetLogo(logo interface{}) }
type Links ¶
type Links struct { WebSite []Link `json:"web"` Explorer []Link `json:"explorer"` Chat []Link `json:"chat"` Twitter Link `json:"tw"` Facebook Link `json:"facebook"` Telegram Link `json:"telegram"` Reddit Link `json:"reddit"` Github []Link `json:"github"` BitcoinTalk Link `json:"bitcointalk"` WhitePaper Link `json:"whitepaper"` }
GeneralCoin stores identifying information about a coin in a database
Source Files ¶
Click to show internal directories.
Click to hide internal directories.