slugid

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package slugid implements the slugid subcommands.

Index

Constants

This section is empty.

Variables

View Source
var (

	// RegexpSlugV4 is the regular expression that all V4 Slug IDs should conform to
	RegexpSlugV4 = regexp.MustCompile("^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$")

	// RegexpUUIDV4 is the regular expression that all V4 UUIDs should conform to
	RegexpUUIDV4 = regexp.MustCompile("^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$")

	// RegexpSlugNice is the regular expression that all "nice" Slug IDs should conform to
	RegexpSlugNice = regexp.MustCompile("^[A-Za-f][A-Za-z0-9_-]{7}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$")

	// RegexpUUIDNice is the regular expression that all "nice" UUIDs should conform to
	RegexpUUIDNice = regexp.MustCompile("^[0-7][a-f0-9]{7}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$")

	// Command is the root of the slugid subtree.
	Command = &cobra.Command{
		Use:   "slugid",
		Short: "Generates V4 UUIDs and encodes/decodes them from/to 22 character URL-safe base64 slugs.",
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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