github.com/aarzilli/tools@v0.0.0-20151123112009-0d27094f75e0/net/http/repo/1_types.go (about) 1 package repo 2 3 import "time" 4 5 // FullArticle is the main struct passed 6 // between the pipeline stages 7 type FullArticle struct { 8 Url string 9 Mod time.Time 10 Body []byte 11 } 12 13 // FetchCommand contains a RSS location 14 // and details which items we want to fetch from it. 15 type FetchCommand struct { 16 Host string // www.handelsblatt.com, 17 SearchPrefix string // /politik/international/aa/bb, 18 19 RssXMLURI map[string]string // SearchPrefix => RSS-URLs 20 DesiredNumber int 21 CondenseTrailingDirs int // The last one or two directories might be article titles or ids; 22 // we dont' care any longer - CondenseTrailingDirs is obsolete 23 24 DepthTolerance int 25 } 26 27 type DirTree struct { 28 Name string // Name == key of Parent.Dirs 29 LastFound time.Time 30 31 SrcRSS bool // dir came first from RSS 32 EndPoint bool // dir came first from RSS - and is at the end of the path 33 34 Dirs map[string]DirTree 35 // Fils []string 36 } 37 38 type LevelWiseDeeperOptions struct { 39 Rump string // for instance /blogs/buttonwood 40 ExcludeDir string // for instance /blogs/buttonwood/2014 41 42 MinDepthDiff int // Relative to the depth of rump!; 0 equals Rump-Depth; thus 2 is the first restricting setting; set to 4 to exclude /blogs/buttonwood/2015/08/article1 43 MaxDepthDiff int // To include /blogs/buttonwood/2015/08/article1 from /blogs/buttonwood => set to 3 44 45 CondenseTrailingDirs int // See FetchCommand - equal member 46 MaxNumber int // 47 }