Documentation ¶
Index ¶
- Constants
- func SetDefaultUnit(unit rune)
- func ViperDecoderHook() libmap.DecodeHookFuncType
- type Size
- func (s Size) Code(unit rune) string
- func (s Size) ExaBytes() uint64
- func (s Size) Float64() float64
- func (s Size) Format(format string) string
- func (s Size) GigaBytes() uint64
- func (s Size) Int64() int64
- func (s Size) KiloBytes() uint64
- func (s Size) MarshalCBOR() ([]byte, error)
- func (s Size) MarshalJSON() ([]byte, error)
- func (s Size) MarshalTOML() ([]byte, error)
- func (s Size) MarshalText() ([]byte, error)
- func (s Size) MarshalYAML() (interface{}, error)
- func (s Size) MegaBytes() uint64
- func (s Size) PetaBytes() uint64
- func (s Size) String() string
- func (s Size) TeraBytes() uint64
- func (s Size) Uint64() uint64
- func (s Size) Unit(unit rune) string
- func (s *Size) UnmarshalCBOR(bytes []byte) error
- func (s *Size) UnmarshalJSON(bytes []byte) error
- func (s *Size) UnmarshalTOML(i interface{}) error
- func (s *Size) UnmarshalText(bytes []byte) error
- func (s *Size) UnmarshalYAML(value *yaml.Node) error
Constants ¶
View Source
const ( FormatRound0 = "%.0f" FormatRound1 = "%.1f" FormatRound2 = "%.2f" FormatRound3 = "%.3f" )
Variables ¶
This section is empty.
Functions ¶
func SetDefaultUnit ¶
func SetDefaultUnit(unit rune)
func ViperDecoderHook ¶
func ViperDecoderHook() libmap.DecodeHookFuncType
Types ¶
type Size ¶
type Size uint64
func ParseByteAsSize ¶
func SizeFromInt64 ¶
func (Size) MarshalCBOR ¶
func (Size) MarshalJSON ¶
func (Size) MarshalTOML ¶
func (Size) MarshalText ¶
func (Size) MarshalYAML ¶
func (*Size) UnmarshalCBOR ¶
func (*Size) UnmarshalJSON ¶
func (*Size) UnmarshalTOML ¶
func (*Size) UnmarshalText ¶
func (*Size) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.