Documentation
¶
Overview ¶
Copyright 2017 - 2018 OneLedger
Copyright 2017-2018 OneLedger ¶
Convert bytes and interfaces into JSON ¶
Copyright 2017-2018 OneLedger ¶
Convert strings (cli input) into various types.
Index ¶
- Constants
- Variables
- func FromJSON(input []byte, output interface{}) (err error)
- func GetInt(value string, defaultValue int) int
- func GetString(value int) string
- func GetString64(value int64) string
- func ToJSON(input interface{}) (msg []byte, err error)
- type Convert
- func (convert *Convert) AddError(value string, err error)
- func (convert *Convert) GetAccountKey(value string) id.AccountKey
- func (convert *Convert) GetChainFromCurrency(value string) data.ChainType
- func (convert *Convert) GetCoin(amountStr string, currencyStr string) data.Coin
- func (convert *Convert) GetCurrency(value string) string
- func (convert *Convert) GetErrors() string
- func (convert *Convert) GetHash(value string) []byte
- func (convert *Convert) GetInt(value string) int
- func (convert *Convert) GetInt64(value string) int64
- func (convert *Convert) GetPrivateKey(value string) PrivateKey
- func (convert *Convert) GetPublicKey(value string) PublicKey
- func (convert *Convert) HasErrors() bool
- func (convert *Convert) HashKey(key PublicKey) []byte
- type PrivateKey
- type PublicKey
Constants ¶
View Source
const CURRENCY = 0x123
Variables ¶
View Source
var Domain map[string]string
Functions ¶
func GetString64 ¶
Types ¶
type Convert ¶
Build up a list of error messages
func NewConvert ¶
func NewConvert() *Convert
func (*Convert) GetAccountKey ¶
func (convert *Convert) GetAccountKey(value string) id.AccountKey
TODO: Should go through a set of different possibilties and settle on the best option
func (*Convert) GetChainFromCurrency ¶ added in v0.7.1
func (*Convert) GetCurrency ¶
func (*Convert) GetPrivateKey ¶
func (convert *Convert) GetPrivateKey(value string) PrivateKey
TODO: Needs to have real values
func (*Convert) GetPublicKey ¶
TODO: Needs to have real values
type PrivateKey ¶
type PrivateKey = id.PrivateKey
Click to show internal directories.
Click to hide internal directories.