Documentation
¶
Overview ¶
pkg/utils/identifier.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶ added in v0.27.0
func ReadBytesFromFile ¶ added in v0.18.0
Types ¶
type IdentifierStringType ¶ added in v0.21.0
type IdentifierStringType int
IdentifierStringType defines the type of string identified.
const ( // StringTypeUnknown indicates the string type could not be determined or is empty. StringTypeUnknown IdentifierStringType = iota // StringTypeUUID indicates the string is a valid UUID. StringTypeUUID // StringTypeURI indicates the string is a valid absolute URI. StringTypeURI // StringTypeGeneric indicates the string is not a UUID or URI, and can be treated as a generic identifier (e.g., a name). StringTypeGeneric )
func ClassifyString ¶ added in v0.21.0
func ClassifyString(input string) IdentifierStringType
ClassifyString attempts to determine if the input string is a UUID, an absolute URI, or a generic string. It prioritizes UUID, then URI, then defaults to Generic.
func (IdentifierStringType) String ¶ added in v0.21.0
func (it IdentifierStringType) String() string
String returns a string representation of the IdentifierStringType.
Click to show internal directories.
Click to hide internal directories.