Documentation
¶
Index ¶
- func GetPrefix(id string) (string, error)
- func IsShortID(val string) bool
- func New() string
- func NewNanoID(prefix string) string
- func ParseString(s string) (string, error)
- func ParseStrings(strs ...string) ([]string, error)
- func ParseUUID(u uuid.UUID) string
- func RegisterFakes()
- func ToShortID(s string) (string, error)
- func ToUUID(s string) (uuid.UUID, error)
- func ToUUIDs(strs ...string) ([]uuid.UUID, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseString ¶
ParseString parses a string uuid into a short id, returning an error if invalid
func ParseStrings ¶
ParseStrings parses a list of string UUIDs into a list of shortids, failing all if any fail
func RegisterFakes ¶
func RegisterFakes()
func ToShortID ¶
ToShortID coerces strings to shortids handling shortids or uuids as input An error will be returned for anything else, including empty string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.