Documentation ¶
Index ¶
- Variables
- func AutoFormatBalance(b Balance) string
- func AutoFormatStatic(amount int64) string
- func FormatBalance(b Balance, unit BalanceUnit) string
- func FormatStatic(amount int64, unit string) string
- func ParseBalanceStatic(str string) (int64, error)
- func ParseTime(now time.Time, input string) (*time.Time, error)
- type Balance
- type BalanceUnit
- type Key
- type Size
- type Timestamp
- type WhoPays
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidTime = errors.New("invalid time")
Functions ¶
func AutoFormatBalance ¶ added in v1.2.86
func AutoFormatStatic ¶ added in v1.2.88
func FormatBalance ¶ added in v1.2.86
func FormatBalance(b Balance, unit BalanceUnit) string
func FormatStatic ¶ added in v1.2.88
func ParseBalanceStatic ¶ added in v1.2.88
Types ¶
type Balance ¶
type Balance int64
Balance represents 0chain native token
func ParseBalance ¶ added in v1.2.86
func (Balance) AutoFormat ¶ added in v1.2.86
func (Balance) Format ¶ added in v1.2.86
func (b Balance) Format(unit BalanceUnit) string
type BalanceUnit ¶ added in v1.2.86
type BalanceUnit byte
const ( SAS BalanceUnit = iota UZCN MZCN ZCN )
func (*BalanceUnit) Parse ¶ added in v1.2.86
func (unit *BalanceUnit) Parse(s string) error
func (BalanceUnit) String ¶ added in v1.2.86
func (unit BalanceUnit) String() string
type Key ¶
type Key string
A Key represents an identifier. It can be a pool ID, client ID, smart contract address, etc.
type Timestamp ¶
type Timestamp int64
Timestamp represents Unix time (e.g. in seconds)
type WhoPays ¶
type WhoPays int
WhoPays for file downloading.
const ( WhoPaysOwner WhoPays = iota // 0, file owner pays WhoPays3rdParty // 1, 3rd party user pays )
possible variants
Click to show internal directories.
Click to hide internal directories.