Documentation
¶
Overview ¶
Package identity implements lore's typed-prefix source identity scheme, decided in https://github.com/cheetahbyte/lore/issues/8.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID string
ID is a canonical typed-prefix identity, e.g. "github:owner/repo" or "npm:react". The prefix names the Source adapter that owns it; the remainder is that adapter's own reference format.
func New ¶
func New(t SourceType, ref string) ID
New builds an ID from a known type and reference without validating the reference's own format (that's the owning adapter's job).
func Parse ¶
Parse validates and returns s as an ID. s must contain a known type prefix followed by ":" and a non-empty reference.
type SourceType ¶
type SourceType string
const ( GitHub SourceType = "github" NPM SourceType = "npm" PyPI SourceType = "pypi" GoPackage SourceType = "pkg.go.dev" LLMsTxt SourceType = "llms-txt" URL SourceType = "url" )
Click to show internal directories.
Click to hide internal directories.