diff options
author | Alan Pearce | 2024-06-21 15:35:23 +0200 |
---|---|---|
committer | Alan Pearce | 2024-06-21 15:44:12 +0200 |
commit | 58a7fc78b8e17dc4ce009767afd9066bbaa9328f (patch) | |
tree | e5d4c12584f22d7718aea87540e4e437f1b47528 /internal/opensearch | |
parent | a1dfc548198a1326e71f1dd70303a5d3441f7a39 (diff) | |
download | searchix-58a7fc78b8e17dc4ce009767afd9066bbaa9328f.tar.lz searchix-58a7fc78b8e17dc4ce009767afd9066bbaa9328f.tar.zst searchix-58a7fc78b8e17dc4ce009767afd9066bbaa9328f.zip |
refactor: use encoding/xml for OpenSearchDescription
Diffstat (limited to 'internal/opensearch')
-rw-r--r-- | internal/opensearch/opensearch.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/opensearch/opensearch.go b/internal/opensearch/opensearch.go new file mode 100644 index 0000000..a9b3c9c --- /dev/null +++ b/internal/opensearch/opensearch.go @@ -0,0 +1,21 @@ +package opensearch + +import ( + "encoding/xml" + "searchix/internal/config" +) + +type Description struct { + XMLName xml.Name `xml:"http://a9.com/-/spec/opensearch/1.1/ OpenSearchDescription"` + Description string + LongName string + ShortName string + SearchForm *config.URL `xml:"http://www.mozilla.org/2006/browser/search/ SearchForm"` + URL URL `xml:"Url"` +} + +type URL struct { + Method string `xml:"method,attr"` + Template *config.URL `xml:"template,attr"` + Type string `xml:"type,attr"` +} |