fix all configuration file options case etc.
This commit is contained in:
		
							
								
								
									
										39
									
								
								app/conf.go
									
									
									
									
									
								
							
							
						
						
									
										39
									
								
								app/conf.go
									
									
									
									
									
								
							@ -12,42 +12,43 @@ import (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Conf struct {
 | 
					type Conf struct {
 | 
				
			||||||
	Patterns map[string]string
 | 
						Patterns map[string]string  `yaml:"patterns"`
 | 
				
			||||||
	Streams  map[string]*Stream
 | 
						Streams  map[string]*Stream `yaml:"streams"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Stream struct {
 | 
					type Stream struct {
 | 
				
			||||||
	name string
 | 
						name string `yaml:"-"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Cmd     []string
 | 
						Cmd     []string           `yaml:"cmd"`
 | 
				
			||||||
	Filters map[string]*Filter
 | 
						Filters map[string]*Filter `yaml:"filters"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Filter struct {
 | 
					type Filter struct {
 | 
				
			||||||
	stream *Stream
 | 
						stream *Stream `yaml:"-"`
 | 
				
			||||||
	name   string
 | 
						name   string  `yaml:"-"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Regex                          []string
 | 
						Regex             []string        `yaml:"regex"`
 | 
				
			||||||
	compiledRegex                  []regexp.Regexp
 | 
						compiledRegex     []regexp.Regexp `yaml:"-"`
 | 
				
			||||||
	patternName, patternWithBraces string
 | 
						patternName       string          `yaml:"-"`
 | 
				
			||||||
 | 
						patternWithBraces string          `yaml:"-"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Retry         int
 | 
						Retry         int           `yaml:"retry"`
 | 
				
			||||||
	RetryPeriod   string        `yaml:"retry-period"`
 | 
						RetryPeriod   string        `yaml:"retry-period"`
 | 
				
			||||||
	retryDuration time.Duration
 | 
						retryDuration time.Duration `yaml:"-"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Actions map[string]*Action
 | 
						Actions map[string]*Action `yaml:"actions"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	matches map[string][]time.Time
 | 
						matches map[string][]time.Time `yaml:"-"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Action struct {
 | 
					type Action struct {
 | 
				
			||||||
	filter *Filter
 | 
						filter *Filter `yaml:"-"`
 | 
				
			||||||
	name   string
 | 
						name   string  `yaml:"-"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Cmd []string
 | 
						Cmd []string `yaml:"cmd"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	After         string `yaml:",omitempty"`
 | 
						After         string        `yaml:"after"`
 | 
				
			||||||
	afterDuration time.Duration
 | 
						afterDuration time.Duration `yaml:"-"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (c *Conf) setup() {
 | 
					func (c *Conf) setup() {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user