opensearch

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	XMLName xml.Name `xml:"Image"`
	Width   int      `xml:"width,attr"`
	Height  int      `xml:"height,attr"`
	Source  string   `xml:",chardata"`
}

type OpenSearch

type OpenSearch struct {
	XMLName        xml.Name `xml:"OpenSearchDescription"`
	XMLNS          string   `xml:"xmlns,attr"`
	ShortName      string   `xml:"ShortName"`
	LongName       string   `xml:"LongName"`
	Description    string   `xml:"Description"`
	Image          Image    `xml:"Image"`
	Site           string   `xml:"site"`
	InputEncoding  string   `xml:"InputEncoding"`
	OutputEncoding string   `xml:"OutputEncoding"`
	URL            URL      `xml:"Url"`
}

func NewOpenSearch

func NewOpenSearch(user *twtr.User, client *middleware.Client) *OpenSearch

func (*OpenSearch) Render

func (o *OpenSearch) Render(w http.ResponseWriter) error

func (*OpenSearch) ToString

func (o *OpenSearch) ToString() (string, error)

func (*OpenSearch) WriteContentType

func (o *OpenSearch) WriteContentType(w http.ResponseWriter)

type Param

type Param struct {
	XMLName xml.Name `xml:"Param"`
	Name    string   `xml:"name,attr"`
	Value   string   `xml:"value,attr"`
}

type URL

type URL struct {
	XMLName  xml.Name `xml:"Url"`
	Type     string   `xml:"type,attr"`
	Method   string   `xml:"method,attr"`
	Template string   `xml:"template,attr"`
	Params   []Param  `xml:"Params"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL