strongunits

package
v4.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type B

type B uint64

B represents bytes

func (B) ToBytes

func (b B) ToBytes() B

ToBytes is a pass-through function for bytes

type GiB

type GiB uint64

GiB represents GiB

func ToGiB

func ToGiB(b StorageUnits) GiB

ToGiB converts any StorageUnit type to GiB

func (GiB) ToBytes

func (g GiB) ToBytes() B

ToBytes converts GiB to bytes

type KiB

type KiB uint64

KiB represents KiB

func ToKiB

func ToKiB(b StorageUnits) KiB

ToKiB converts any StorageUnit type to KiB

func (KiB) ToBytes

func (k KiB) ToBytes() B

ToBytes converts KiB to bytes

type MiB

type MiB uint64

MiB represents MiB

func ToMib

func ToMib(b StorageUnits) MiB

ToMib converts any StorageUnit type to MiB

func (MiB) ToBytes

func (m MiB) ToBytes() B

ToBytes converts MiB to bytes

type StorageUnits

type StorageUnits interface {
	ToBytes() B
}

StorageUnits is an interface for converting disk/memory storage units amongst each other.

Jump to

Keyboard shortcuts

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