Documentation
¶
Index ¶
- Constants
- func AppendOpenSearchPluginsHandler(next http.Handler, plugins map[string]*OpenSearchDescription) http.Handler
- func OpenSearchHandler(desc *OpenSearchDescription) (http.Handler, error)
- type BasicOpenSearchDescriptionOptions
- type OpenSearchDescription
- type OpenSearchImage
- type OpenSearchURL
- type OpenSearchURLParameter
Constants ¶
View Source
const DEFAULT_IMAGE_HEIGHT int = 16
View Source
const DEFAULT_IMAGE_URI string = "" /* 5617-byte string literal not displayed */
View Source
const DEFAULT_IMAGE_WIDTH int = 16
View Source
const DEFAULT_SEARCHTERMS string = "{searchTerms}"
View Source
const DEFAULT_URL_METHOD string = "GET"
View Source
const DEFAULT_URL_TYPE string = "text/html"
View Source
const NS_MOZILLA_SEARCH string = "http://www.mozilla.org/2006/browser/search/"
View Source
const NS_OPENSEARCH string = "http://a9.com/-/spec/opensearch/1.1/"
View Source
const OPENSEARCH_CONTENT_TYPE string = "application/opensearchdescription+xml"
Variables ¶
This section is empty.
Functions ¶
func OpenSearchHandler ¶
func OpenSearchHandler(desc *OpenSearchDescription) (http.Handler, error)
Types ¶
type OpenSearchDescription ¶
type OpenSearchDescription struct {
XMLName xml.Name `xml:"OpenSearchDescription"`
NSMoz string `xml:"xmlns:moz,attr"`
InputEncoding string `xml:"InputEncoding"`
NSOpenSearch string `xml:"xmlns,attr"`
ShortName string `xml:"ShortName"`
Description string `xml:"Description"`
Image *OpenSearchImage `xml:"Image"`
URL *OpenSearchURL `xml:"Url"`
SearchForm string `xml:"moz:searchForm"`
}
func BasicOpenSearchDescription ¶
func BasicOpenSearchDescription(opts *BasicOpenSearchDescriptionOptions) (*OpenSearchDescription, error)
func (*OpenSearchDescription) Marshal ¶
func (d *OpenSearchDescription) Marshal() ([]byte, error)
type OpenSearchImage ¶
type OpenSearchURL ¶
type OpenSearchURL struct {
Type string `xml:"type,attr"`
Method string `xml:"method,attr"`
Template string `xml:"template,attr"`
Parameters []*OpenSearchURLParameter `xml:"Param"`
}
type OpenSearchURLParameter ¶
Click to show internal directories.
Click to hide internal directories.