...
1 package newssearch
2
3
4
5
6
7
8
9
10 type ErrorCode string
11
12 const (
13
14 InsufficientAuthorization ErrorCode = "InsufficientAuthorization"
15
16 InvalidAuthorization ErrorCode = "InvalidAuthorization"
17
18 InvalidRequest ErrorCode = "InvalidRequest"
19
20 None ErrorCode = "None"
21
22 RateLimitExceeded ErrorCode = "RateLimitExceeded"
23
24 ServerError ErrorCode = "ServerError"
25 )
26
27
28 func PossibleErrorCodeValues() []ErrorCode {
29 return []ErrorCode{InsufficientAuthorization, InvalidAuthorization, InvalidRequest, None, RateLimitExceeded, ServerError}
30 }
31
32
33 type ErrorSubCode string
34
35 const (
36
37 AuthorizationDisabled ErrorSubCode = "AuthorizationDisabled"
38
39 AuthorizationExpired ErrorSubCode = "AuthorizationExpired"
40
41 AuthorizationMissing ErrorSubCode = "AuthorizationMissing"
42
43 AuthorizationRedundancy ErrorSubCode = "AuthorizationRedundancy"
44
45 Blocked ErrorSubCode = "Blocked"
46
47 HTTPNotAllowed ErrorSubCode = "HttpNotAllowed"
48
49 NotImplemented ErrorSubCode = "NotImplemented"
50
51 ParameterInvalidValue ErrorSubCode = "ParameterInvalidValue"
52
53 ParameterMissing ErrorSubCode = "ParameterMissing"
54
55 ResourceError ErrorSubCode = "ResourceError"
56
57 UnexpectedError ErrorSubCode = "UnexpectedError"
58 )
59
60
61 func PossibleErrorSubCodeValues() []ErrorSubCode {
62 return []ErrorSubCode{AuthorizationDisabled, AuthorizationExpired, AuthorizationMissing, AuthorizationRedundancy, Blocked, HTTPNotAllowed, NotImplemented, ParameterInvalidValue, ParameterMissing, ResourceError, UnexpectedError}
63 }
64
65
66 type Freshness string
67
68 const (
69
70 Day Freshness = "Day"
71
72 Month Freshness = "Month"
73
74 Week Freshness = "Week"
75 )
76
77
78 func PossibleFreshnessValues() []Freshness {
79 return []Freshness{Day, Month, Week}
80 }
81
82
83 type SafeSearch string
84
85 const (
86
87 Moderate SafeSearch = "Moderate"
88
89 Off SafeSearch = "Off"
90
91 Strict SafeSearch = "Strict"
92 )
93
94
95 func PossibleSafeSearchValues() []SafeSearch {
96 return []SafeSearch{Moderate, Off, Strict}
97 }
98
99
100 type TextFormat string
101
102 const (
103
104 HTML TextFormat = "Html"
105
106 Raw TextFormat = "Raw"
107 )
108
109
110 func PossibleTextFormatValues() []TextFormat {
111 return []TextFormat{HTML, Raw}
112 }
113
114
115 type Type string
116
117 const (
118
119 TypeAnswer Type = "Answer"
120
121 TypeArticle Type = "Article"
122
123 TypeCreativeWork Type = "CreativeWork"
124
125 TypeErrorResponse Type = "ErrorResponse"
126
127 TypeIdentifiable Type = "Identifiable"
128
129 TypeImageObject Type = "ImageObject"
130
131 TypeMediaObject Type = "MediaObject"
132
133 TypeNews Type = "News"
134
135 TypeNewsArticle Type = "NewsArticle"
136
137 TypeNewsTopic Type = "News/Topic"
138
139 TypeOrganization Type = "Organization"
140
141 TypeResponse Type = "Response"
142
143 TypeResponseBase Type = "ResponseBase"
144
145 TypeSearchResultsAnswer Type = "SearchResultsAnswer"
146
147 TypeThing Type = "Thing"
148
149 TypeTrendingTopics Type = "TrendingTopics"
150
151 TypeVideoObject Type = "VideoObject"
152 )
153
154
155 func PossibleTypeValues() []Type {
156 return []Type{TypeAnswer, TypeArticle, TypeCreativeWork, TypeErrorResponse, TypeIdentifiable, TypeImageObject, TypeMediaObject, TypeNews, TypeNewsArticle, TypeNewsTopic, TypeOrganization, TypeResponse, TypeResponseBase, TypeSearchResultsAnswer, TypeThing, TypeTrendingTopics, TypeVideoObject}
157 }
158
View as plain text