forked from Threadfin/Threadfin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct-webserver.go
More file actions
181 lines (162 loc) · 7.78 KB
/
struct-webserver.go
File metadata and controls
181 lines (162 loc) · 7.78 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
package src
// RequestStruct : Anfragen über die Websocket Schnittstelle
type RequestStruct struct {
// Befehle an Threadfin
Cmd string `json:"cmd,required"`
// Benutzer
DeleteUser bool `json:"deleteUser,omitempty"`
UserData map[string]interface{} `json:"userData,omitempty"`
// Mapping
EpgMapping map[string]interface{} `json:"epgMapping,omitempty"`
// Restore
Base64 string `json:"base64,omitempty"`
// Neue Werte für die Einstellungen (settings.json)
Settings struct {
API *bool `json:"api,omitempty"`
SSDP *bool `json:"ssdp,omitempty"`
AuthenticationAPI *bool `json:"authentication.api,omitempty"`
AuthenticationM3U *bool `json:"authentication.m3u,omitempty"`
AuthenticationPMS *bool `json:"authentication.pms,omitempty"`
AuthenticationWEP *bool `json:"authentication.web,omitempty"`
AuthenticationXML *bool `json:"authentication.xml,omitempty"`
BackupKeep *int `json:"backup.keep,omitempty"`
BackupPath *string `json:"backup.path,omitempty"`
Buffer *string `json:"buffer,omitempty"`
BufferSize *int `json:"buffer.size.kb,omitempty"`
BufferTimeout *float64 `json:"buffer.timeout,omitempty"`
CacheImages *bool `json:"cache.images,omitempty"`
EpgSource *string `json:"epgSource,omitempty"`
FFmpegOptions *string `json:"ffmpeg.options,omitempty"`
FFmpegPath *string `json:"ffmpeg.path,omitempty"`
FfmpegForceHttp *bool `json:"ffmpeg.forceHttp,omitempty"`
VLCOptions *string `json:"vlc.options,omitempty"`
VLCPath *string `json:"vlc.path,omitempty"`
FilesUpdate *bool `json:"files.update,omitempty"`
TempPath *string `json:"temp.path,omitempty"`
Tuner *int `json:"tuner,omitempty"`
UDPxy *string `json:"udpxy,omitempty"`
Update *[]string `json:"update,omitempty"`
UserAgent *string `json:"user.agent,omitempty"`
XepgReplaceMissingImages *bool `json:"xepg.replace.missing.images,omitempty"`
XepgReplaceChannelTitle *bool `json:"xepg.replace.channel.title,omitempty"`
ThreadfinAutoUpdate *bool `json:"ThreadfinAutoUpdate,omitempty"`
SchemeM3U *string `json:"scheme.m3u,omitempty"`
SchemeXML *string `json:"scheme.xml,omitempty"`
StoreBufferInRAM *bool `json:"storeBufferInRAM,omitempty"`
ForceHttps *bool `json:"forceHttps,omitempty"`
HttpsPort *int `json:"httpsPort,omitempty"`
HttpsThreadfinDomain *string `json:"httpsThreadfinDomain,omitempty"`
HttpThreadfinDomain *string `json:"httpThreadfinDomain,omitempty"`
BindIpAddress *string `json:"bindIpAddress,omitempty"`
EnableNonAscii *bool `json:"enableNonAscii,omitempty"`
EpgCategories *string `json:"epgCategories,omitempty"`
EpgCategoriesColors *string `json:"epgCategoriesColors,omitempty"`
Dummy *bool `json:"dummy,omitempty"`
DummyChannel *string `json:"dummyChannel,omitempty"`
IgnoreFilters *bool `json:"ignoreFilters,omitempty"`
} `json:"settings,omitempty"`
// Upload Logo
Filename string `json:"filename,omitempty"`
// Filter
Filter map[int64]interface{} `json:"filter,omitempty"`
// Dateien (M3U, HDHR, XMLTV)
Files struct {
HDHR map[string]interface{} `json:"hdhr,omitempty"`
M3U map[string]interface{} `json:"m3u,omitempty"`
XMLTV map[string]interface{} `json:"xmltv,omitempty"`
} `json:"files,omitempty"`
// Wizard
Wizard struct {
EpgSource *string `json:"epgSource,omitempty"`
M3U *string `json:"m3u,omitempty"`
Tuner *int `json:"tuner,omitempty"`
XMLTV *string `json:"xmltv,omitempty"`
} `json:"wizard,omitempty"`
// Probe Url
ProbeURL string `json:"probeURL,omitempty"`
}
// ResponseStruct : Antworten an den Client (WEB)
type ResponseStruct struct {
ClientInfo struct {
ARCH string `json:"arch"`
Branch string `json:"branch,omitempty"`
DVR string `json:"DVR"`
EpgSource string `json:"epgSource"`
Errors int `json:"errors"`
M3U string `json:"m3u-url,required"`
OS string `json:"os"`
Streams string `json:"streams"`
ActiveClients int `json:"activeClients"`
TotalClients int `json:"totalClients"`
ActivePlaylist int `json:"activePlaylist"`
TotalPlaylist int `json:"totalPlaylist"`
UUID string `json:"uuid"`
Version string `json:"version"`
Warnings int `json:"warnings"`
XEPGCount int64 `json:"xepg"`
XML string `json:"xepg-url,required"`
} `json:"clientInfo,omitempty"`
Data struct {
Playlist struct {
M3U struct {
Groups struct {
Text []string `json:"text,required"`
Value []string `json:"value,required"`
} `json:"groups,required"`
} `json:"m3u,required"`
} `json:"playlist,required"`
StreamPreviewUI struct {
Active []string `json:"activeStreams,required"`
Inactive []string `json:"inactiveStreams,required"`
}
} `json:"data,required"`
Alert string `json:"alert,omitempty"`
ConfigurationWizard bool `json:"configurationWizard,required"`
Error string `json:"err,omitempty"`
Log WebScreenLogStruct `json:"log,required"`
LogoURL string `json:"logoURL,omitempty"`
OpenLink string `json:"openLink,omitempty"`
OpenMenu string `json:"openMenu,omitempty"`
Reload bool `json:"reload,omitempty"`
Settings SettingsStruct `json:"settings,required"`
Status bool `json:"status,required"`
Token string `json:"token,omitempty"`
Users map[string]interface{} `json:"users,omitempty"`
Wizard int `json:"wizard,omitempty"`
XEPG map[string]interface{} `json:"xepg,required"`
ProbeInfo ProbeInfoStruct `json:"probeInfo,omitempty"`
Notification map[string]Notification `json:"notification,omitempty"`
}
type ProbeInfoStruct struct {
Resolution string `json:"resolution,omitempty"`
FrameRate string `json:"frameRate,omitempty"`
AudioChannel string `json:"audioChannel,omitempty"`
}
// APIRequestStruct : Anfrage über die API Schnittstelle
type APIRequestStruct struct {
Cmd string `json:"cmd"`
Password string `json:"password"`
Token string `json:"token"`
Username string `json:"username"`
}
// APIResponseStruct : Antwort an den Client (API)
type APIResponseStruct struct {
EpgSource string `json:"epg.source,omitempty"`
Error string `json:"err,omitempty"`
Status bool `json:"status,required"`
StreamsActive int64 `json:"streams.active,omitempty"`
StreamsAll int64 `json:"streams.all,omitempty"`
StreamsXepg int64 `json:"streams.xepg,omitempty"`
Token string `json:"token,omitempty"`
URLDvr string `json:"url.dvr,omitempty"`
URLM3U string `json:"url.m3u,omitempty"`
URLXepg string `json:"url.xepg,omitempty"`
VersionAPI string `json:"version.api,omitempty"`
VersionThreadfin string `json:"version.threadfin,omitempty"`
}
// WebScreenLogStruct : Logs werden im RAM gespeichert und für das Webinterface bereitgestellt
type WebScreenLogStruct struct {
Errors int `json:"errors,required"`
Log []string `json:"log,required"`
Warnings int `json:"warnings,required"`
}