core

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSize

type DataSize interface {
	// Convert the DataSize object to the byte representation.
	//
	// Returns: The number of bytes for the data size.
	ToBytes() *float64
	// Convert the DataSize object to its gibibyte representation.
	//
	// If the data size doesn't fit evently into gibibytes it will be rounded
	// up to the closest gibibyte which will be required to hold all the data.
	//
	// Returns: The number of gibibytes for the data size.
	ToGibibytes() *float64
	// Convert the DataSize object to its gigabyte representation.
	//
	// If the data size doesn't fit evently into gigabytes it will be rounded
	// up to the closest gigabyte which will be required to hold all the data.
	//
	// Returns: The number of gigabytes for the data size.
	ToGigabytes() *float64
	// Convert the DataSize object to its kibibyte representation.
	//
	// If the data size doesn't fit evently into kibibytes it will be rounded
	// up to the closest kibibyte which will be required to hold all the data.
	//
	// Returns: The number of kibibytes for the data size.
	ToKibibytes() *float64
	// Convert the DataSize object to its kilobyte representation.
	//
	// If the data size doesn't fit evently into kilobytes it will be rounded
	// up to the closest kilobyte which will be required to hold all the data.
	//
	// Returns: The number of kilobytes for the data size.
	ToKilobytes() *float64
	// Convert the DataSize object to its mebibyte representation.
	//
	// If the data size doesn't fit evently into mebibytes it will be rounded
	// up to the closest mebibyte which will be required to hold all the data.
	//
	// Returns: The number of mebibytes for the data size.
	ToMebibytes() *float64
	// Convert the DataSize object to its megabyte representation.
	//
	// If the data size doesn't fit evently into megabytes it will be rounded
	// up to the closest megabyte which will be required to hold all the data.
	//
	// Returns: The number of megabytes for the data size.
	ToMegabytes() *float64
	// Convert the DataSize object to its pebibyte representation.
	//
	// If the data size doesn't fit evently into pebibytes it will be rounded
	// up to the closest pebibyte which will be required to hold all the data.
	//
	// Returns: The number of pebibytes for the data size.
	ToPebibytes() *float64
	// Convert the DataSize object to its petabyte representation.
	//
	// If the data size doesn't fit evently into petabytes it will be rounded
	// up to the closest petabyte which will be required to hold all the data.
	//
	// Returns: The number of petabytes for the data size.
	ToPetabytes() *float64
	// Convert the DataSize object to its tebibyte representation.
	//
	// If the data size doesn't fit evently into tebibytes it will be rounded
	// up to the closest tebibyte which will be required to hold all the data.
	//
	// Returns: The number of tebibytes for the data size.
	ToTebibytes() *float64
	// Convert the DataSize object to its terabyte representation.
	//
	// If the data size doesn't fit evently into terabytes it will be rounded
	// up to the closest terabyte which will be required to hold all the data.
	//
	// Returns: The number of terabytes for the data size.
	ToTerabytes() *float64
}

func DataSize_Bytes

func DataSize_Bytes(bytes *float64) DataSize

Create a `DataSize` representing an amount of bytes.

Returns: A `DataSize` representing the specified number of bytes.

func DataSize_Gibibytes

func DataSize_Gibibytes(gibibytes *float64) DataSize

Create a `DataSize` representing an amount of gibibytes.

Returns: A `DataSize` representing the specified number of gibibytes.

func DataSize_Gigabytes

func DataSize_Gigabytes(gigabytes *float64) DataSize

Create a `DataSize` representing an amount of gigabytes.

Returns: A `DataSize` representing the specified number of gigabytes.

func DataSize_Kibibytes

func DataSize_Kibibytes(kibibytes *float64) DataSize

Create a `DataSize` representing an amount of kibibytes.

Returns: A `DataSize` representing the specified number of kibibytes.

func DataSize_Kilobytes

func DataSize_Kilobytes(kilobytes *float64) DataSize

Create a `DataSize` representing an amount of kilobytes.

Returns: A `DataSize` representing the specified number of kilobytes.

func DataSize_Mebibytes

func DataSize_Mebibytes(mebibytes *float64) DataSize

Create a `DataSize` representing an amount of mebibytes.

Returns: A `DataSize` representing the specified number of mebibytes.

func DataSize_Megabytes

func DataSize_Megabytes(megabytes *float64) DataSize

Create a `DataSize` representing an amount of megabytes.

Returns: A `DataSize` representing the specified number of megabytes.

func DataSize_Pebibytes

func DataSize_Pebibytes(pebibytes *float64) DataSize

Create a `DataSize` representing an amount of pebibytes.

Returns: A `DataSize` representing the specified number of pebibytes.

func DataSize_Petabytes

func DataSize_Petabytes(petabytes *float64) DataSize

Create a `DataSize` representing an amount of petabytes.

Returns: A `DataSize` representing the specified number of petabytes.

func DataSize_Tebibytes

func DataSize_Tebibytes(tebibytes *float64) DataSize

Create a `DataSize` representing an amount of tebibytes.

Returns: A `DataSize` representing the specified number of tebibytes.

func DataSize_Terabytes

func DataSize_Terabytes(terabytes *float64) DataSize

Create a `DataSize` representing an amount of terabytes.

Returns: A `DataSize` representing the specified number of terabytes.

Jump to

Keyboard shortcuts

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