Documentation ¶
Overview ¶
Package interwiki provides interwiki capabilities. Most of them, at least.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HrefLinkFormatFor ¶ added in v1.11.0
func HrefLinkFormatFor(prefix string) (string, options.InterwikiError)
func ImgSrcFormatFor ¶ added in v1.11.0
func ImgSrcFormatFor(prefix string) (string, options.InterwikiError)
func InitHandlers ¶
Types ¶
type Wiki ¶
type Wiki struct { // Name is the name of the wiki, and is also one of the possible prefices. Name string `json:"name"` // Aliases are alternative prefices you can use instead of Name. This slice can be empty. Aliases []string `json:"aliases,omitempty"` // URL is the address of the wiki. URL string `json:"url"` // LinkHrefFormat is a format string for interwiki links. See Mycomarkup internal docs hidden deep inside for more information. // // This field is optional. If it is not set, it is derived from other data. See the code. LinkHrefFormat string `json:"link_href_format"` ImgSrcFormat string `json:"img_src_format"` // Engine is the engine of the wiki. Invalid values will result in a start-up error. Engine WikiEngine `json:"engine"` }
Wiki is an entry in the interwiki map.
type WikiEngine ¶
type WikiEngine string
WikiEngine is an enumeration of supported interwiki targets.
const ( Mycorrhiza WikiEngine = "mycorrhiza" Betula WikiEngine = "betula" Agora WikiEngine = "agora" // Generic is any website. Generic WikiEngine = "generic" )
func (WikiEngine) Valid ¶ added in v1.11.0
func (we WikiEngine) Valid() bool
Click to show internal directories.
Click to hide internal directories.