Documentation
¶
Overview ¶
Package link reads Djinn's links, djinn://tilasm/<id> and djinn://wish/<id>, which open the app on what they name from anywhere: a browser, a chat, a terminal, a Markdown file. The system hands them to `djinn open`, which the scheme is registered with: a desktop entry on Linux (tools/icons), Djinn.app's Info.plist on macOS (tools/macapp), the registry on Windows (Register).
Index ¶
Constants ¶
const RegistryKey = `Software\Classes\` + Scheme
RegistryKey is where Windows reads the handler of djinn:// links for the user, in HKEY_CURRENT_USER: no administrator rights.
const Scheme = "djinn"
Scheme is the scheme of Djinn's links.
Variables ¶
This section is empty.
Functions ¶
func OpenCommand ¶
OpenCommand is the command Windows runs for a link: exe open "%1".
func Register ¶
Register does nothing outside Windows: a desktop entry registers the scheme on Linux (tools/icons), Djinn.app's Info.plist on macOS (tools/macapp).
func Registered ¶
Registered is true outside Windows: djinn up has nothing to register there.
Types ¶
type Link ¶
Link is a link read: what it names, and its identifier, in lower case.
type RegistryValue ¶
type RegistryValue struct {
Key, Name, Data string
}
RegistryValue is one string value of the registry under RegistryKey: Key is a subkey ("" for RegistryKey itself), Name the value's name ("" for its default value).
func RegistryValues ¶
func RegistryValues(exe string) []RegistryValue
RegistryValues are the values that make exe the handler of djinn:// links on Windows: the URL Protocol value names the key a scheme, and its open command runs `djinn open <link>`.
type UnknownError ¶
type UnknownError struct{ URL string }
UnknownError is a link Djinn does not know.
func (UnknownError) Error ¶
func (e UnknownError) Error() string