Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add units parser for the quota #41

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add units parser for the quota #41

wants to merge 1 commit into from

Conversation

hardillb
Copy link
Contributor

At the moment quota's are specified in bytes, this PR allows units to be used

It uses the xbytes package with the following suffixes:

Index Prefix Decimal Bits Binary Bits (IEC) Decimal Bytes Binary Bytes (IEC)
0 - b (Bits) b (Bits) b (Bits) b (Bits)
0 - B (Bytes) B (Bytes) B (Bytes) B (Bytes)
1 K Kb (KiloBits) Kib (KiloBits) KB (KiloBytes) KiB (KibiBytes)
2 M Mb (MegaBits) Mib (MebiBits) MB (MegaBytes) MiB (MebiBytes)
3 G Gb (GigaBits) Gib (GibiBits) GB (GigaBytes) GiB (GibiBytes)
4 T Tb (TeraBits) Tib (TebiBits) TB (TeraBytes) TiB (TebiBytes)
5 P Pb (PetaBits) Pib (PebiBits) PB (PetaBytes) PiB (PebiBytes)
6 E Eb (ExaBits) Eib (ExbiBits) EB (ExaBytes) EiB (ExbiBytes)
7 Z Zb (ZettaBits) Zib (ZebiBits) ZB (ZettaBytes) ZiB (ZebiBytes)
8 Y Yb (YottaBits) Yib (YobiBits) YB (YottaBytes) YiB (YobiBytes)

@hardillb hardillb added this to the 1.3 milestone Dec 20, 2022
@hardillb hardillb self-assigned this Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant