Documentation ¶
Index ¶
Constants ¶
View Source
const ( DBBTCAddressesSchema = `` /* 312-byte string literal not displayed */ QueryUnusedAddress = `SELECT * FROM btc_addresses WHERE used = 0 LIMIT 1 ` UpdateAddressQuery = `UPDATE btc_addresses SET linked_article_id = ?, linked_article_title = ?, used = ? WHERE addr_id = ? ` )
Variables ¶
View Source
var DB = db.DB
Functions ¶
func GetAddressCtrl ¶
Types ¶
type BTCAddress ¶
type BTCAddress struct { ID int64 `db:"addr_id"` Address string `db:"address"` AddrPosition int64 `db:"address_position"` LinkedArticleTitle string `db:"linked_article_title"` LinkedArticleID string `db:"linked_article_id"` Used bool `db:"used"` Synced bool `db:"synced"` }
func GetAddressByArticleID ¶
func GetAddressByArticleID(artId string) (*BTCAddress, error)
func GetAddressByPos ¶
func GetAddressByPos(pos int) (*BTCAddress, error)
func GetAddressForArticle ¶
func GetAddressForArticle(artId string, artTitle string) (*BTCAddress, error)
func GetAllUsedUnsyncedAddresses ¶
func GetAllUsedUnsyncedAddresses() ([]*BTCAddress, error)
func GetNextUnused ¶
func GetNextUnused() (*BTCAddress, error)
Click to show internal directories.
Click to hide internal directories.