Documentation ¶
Index ¶
- Constants
- type Volume
- func (v Volume) Add(v2 Volume) Volume
- func (v Volume) Bits() float64
- func (v Volume) Bytes() uint64
- func (v *Volume) Equals(v2 Volume) bool
- func (v *Volume) GreaterThan(v2 Volume) bool
- func (v *Volume) GreaterThanOrEqual(v2 Volume) bool
- func (v *Volume) LessThan(v2 Volume) bool
- func (v *Volume) LessThanOrEqual(v2 Volume) bool
- func (v Volume) MBytes() float64
- func (v Volume) MarshalJSON() ([]byte, error)
- func (v Volume) Mul(n uint64) Volume
- func (v Volume) String() string
- func (v Volume) Sub(v2 Volume) Volume
- func (v *Volume) UnmarshalJSON(b []byte) error
Constants ¶
View Source
const ( KB = Volume(gspeed.KB) MB = Volume(gspeed.MB) GB = Volume(gspeed.GB) TB = Volume(gspeed.TB) PB = Volume(gspeed.PB) EB = Volume(gspeed.EB) ZB = Volume(gspeed.ZB) YB = Volume(gspeed.YB) Zero = Volume(0) )
Map between speed unit of byte and bits size
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Volume ¶
func FromByteSize ¶
func FromByteSizeUint64 ¶
func ParseString ¶
volume string sample: "2M" "2MB" "2Mbyte" "2Mbytes"
func (*Volume) GreaterThan ¶
func (*Volume) GreaterThanOrEqual ¶
func (*Volume) LessThanOrEqual ¶
func (Volume) MarshalJSON ¶
func (*Volume) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.