Documentation
¶
Overview ¶
Package link provides link management services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key string
Key is the shortened key of a Link URL.
func Shorten ¶
Shorten shortens the Link URL and generates a new Key if the Key is empty. Otherwise, it returns the same Key. It returns an error if the Link is invalid.
type Link ¶
type Link struct {
// URL is the original URL of the link.
URL string
// Key is the shortened key of the URL.
Key Key
}
Link represents a link.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
linkd
command
|
|
|
kit
|
|
|
hio
Package hio (HTTP Input and Output) provides helpers for HTTP request and response handling.
|
Package hio (HTTP Input and Output) provides helpers for HTTP request and response handling. |
|
hlog
Package hlog (HTTP log) provides HTTP request and response logging.
|
Package hlog (HTTP log) provides HTTP request and response logging. |
|
traceid
Package traceid provides trace ID related functionality.
|
Package traceid provides trace ID related functionality. |
|
Package rest provides link services with a REST API over HTTP.
|
Package rest provides link services with a REST API over HTTP. |
Click to show internal directories.
Click to hide internal directories.