identifiers

package
v0.0.0-...-13f90e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2017 License: Apache-2.0, CC-BY-SA-4.0 Imports: 3 Imported by: 0

Documentation

Overview

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

To allow such identifiers to be used across various contexts safely, the character set has been restricted to that defined for domains in RFC 1035, section 2.3.1. This will make identifiers safe for use across networks, filesystems and other media.

The identifier specification departs from RFC 1035 in that it allows "labels" to start with number and only enforces a total length restriction of 76 characters.

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(s string) error

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

identifiers must be valid domain identifiers 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 identifier or filesystem path component.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL