Documentation ¶
Index ¶
- Variables
- func ConfigureRouter(router *web.Router)
- func SetupViews()
- func SweepEthereumWallet(addressFrom string, addressTo string)
- func TaskUpdateEthereumWalletBalances()
- func UpdateEthereumWalletBalances()
- func ViewCreateEthereumWallet(w web.ResponseWriter, r *web.Request)
- func ViewEthRPCGet(w web.ResponseWriter, r *web.Request)
- func ViewListEthereumWalletsWithPositiveBalance(w web.ResponseWriter, r *web.Request)
- func ViewSendFromEthereumWallet(w web.ResponseWriter, r *web.Request)
- func ViewShowEthereumWallet(w web.ResponseWriter, r *web.Request)
- func ViewTableListEthereumWalletsWithPositiveBalance(w web.ResponseWriter, r *web.Request)
- type DisplayEthereumWallet
- type ETHPayment
- type ETHPaymentResult
- type EthereumWallet
- func (w EthereumWallet) CurrentBalance() (*EthereumWalletBalance, error)
- func (w EthereumWallet) Save() error
- func (w EthereumWallet) SaveToDatabase() error
- func (w EthereumWallet) Transfer(payments []ETHPayment) (ETHPaymentResult, error)
- func (w EthereumWallet) UpdateBalance() (*EthereumWalletBalance, error)
- func (w EthereumWallet) Validate() error
- type EthereumWalletBalance
- type EthereumWallets
- type ViewListEthereumWalletsWithPositiveBalanceResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PAYMENT_GATE_SETTINGS = settings.LoadPaymentGateSettings() WEI_IN_ETH = float64(1e18) )
Functions ¶
func ConfigureRouter ¶
func SetupViews ¶
func SetupViews()
func SweepEthereumWallet ¶
func TaskUpdateEthereumWalletBalances ¶
func TaskUpdateEthereumWalletBalances()
func UpdateEthereumWalletBalances ¶
func UpdateEthereumWalletBalances()
func ViewCreateEthereumWallet ¶
func ViewCreateEthereumWallet(w web.ResponseWriter, r *web.Request)
func ViewEthRPCGet ¶
func ViewEthRPCGet(w web.ResponseWriter, r *web.Request)
func ViewListEthereumWalletsWithPositiveBalance ¶
func ViewListEthereumWalletsWithPositiveBalance(w web.ResponseWriter, r *web.Request)
func ViewSendFromEthereumWallet ¶
func ViewSendFromEthereumWallet(w web.ResponseWriter, r *web.Request)
func ViewShowEthereumWallet ¶
func ViewShowEthereumWallet(w web.ResponseWriter, r *web.Request)
func ViewTableListEthereumWalletsWithPositiveBalance ¶
func ViewTableListEthereumWalletsWithPositiveBalance(w web.ResponseWriter, r *web.Request)
Types ¶
type DisplayEthereumWallet ¶
type ETHPayment ¶
type ETHPaymentResult ¶
type ETHPaymentResult struct { Hash string `json:"hash"` RawTx string `json:"rawTransaction"` WalletFrom string `json:"wallet_from"` WalletTo string `json:"wallet_to"` Cost uint64 `json:"cost"` Amount uint64 `json:"amount"` Contract string `json:"contract,omitempty"` ContractMethod string `json:"contract_method,omitempty"` }
type EthereumWallet ¶
type EthereumWallet struct { PublicKey string `json:"address" gorm:"primary_key"` PrivateKey string `json:"private_key,omitempty" sql:"type:varchar(1024)"` Type string `json:"type"` CreatedAt *time.Time `json:"created_at" gorm:"index"` UpdatedAt *time.Time `json:"updated_at" gorm:"index"` DeletedAt *time.Time `json:"deleted_at" gorm:"index"` }
func CreateEthereumWallet ¶
func CreateEthereumWallet(tp string) (EthereumWallet, error)
func FindEthereumWalletByPublicKey ¶
func FindEthereumWalletByPublicKey(publicKey string) (*EthereumWallet, error)
func GetAllEthereumWallets ¶
func GetAllEthereumWallets() ([]EthereumWallet, error)
func (EthereumWallet) CurrentBalance ¶
func (w EthereumWallet) CurrentBalance() (*EthereumWalletBalance, error)
func (EthereumWallet) Save ¶
func (w EthereumWallet) Save() error
func (EthereumWallet) SaveToDatabase ¶
func (w EthereumWallet) SaveToDatabase() error
func (EthereumWallet) Transfer ¶
func (w EthereumWallet) Transfer(payments []ETHPayment) (ETHPaymentResult, error)
func (EthereumWallet) UpdateBalance ¶
func (w EthereumWallet) UpdateBalance() (*EthereumWalletBalance, error)
func (EthereumWallet) Validate ¶
func (w EthereumWallet) Validate() error
type EthereumWalletBalance ¶
type EthereumWalletBalance struct { ID int `json:"id" gorm:"primary_key"` PublicKey string `json:"address" gorm:"index"` BalanceETH float64 `json:"balance` EthereumWallet EthereumWallet `json:"-" gorm:"ForeignKey:PublicKey;AssociationForeignKey:PublicKey"` CreatedAt *time.Time `json:"created_at" gorm:"index"` UpdatedAt *time.Time `json:"updated_at" gorm:"index"` DeletedAt *time.Time `json:"deleted_at" gorm:"index"` }
func FindEthereumWalletsWithNonZeroBalance ¶
func FindEthereumWalletsWithNonZeroBalance() ([]EthereumWalletBalance, error)
func (EthereumWalletBalance) DisplayEthereumWallet ¶
func (w EthereumWalletBalance) DisplayEthereumWallet() DisplayEthereumWallet
func (EthereumWalletBalance) Save ¶
func (w EthereumWalletBalance) Save() error
type EthereumWallets ¶
type EthereumWallets []EthereumWallet
type ViewListEthereumWalletsWithPositiveBalanceResponse ¶
type ViewListEthereumWalletsWithPositiveBalanceResponse struct { DisplayEthereumWallets []DisplayEthereumWallet `json:"wallets"` SummaryBalance float64 `json:"balance"` }
Click to show internal directories.
Click to hide internal directories.