Documentation
¶
Overview ¶
Package meter storage metering
Index ¶
- Constants
- func HumanSize(bytes uint64) (s string)
- func ParseBytes(s string) (uint64, error)
- type ByteSize
- func (b ByteSize) Bytes() uint64
- func (b ByteSize) EBytes() float64
- func (b ByteSize) GBytes() float64
- func (b ByteSize) HumanSize() string
- func (b ByteSize) KBytes() float64
- func (b ByteSize) MBytes() float64
- func (b ByteSize) MarshalText() ([]byte, error)
- func (b ByteSize) PBytes() float64
- func (b ByteSize) String() string
- func (b ByteSize) TBytes() float64
- func (b *ByteSize) UnmarshalText(t []byte) error
Examples ¶
Constants ¶
View Source
const ( Byte = 1 KByte = Byte << 10 MByte = KByte << 10 GByte = MByte << 10 TByte = GByte << 10 PByte = TByte << 10 EByte = PByte << 10 )
Storage unit constants.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByteSize ¶
type ByteSize uint64
ByteSize byte size
func (ByteSize) MarshalText ¶
MarshalText marshal to text
func (*ByteSize) UnmarshalText ¶
UnmarshalText unmarshal to ByteSize
Click to show internal directories.
Click to hide internal directories.