identifier

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package identifier provides collision-resistant string-based identifiers.

Index

Constants

View Source
const (
	// PrefixSynchronization is the prefix used for synchronization session
	// identifiers.
	PrefixSynchronization = "sync"
	// PrefixForwarding is the prefix used for forwarding session identifiers.
	PrefixForwarding = "fwrd"
	// PrefixProject is the prefix used for project identifiers.
	PrefixProject = "proj"
	// PrefixPrompter is the prefix used for prompter identifiers.
	PrefixPrompter = "pmtr"
)

Variables

This section is empty.

Functions

func IsValid

func IsValid(value string) bool

IsValid determines whether or not a string is a valid identifier.

func New

func New(prefix string) (string, error)

New generates a new collision-resistant identifier with the specified prefix. The prefix should have a length of RequiredPrefixLength.

Types

This section is empty.

Jump to

Keyboard shortcuts

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