1 unstable release
0.1.0 | Jan 6, 2023 |
---|
#1531 in Cryptography
Used in 2 crates
(via seaplane)
18KB
289 lines
Container Image Reference
A library for validating and using container image references
Grammar
reference := name [ ":" tag ] [ "@" digest ]
name := [domain '/'] path-component ['/' path-component]*
domain := domain-component ['.' domain-component]* [':' port-number]
domain-component := /([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])/
port-number := /[0-9]+/
path-component := alpha-numeric [separator alpha-numeric]*
alpha-numeric := /[a-z0-9]+/
separator := /[_.]|__|[-]*/
tag := /[\w][\w.-]{0,127}/
digest := digest-algorithm ":" digest-hex
digest-algorithm := digest-algorithm-component [ digest-algorithm-separator
digest-algorithm-component ]* digest-algorithm-separator := /[+.-_]/
digest-algorithm-component := /[A-Za-z][A-Za-z0-9]*/
digest-hex := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value
identifier := /[a-f0-9]{64}/
short-identifier := /[a-f0-9]{6,64}/
License
Licensed under the Apache License, Version 2.0, LICENSE. Copyright 2023 Seaplane IO, Inc.
Dependencies
~1.3–2MB
~43K SLoC