Documentation ¶
Index ¶
- type BaseLink
- func (l BaseLink) Base() BaseLink
- func (l BaseLink) IsRegexp() bool
- func (l BaseLink) Len() int
- func (l BaseLink) LiteralPrefix() string
- func (l BaseLink) Match(path string) (bool, error)
- func (l BaseLink) MatchDescription(path string) bool
- func (l BaseLink) MatchPrefix(prefix string) bool
- func (l BaseLink) PathString() string
- func (l BaseLink) Transform(path string, originalURL url.URL) (*url.URL, error)
- type Link
- type LinkImpl
- type LinkSliceByPath
- type LinkSliceByPathLength
- type RegexpLink
- func (l RegexpLink) GetRegexp() (*regexp.Regexp, error)
- func (l RegexpLink) Len() int
- func (l RegexpLink) LiteralPrefix() string
- func (l RegexpLink) Match(path string) (bool, error)
- func (l RegexpLink) MatchPrefix(prefix string) bool
- func (l RegexpLink) PathString() string
- func (l RegexpLink) Transform(path string, originalURL url.URL) (*url.URL, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseLink ¶
type BaseLink struct { Path string Target string Description string Author string EditURL *url.URL }
Link defines each individual link
func (BaseLink) LiteralPrefix ¶
func (BaseLink) Match ¶
Match returns whether a link completely starts a string or includes the link as part of it's path
func (BaseLink) MatchDescription ¶
MatchDescription returns whether a string matches the description
func (BaseLink) MatchPrefix ¶
MatchPrefix returns a suggestion if given path is a prefix for a link
func (BaseLink) PathString ¶
type Link ¶
type LinkSliceByPath ¶
type LinkSliceByPath []Link
func (LinkSliceByPath) Len ¶
func (s LinkSliceByPath) Len() int
func (LinkSliceByPath) Less ¶
func (s LinkSliceByPath) Less(i, j int) bool
func (LinkSliceByPath) Swap ¶
func (s LinkSliceByPath) Swap(i, j int)
type LinkSliceByPathLength ¶
type LinkSliceByPathLength []Link
func (LinkSliceByPathLength) Len ¶
func (s LinkSliceByPathLength) Len() int
func (LinkSliceByPathLength) Less ¶
func (s LinkSliceByPathLength) Less(i, j int) bool
func (LinkSliceByPathLength) Swap ¶
func (s LinkSliceByPathLength) Swap(i, j int)
type RegexpLink ¶
type RegexpLink struct {
BaseLink
}
func (RegexpLink) GetRegexp ¶
func (l RegexpLink) GetRegexp() (*regexp.Regexp, error)
GetRegexp returns a compiled regexp or an error
func (RegexpLink) Len ¶
func (l RegexpLink) Len() int
func (RegexpLink) LiteralPrefix ¶
func (l RegexpLink) LiteralPrefix() string
func (RegexpLink) MatchPrefix ¶
func (l RegexpLink) MatchPrefix(prefix string) bool
func (RegexpLink) PathString ¶
func (l RegexpLink) PathString() string
Click to show internal directories.
Click to hide internal directories.