package identifiers

import "github.com/containerd/containerd/identifiers"

Package identifiers provides common validation for identifiers and keys across containerd.

Identifiers in containerd must be a alphanumeric, allowing limited underscores, dashes and dots.

While the character set may be expanded in the future, identifiers are guaranteed to be safely used as filesystem path components.

Index

Functions

func Validate

func Validate(s string) error

Validate return nil if the string s is a valid identifier.

identifiers must be valid domain names according to RFC 1035, section 2.3.1. To enforce case insensitvity, all characters must be lower case.

In general, identifiers that pass this validation, should be safe for use as a domain names or filesystem path component.

Source Files

validate.go

Version
v1.1.1
Published
Jul 9, 2018
Platform
js/wasm
Imports
3 packages
Last checked
1 hour ago

Tools for package owners.