@@ -47,30 +47,30 @@ type Crawler struct {
47
47
48
48
// Config is a Crawler configuration.
49
49
type Config struct {
50
- AppID string `json:"appId"`
51
- APIKey string `json:"apiKey"`
52
- IndexPrefix string `json:"indexPrefix"`
53
- Schedule string `json:"schedule"`
54
- StartUrls []string `json:"startUrls"`
55
- Sitemaps []string `json:"sitemaps"`
50
+ AppID string `json:"appId,omitempty "`
51
+ APIKey string `json:"apiKey,omitempty "`
52
+ IndexPrefix string `json:"indexPrefix,omitempty "`
53
+ Schedule string `json:"schedule,omitempty "`
54
+ StartUrls []string `json:"startUrls,omitempty "`
55
+ Sitemaps []string `json:"sitemaps,omitempty "`
56
56
57
57
ExclusionPatterns []string `json:"exclusionPatterns,omitempty"`
58
58
IgnoreQueryParams []string `json:"ignoreQueryParams,omitempty"`
59
- RenderJavaScript bool `json:"renderJavaScript"`
60
- RateLimit int `json:"rateLimit"`
59
+ RenderJavaScript bool `json:"renderJavaScript,omitempty "`
60
+ RateLimit int `json:"rateLimit,omitempty "`
61
61
ExtraUrls []string `json:"extraUrls,omitempty"`
62
- MaxDepth int `json:"maxDepth"`
63
- MaxURLs int `json:"maxUrls"`
62
+ MaxDepth int `json:"maxDepth,omitempty "`
63
+ MaxURLs int `json:"maxUrls,omitempty "`
64
64
65
- IgnoreRobotsTxtRules bool `json:"ignoreRobotsTxtRules"`
66
- IgnoreNoIndex bool `json:"ignoreNoIndex"`
67
- IgnoreNoFollowTo bool `json:"ignoreNoFollowTo"`
68
- IgnoreCanonicalTo bool `json:"ignoreCanonicalTo"`
65
+ IgnoreRobotsTxtRules bool `json:"ignoreRobotsTxtRules,omitempty "`
66
+ IgnoreNoIndex bool `json:"ignoreNoIndex,omitempty "`
67
+ IgnoreNoFollowTo bool `json:"ignoreNoFollowTo,omitempty "`
68
+ IgnoreCanonicalTo bool `json:"ignoreCanonicalTo,omitempty "`
69
69
70
- SaveBackup bool `json:"saveBackup"`
71
- InitialIndexSettings map [string ]* search.Settings `json:"initialIndexSettings"`
70
+ SaveBackup bool `json:"saveBackup,omitempty "`
71
+ InitialIndexSettings map [string ]* search.Settings `json:"initialIndexSettings,omitempty "`
72
72
73
- Actions []* Action `json:"actions"`
73
+ Actions []* Action `json:"actions,omitempty "`
74
74
}
75
75
76
76
// Action is a Crawler configuration action.
0 commit comments