entry
typeentry is the persisted record for a single alias.
Value
v0.entry
aliases
v0.Treealiases maps alias (string) -> \*entry, kept in an avl.Tree for deterministic iteration order in Render.
- OID
- 0f9e5d…5f49:4
aliases details
isAlphanumeric
func(s string) boolisAlphanumeric reports whether s is non-empty and made only of \[0-9A-Za-z].
- OID
- 0f9e5d…5f49:5
isAlphanumeric details
Shorten
func(alias string, url string, note string)Shorten registers \`alias -> url\` owned by the caller. Rules: - alias must be non-empty and alphanumeric; - url must be non-empty; - if the alias is unclaimed, it is created owned by the caller; - if it is already claimed by the caller, the url/note are updated; - if it is claimed by someone else, the call aborts.
- OID
- 0f9e5d…5f49:7
Shorten details
Remove
func(alias string)Remove deletes an alias owned by the caller. Aborts if the alias does not exist or the caller is not the owner.
- OID
- 0f9e5d…5f49:8
Remove details
Lookup
func(alias string) (string, bool)Lookup returns the target url for an alias and whether it exists. It is a read-only helper and does NOT increment the click counter.
- OID
- 0f9e5d…5f49:9
Lookup details
Render
func(path string) stringRender renders Markdown. The root path lists every alias; "/\<alias>" shows a single alias detail and bumps its click counter.
- OID
- 0f9e5d…5f49:10
Render details
renderIndex
func() string- OID
- 0f9e5d…5f49:11
renderIndex details
short
func(s string) stringshort truncates a long address for the index table.
- OID
- 0f9e5d…5f49:12
short details
itoa
func(n int) stringitoa converts a non-negative int to its decimal string without importing strconv (kept minimal & deterministic).
- OID
- 0f9e5d…5f49:13