-
-
Notifications
You must be signed in to change notification settings - Fork 123
/
caps.go
96 lines (81 loc) · 2.29 KB
/
caps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Copyright (c) 2021 - 2024, Ludvig Lundgren and the autobrr contributors.
// SPDX-License-Identifier: GPL-2.0-or-later
package torznab
import "encoding/xml"
type Server struct {
Version string `xml:"version,attr"`
Title string `xml:"title,attr"`
Strapline string `xml:"strapline,attr"`
Email string `xml:"email,attr"`
URL string `xml:"url,attr"`
Image string `xml:"image,attr"`
}
type Limits struct {
Max string `xml:"max,attr"`
Default string `xml:"default,attr"`
}
type Retention struct {
Days string `xml:"days,attr"`
}
type Registration struct {
Available string `xml:"available,attr"`
Open string `xml:"open,attr"`
}
type Searching struct {
Search Search `xml:"search"`
TvSearch Search `xml:"tv-search"`
MovieSearch Search `xml:"movie-search"`
AudioSearch Search `xml:"audio-search"`
BookSearch Search `xml:"book-search"`
}
type Search struct {
Available string `xml:"available,attr"`
SupportedParams string `xml:"supportedParams,attr"`
}
type CapCategories struct {
Categories []Category `xml:"category"`
}
type CapCategory struct {
ID string `xml:"id,attr"`
Name string `xml:"name,attr"`
SubCategories []CapCategory `xml:"subcat"`
}
type Groups struct {
Group Group `xml:"group"`
}
type Group struct {
ID string `xml:"id,attr"`
Name string `xml:"name,attr"`
Description string `xml:"description,attr"`
Lastupdate string `xml:"lastupdate,attr"`
}
type Genres struct {
Genre Genre `xml:"genre"`
}
type Genre struct {
ID string `xml:"id,attr"`
Categoryid string `xml:"categoryid,attr"`
Name string `xml:"name,attr"`
}
type Tags struct {
Tag []Tag `xml:"tag"`
}
type Tag struct {
Name string `xml:"name,attr"`
Description string `xml:"description,attr"`
}
type CapsResponse struct {
Caps Caps `xml:"caps"`
}
type Caps struct {
XMLName xml.Name `xml:"caps"`
Server Server `xml:"server"`
Limits Limits `xml:"limits"`
Retention Retention `xml:"retention"`
Registration Registration `xml:"registration"`
Searching Searching `xml:"searching"`
Categories CapCategories `xml:"categories"`
Groups Groups `xml:"groups"`
Genres Genres `xml:"genres"`
Tags Tags `xml:"tags"`
}