Documentation ¶
Index ¶
- Constants
- type Bits
- func ImportInByte(sizeInByte float64) Bits
- func ImportInEB(sizeInEB float64) Bits
- func ImportInEbit(sizeInEbit float64) Bits
- func ImportInEiB(sizeInEiB float64) Bits
- func ImportInEibit(sizeInEibit float64) Bits
- func ImportInGB(sizeInGB float64) Bits
- func ImportInGbit(sizeInGbit float64) Bits
- func ImportInGiB(sizeInGiB float64) Bits
- func ImportInGibit(sizeInGibit float64) Bits
- func ImportInKB(sizeInKB float64) Bits
- func ImportInKbit(sizeInKbit float64) Bits
- func ImportInKiB(sizeInKiB float64) Bits
- func ImportInKibit(sizeInKibit float64) Bits
- func ImportInMB(sizeInMB float64) Bits
- func ImportInMbit(sizeInMbit float64) Bits
- func ImportInMiB(sizeInMiB float64) Bits
- func ImportInMibit(sizeInMibit float64) Bits
- func ImportInPB(sizeInPB float64) Bits
- func ImportInPbit(sizeInPbit float64) Bits
- func ImportInPiB(sizeInPiB float64) Bits
- func ImportInPibit(sizeInPibit float64) Bits
- func ImportInTB(sizeInTB float64) Bits
- func ImportInTbit(sizeInTbit float64) Bits
- func ImportInTiB(sizeInTiB float64) Bits
- func ImportInTibit(sizeInTibit float64) Bits
- func ImportInYB(sizeInYB float64) Bits
- func ImportInYbit(sizeInYbit float64) Bits
- func ImportInYiB(sizeInYiB float64) Bits
- func ImportInYibit(sizeInYibit float64) Bits
- func ImportInZB(sizeInZB float64) Bits
- func ImportInZbit(sizeInZbit float64) Bits
- func ImportInZiB(sizeInZiB float64) Bits
- func ImportInZibit(sizeInZibit float64) Bits
- func Parse(sizeSuffix string) (size Bits, err error)
- func (size Bits) BitString() string
- func (size Bits) Byte() float64
- func (size Bits) ByteString() string
- func (size Bits) EB() float64
- func (size Bits) EBString() string
- func (size Bits) Ebit() float64
- func (size Bits) EbitString() string
- func (size Bits) EiB() float64
- func (size Bits) EiBString() string
- func (size Bits) Eibit() float64
- func (size Bits) EibitString() string
- func (size Bits) GB() float64
- func (size Bits) GBString() string
- func (size Bits) Gbit() float64
- func (size Bits) GbitString() string
- func (size Bits) GetHumanSizeRepresentation() string
- func (size Bits) GetHumanSpeedRepresentation() string
- func (size Bits) GiB() float64
- func (size Bits) GiBString() string
- func (size Bits) Gibit() float64
- func (size Bits) GibitString() string
- func (size Bits) KB() float64
- func (size Bits) KBString() string
- func (size Bits) Kbit() float64
- func (size Bits) KbitString() string
- func (size Bits) KiB() float64
- func (size Bits) KiBString() string
- func (size Bits) Kibit() float64
- func (size Bits) KibitString() string
- func (size Bits) MB() float64
- func (size Bits) MBString() string
- func (size Bits) Mbit() float64
- func (size Bits) MbitString() string
- func (size Bits) MiB() float64
- func (size Bits) MiBString() string
- func (size Bits) Mibit() float64
- func (size Bits) MibitString() string
- func (size Bits) PB() float64
- func (size Bits) PBString() string
- func (size Bits) Pbit() float64
- func (size Bits) PbitString() string
- func (size Bits) PiB() float64
- func (size Bits) PiBString() string
- func (size Bits) Pibit() float64
- func (size Bits) PibitString() string
- func (size Bits) String() string
- func (size Bits) TB() float64
- func (size Bits) TBString() string
- func (size Bits) Tbit() float64
- func (size Bits) TbitString() string
- func (size Bits) TiB() float64
- func (size Bits) TiBString() string
- func (size Bits) Tibit() float64
- func (size Bits) TibitString() string
- func (size Bits) YB() float64
- func (size Bits) YBString() string
- func (size Bits) Ybit() float64
- func (size Bits) YbitString() string
- func (size Bits) YiB() float64
- func (size Bits) YiBString() string
- func (size Bits) Yibit() float64
- func (size Bits) YibitString() string
- func (size Bits) ZB() float64
- func (size Bits) ZBString() string
- func (size Bits) Zbit() float64
- func (size Bits) ZbitString() string
- func (size Bits) ZiB() float64
- func (size Bits) ZiBString() string
- func (size Bits) Zibit() float64
- func (size Bits) ZibitString() string
Constants ¶
const ( // Kbit represents a kilobit Kbit = 1000 // Mbit represents a megabit Mbit = 1000000 // Gbit represents a gigabit Gbit = 1000000000 // Tbit represents a terabit Tbit = 1000000000000 // Pbit represents a petabit Pbit = 1000000000000000 // Ebit represents an exabit Ebit = 1000000000000000000 // Zbit represents a zettabit (overflows int64) Zbit = 1000000000000000000000 // Ybit represents a yottabit (overflows int64) Ybit = 1000000000000000000000000 )
Decimal prefix of bits
const ( // Kibit represents a kibibit Kibit = 1 << 10 // Mibit represents a mebibit Mibit = 1 << 20 // Gibit represents a gibibit Gibit = 1 << 30 // Tibit represents a tebibit Tibit = 1 << 40 // Pibit represents a pebibit Pibit = 1 << 50 // Eibit represents an exbibit Eibit = 1 << 60 // Zibit represents a zebibit (overflows int64) Zibit = 1 << 70 // Yibit represents a yobibit (overflows int64) Yibit = 1 << 80 )
Binary prefix of bits
const ( // KB represents a kilobyte KB = Kbit * Byte // MB represents a megabyte MB = Mbit * Byte // GB represents a gigabyte GB = Gbit * Byte // TB represents a terabyte TB = Tbit * Byte // PB represents a petabyte PB = Pbit * Byte // EB represents an exabyte EB = Ebit * Byte // ZB represents a zettabyte (overflows int64) ZB = Zbit * Byte // YB represents a yottabyte (overflows int64) YB = Ybit * Byte )
Decimal prefix of bytes
const ( // KiB represents a kibibyte KiB = Kibit * Byte // MiB represents a mebibyte MiB = Mibit * Byte // GiB represents a gibibyte GiB = Gibit * Byte // TiB represents a tebibyte TiB = Tibit * Byte // PiB represents a pebibyte PiB = Pibit * Byte // EiB represents an exbibyte (overflows int64) EiB = Eibit * Byte // ZiB represents a zebibyte (overflows int64) ZiB = Zbit * Byte // YiB represents a yobibyte (overflows int64) YiB = Ybit * Byte )
Binary prefix of bytes
const Byte = 8
Byte represent a byte
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bits ¶
type Bits uint64
Bits represent a size in bits
func ImportInByte ¶
ImportInByte imports a number in byte
func ImportInEbit ¶
ImportInEbit imports a number in exabit
func ImportInEiB ¶
ImportInEiB imports a number in exabyte (sizeInEiB better < 1)
func ImportInEibit ¶
ImportInEibit imports a number in exbibit
func ImportInGbit ¶
ImportInGbit imports a number in gigabit
func ImportInGiB ¶
ImportInGiB imports a number in gigabyte
func ImportInGibit ¶
ImportInGibit imports a number in gibibit
func ImportInKbit ¶
ImportInKbit imports a number in kilobit
func ImportInKiB ¶
ImportInKiB imports a number in kilobyte
func ImportInKibit ¶
ImportInKibit imports a number in kibibit
func ImportInMbit ¶
ImportInMbit imports a number in megabit
func ImportInMiB ¶
ImportInMiB imports a number in megabyte
func ImportInMibit ¶
ImportInMibit imports a number in mebibit
func ImportInPbit ¶
ImportInPbit imports a number in petabit
func ImportInPiB ¶
ImportInPiB imports a number in petabyte
func ImportInPibit ¶
ImportInPibit imports a number in pebibit
func ImportInTbit ¶
ImportInTbit imports a number in terabit
func ImportInTiB ¶
ImportInTiB imports a number in terabyte
func ImportInTibit ¶
ImportInTibit imports a number in tebibit
func ImportInYB ¶
ImportInYB imports a number in yottabyte (sizeInYB better < 1)
func ImportInYbit ¶
ImportInYbit imports a number in yottabit (sizeInYbit better < 1)
func ImportInYiB ¶
ImportInYiB imports a number in yottabyte (sizeInYiB better < 1)
func ImportInYibit ¶
ImportInYibit imports a number in yobibit (sizeInYibit better < 1)
func ImportInZB ¶
ImportInZB imports a number in zettabyte (sizeInZB better < 1)
func ImportInZbit ¶
ImportInZbit imports a number in zettabit (sizeInZbit better < 1)
func ImportInZiB ¶
ImportInZiB imports a number in zettabyte (sizeInZiB better < 1)
func ImportInZibit ¶
ImportInZibit imports a number in zebibit (sizeInZibit better < 1)
func (Bits) ByteString ¶
ByteString returns the size in byte with unit suffix
func (Bits) EbitString ¶
EbitString returns the size in exabit with unit suffix
func (Bits) EiBString ¶
EiBString returns the size in exbibyte with unit suffix (carefull with sub zeros !)
func (Bits) EibitString ¶
EibitString returns the size in exbibit with unit suffix
func (Bits) GbitString ¶
GbitString returns the size in gigabit with unit suffix
func (Bits) GetHumanSizeRepresentation ¶
GetHumanSizeRepresentation returns the size in a human readable binary prefix of bytes format
func (Bits) GetHumanSpeedRepresentation ¶
GetHumanSpeedRepresentation returns the size in a human readable decimal prefix of bits format
func (Bits) GibitString ¶
GibitString returns the size in gibibit with unit suffix
func (Bits) KbitString ¶
KbitString returns the size in kilobit with unit suffix
func (Bits) KibitString ¶
KibitString returns the size in kibibit with unit suffix
func (Bits) MbitString ¶
MbitString returns the size in megabit with unit suffix
func (Bits) MibitString ¶
MibitString returns the size in mebibit with unit suffix
func (Bits) PbitString ¶
PbitString returns the size in petabit with unit suffix
func (Bits) PibitString ¶
PibitString returns the size in pebibit with unit suffix
func (Bits) String ¶
String allows direct reprensetation of Bit by calling GetHumanSizeRepresentation()
func (Bits) TbitString ¶
TbitString returns the size in terabit with unit suffix
func (Bits) TibitString ¶
TibitString returns the size in tebibit with unit suffix
func (Bits) YBString ¶
YBString returns the size in yottabyte with unit suffix (carefull with sub zeros !)
func (Bits) YbitString ¶
YbitString returns the size in yottabit with unit suffix (carefull with sub zeros !)
func (Bits) YiBString ¶
YiBString returns the size in yobibyte with unit suffix (carefull with sub zeros !)
func (Bits) YibitString ¶
YibitString returns the size in yobibit with unit suffix (carefull with sub zeros !)
func (Bits) ZBString ¶
ZBString returns the size in zettabyte with unit suffix (carefull with sub zeros !)
func (Bits) ZbitString ¶
ZbitString returns the size in zettabit with unit suffix (carefull with sub zeros !)
func (Bits) ZiBString ¶
ZiBString returns the size in zebibyte with unit suffix (carefull with sub zeros !)
func (Bits) ZibitString ¶
ZibitString returns the size in zebibit with unit suffix (carefull with sub zeros !)