]> Sergey Matveev's repositories - meta4ra.git/blobdiff - common.go
meta4-check workability again
[meta4ra.git] / common.go
index 0c56faf34736d4ae84ca446b1a52a88fd4ed36f3..a20c2439ced190e6bf3e325888a9f4c86080ce1f 100644 (file)
--- a/common.go
+++ b/common.go
@@ -18,53 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // Metalink 4.0 utilities
 package meta4ra
 
-import (
-       "encoding/xml"
-       "time"
-)
-
 const (
        Generator       = "meta4ra/0.3.0"
        GPGSigMediaType = "application/pgp-signature"
 )
-
-type Metalink struct {
-       XMLName   xml.Name  `xml:"urn:ietf:params:xml:ns:metalink metalink"`
-       Files     []File    `xml:"file"`
-       Generator string    `xml:"generator,,omitempty"`
-       Published time.Time `xml:"published,,omitempty"`
-}
-
-type File struct {
-       XMLName     xml.Name   `xml:"file"`
-       Name        string     `xml:"name,attr"`
-       Description string     `xml:"description,,omitempty"`
-       Hashes      []Hash     `xml:"hash,,omitempty"`
-       MetaURLs    []MetaURL  `xml:"metaurl,,omitempty"`
-       Signature   *Signature `xml:"signature"`
-       Size        uint64     `xml:"size,,omitempty"`
-       URLs        []URL      `xml:"url,,omitempty"`
-}
-
-type URL struct {
-       XMLName xml.Name `xml:"url"`
-       URL     string   `xml:",chardata"`
-}
-
-type Signature struct {
-       XMLName   xml.Name `xml:"signature"`
-       MediaType string   `xml:"mediatype,attr"`
-       Signature string   `xml:",cdata"`
-}
-
-type Hash struct {
-       XMLName xml.Name `xml:"hash"`
-       Type    string   `xml:"type,attr"`
-       Hash    string   `xml:",chardata"`
-}
-
-type MetaURL struct {
-       XMLName   xml.Name `xml:"metaurl"`
-       MediaType string   `xml:"mediatype,attr"`
-       URL       string   `xml:",chardata"`
-}