-
Notifications
You must be signed in to change notification settings - Fork 15
/
struct_cache.go
131 lines (117 loc) · 4.12 KB
/
struct_cache.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
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
package main
import (
"sync"
"time"
)
type cache struct {
Channel map[string]G2GCache `json:"Channel"`
Program map[string]G2GCache `json:"Program"`
Metadata map[string]G2GCache `json:"Metadata"`
Schedule map[string][]G2GCache `json:"Schedule"`
sync.RWMutex `json:"-"`
}
// G2GCache : Cache data
type G2GCache struct {
// Global
Md5 string `json:"md5,omitempty"`
ProgramID string `json:"programID,omitempty"`
// Channel
StationID string `json:"stationID,omitempty"`
Name string `json:"name,omitempty"`
Callsign string `json:"callsign,omitempty"`
Affiliate string `json:"affiliate,omitempty"`
BroadcastLanguage []string `json:"broadcastLanguage"`
StationLogo []struct {
URL string `json:"URL"`
Height int `json:"height"`
Width int `json:"width"`
Md5 string `json:"md5"`
Source string `json:"source"`
} `json:"stationLogo,omitempty"`
Logo struct {
URL string `json:"URL"`
Height int `json:"height"`
Width int `json:"width"`
Md5 string `json:"md5"`
} `json:"logo,omitempty"`
// Schedule
AirDateTime time.Time `json:"airDateTime,omitempty"`
AudioProperties []string `json:"audioProperties,omitempty"`
Duration int `json:"duration,omitempty"`
LiveTapeDelay string `json:"liveTapeDelay,omitempty"`
New bool `json:"new,omitempty"`
Ratings []struct {
Body string `json:"body"`
Code string `json:"code"`
} `json:"ratings,omitempty"`
VideoProperties []string `json:"videoProperties,omitempty"`
// Program
Cast []struct {
BillingOrder string `json:"billingOrder"`
CharacterName string `json:"characterName"`
Name string `json:"name"`
NameID string `json:"nameId"`
PersonID string `json:"personId"`
Role string `json:"role"`
} `json:"cast"`
Crew []struct {
BillingOrder string `json:"billingOrder"`
Name string `json:"name"`
NameID string `json:"nameId"`
PersonID string `json:"personId"`
Role string `json:"role"`
} `json:"crew"`
ContentRating []struct {
Body string `json:"body"`
Code string `json:"code"`
Country string `json:"country"`
} `json:"contentRating"`
Descriptions struct {
Description1000 []struct {
Description string `json:"description"`
DescriptionLanguage string `json:"descriptionLanguage"`
} `json:"description1000"`
Description100 []struct {
DescriptionLanguage string `json:"descriptionLanguage"`
Description string `json:"description"`
} `json:"description100"`
} `json:"descriptions"`
EpisodeTitle150 string `json:"episodeTitle150,omitempty"`
Genres []string `json:"genres,omitempty"`
HasEpisodeArtwork bool `json:"hasEpisodeArtwork,omitempty"`
HasImageArtwork bool `json:"hasImageArtwork,omitempty"`
HasSeriesArtwork bool `json:"hasSeriesArtwork,omitempty"`
Metadata []struct {
Gracenote struct {
Episode int `json:"episode"`
Season int `json:"season"`
} `json:"Gracenote"`
} `json:"metadata",omitempty`
OriginalAirDate string `json:"originalAirDate,omitempty"`
ResourceID string `json:"resourceID,omitempty"`
ShowType string `json:"showType,omitempty"`
Titles []struct {
Title120 string `json:"title120"`
} `json:"titles"`
// Metadata
Data []Data `json:"data,omitempty"`
}
// SDSchedule : Schedules Direct schedule data
type SDSchedule struct {
// Schedule
Programs []struct {
AirDateTime time.Time `json:"airDateTime"`
AudioProperties []string `json:"audioProperties"`
Duration int `json:"duration"`
LiveTapeDelay string `json:"liveTapeDelay"`
New bool `json:"new"`
Md5 string `json:"md5"`
ProgramID string `json:"programID"`
Ratings []struct {
Body string `json:"body"`
Code string `json:"code"`
} `json:"ratings"`
VideoProperties []string `json:"videoProperties"`
} `json:"programs"`
StationID string `json:"stationID"`
}