gvolume

package
v0.0.0-...-f3abbe6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

Map between speed unit of byte and bits size

Variables

This section is empty.

Functions

This section is empty.

Types

type Volume

type Volume gspeed.Speed

func FromByteSize

func FromByteSize(size float64) (Volume, error)

func ParseString

func ParseString(volume string) (Volume, error)

volume string sample: "2M" "2MB" "2Mbyte" "2Mbytes"

func (*Volume) BiggerThan

func (v *Volume) BiggerThan(v2 Volume) bool

func (Volume) Bits

func (v Volume) Bits() float64

func (Volume) Bytes

func (v Volume) Bytes() uint64

func (*Volume) Equals

func (v *Volume) Equals(v2 Volume) bool

func (Volume) MBytes

func (v Volume) MBytes() float64

func (Volume) MarshalJSON

func (v Volume) MarshalJSON() ([]byte, error)

func (*Volume) SmallerThan

func (v *Volume) SmallerThan(v2 Volume) bool

func (Volume) String

func (v Volume) String() string

func (*Volume) UnmarshalJSON

func (v *Volume) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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