flag

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidExchangeKeyLength = errors.New("exchange key length must be 32 bytes")

ErrInvalidExchangeKeyLength returned when the length of the exchange key is not equal to 32 bytes

View Source
var ErrInvalidFactKeyLength = errors.New("the fact key string should fit into 32 bytes")

ErrInvalidFactKeyLength error returned when fact key is not fit into 32 bytes

Functions

func DataTypeSet

func DataTypeSet() string

DataTypeSet returns comma separated string of allowed data types

Types

type DataType

type DataType data.Type

DataType is a flag that parses data type of fact

func (*DataType) AsType

func (a *DataType) AsType() data.Type

AsType returns data.Type

func (*DataType) UnmarshalFlag

func (a *DataType) UnmarshalFlag(value string) error

UnmarshalFlag implements flags.Unmarshaler interface

type ECDSAPrivateKeyFromFile

type ECDSAPrivateKeyFromFile ecdsa.PrivateKey

ECDSAPrivateKeyFromFile is a flag that reads ecdsa.PrivateKey from file

func (*ECDSAPrivateKeyFromFile) AsECDSAPrivateKey

func (k *ECDSAPrivateKeyFromFile) AsECDSAPrivateKey() *ecdsa.PrivateKey

AsECDSAPrivateKey returns pointer to ecdsa.PrivateKey

func (*ECDSAPrivateKeyFromFile) UnmarshalFlag

func (k *ECDSAPrivateKeyFromFile) UnmarshalFlag(value string) error

UnmarshalFlag implements flags.Unmarshaler interface

type EthereumAddress

type EthereumAddress common.Address

EthereumAddress is a flag that parses Ethereum address

func (*EthereumAddress) AsCommonAddress

func (a *EthereumAddress) AsCommonAddress() common.Address

AsCommonAddress returns common.Address

func (*EthereumAddress) UnmarshalFlag

func (a *EthereumAddress) UnmarshalFlag(value string) error

UnmarshalFlag implements flags.Unmarshaler interface

type EthereumWei

type EthereumWei big.Int

EthereumWei parses wei

func (*EthereumWei) AsBigInt

func (f *EthereumWei) AsBigInt() *big.Int

AsBigInt returns wei as big.Int

func (*EthereumWei) EthString

func (f *EthereumWei) EthString() string

EthString converts wei to ETH and returns result as string

func (*EthereumWei) UnmarshalFlag

func (f *EthereumWei) UnmarshalFlag(value string) (err error)

UnmarshalFlag implements flags.Unmarshaler interface

type ExchangeIndex

type ExchangeIndex big.Int

ExchangeIndex parses exchange index

func (*ExchangeIndex) AsBigInt

func (f *ExchangeIndex) AsBigInt() *big.Int

AsBigInt returns exchange index as big.Int

func (*ExchangeIndex) UnmarshalFlag

func (f *ExchangeIndex) UnmarshalFlag(value string) (err error)

UnmarshalFlag implements flags.Unmarshaler interface

type ExchangeKeyFromFile

type ExchangeKeyFromFile [32]byte

ExchangeKeyFromFile parses exchange key from file

func (*ExchangeKeyFromFile) AsBytes32

func (f *ExchangeKeyFromFile) AsBytes32() [32]byte

AsBytes32 returns exchange key as [32]byte

func (*ExchangeKeyFromFile) UnmarshalFlag

func (f *ExchangeKeyFromFile) UnmarshalFlag(value string) error

UnmarshalFlag implements flags.Unmarshaler interface

type FactKey

type FactKey [32]byte

FactKey is a fact key type

func (*FactKey) AsString

func (f *FactKey) AsString() string

AsString converts byte value to string

func (*FactKey) UnmarshalFlag

func (f *FactKey) UnmarshalFlag(value string) (err error)

UnmarshalFlag implements flags.Unmarshaler interface

type StringArray

type StringArray []string

StringArray parses comma separated string

func (*StringArray) AsStringArr

func (k *StringArray) AsStringArr() []string

AsStringArr returns value as string array

func (*StringArray) UnmarshalFlag

func (k *StringArray) UnmarshalFlag(value string) error

UnmarshalFlag implements flags.Unmarshaler interface

type TXHash

type TXHash common.Hash

TXHash is a flag that parses transaction hash

func (*TXHash) AsCommonHash

func (a *TXHash) AsCommonHash() common.Hash

AsCommonHash returns common.Hash

func (*TXHash) UnmarshalFlag

func (a *TXHash) UnmarshalFlag(value string) error

UnmarshalFlag implements flags.Unmarshaler interface

Jump to

Keyboard shortcuts

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