regexp_deprecated.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package reference
  2. import (
  3. "github.com/distribution/reference"
  4. )
  5. // DigestRegexp matches well-formed digests, including algorithm (e.g. "sha256:<encoded>").
  6. //
  7. // Deprecated: use [reference.DigestRegexp].
  8. var DigestRegexp = reference.DigestRegexp
  9. // DomainRegexp matches hostname or IP-addresses, optionally including a port
  10. // number. It defines the structure of potential domain components that may be
  11. // part of image names. This is purposely a subset of what is allowed by DNS to
  12. // ensure backwards compatibility with Docker image names. It may be a subset of
  13. // DNS domain name, an IPv4 address in decimal format, or an IPv6 address between
  14. // square brackets (excluding zone identifiers as defined by [RFC 6874] or special
  15. // addresses such as IPv4-Mapped).
  16. //
  17. // Deprecated: use [reference.DomainRegexp].
  18. //
  19. // [RFC 6874]: https://www.rfc-editor.org/rfc/rfc6874.
  20. var DomainRegexp = reference.DigestRegexp
  21. // IdentifierRegexp is the format for string identifier used as a
  22. // content addressable identifier using sha256. These identifiers
  23. // are like digests without the algorithm, since sha256 is used.
  24. //
  25. // Deprecated: use [reference.IdentifierRegexp].
  26. var IdentifierRegexp = reference.IdentifierRegexp
  27. // NameRegexp is the format for the name component of references, including
  28. // an optional domain and port, but without tag or digest suffix.
  29. //
  30. // Deprecated: use [reference.NameRegexp].
  31. var NameRegexp = reference.NameRegexp
  32. // ReferenceRegexp is the full supported format of a reference. The regexp
  33. // is anchored and has capturing groups for name, tag, and digest
  34. // components.
  35. //
  36. // Deprecated: use [reference.ReferenceRegexp].
  37. var ReferenceRegexp = reference.ReferenceRegexp
  38. // TagRegexp matches valid tag names. From [docker/docker:graph/tags.go].
  39. //
  40. // Deprecated: use [reference.TagRegexp].
  41. //
  42. // [docker/docker:graph/tags.go]: https://github.com/moby/moby/blob/v1.6.0/graph/tags.go#L26-L28
  43. var TagRegexp = reference.TagRegexp