Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { Name string `json:"channelName"` MinimumValue int `json:"minimumValue"` MaximumValue int `json:"maximumValue"` ExcludeLosses bool `json:"excludeLosses"` IncludeCharacters []string `json:"includeCharacters"` IncludeCorporations []string `json:"includeCorporations"` IncludeAlliances []string `json:"includeAlliances"` ExcludedShips []string `json:"excludedShips"` }
Channel defines the configuration for a slack channel in a team, including its filters
type Configuration ¶
type Configuration struct { FilePath string `json:"-"` TemplateFile string `json:"templateFile"` UserAgent string `json:"userAgent"` Teams []*Team `json:"teams"` // contains filtered or unexported fields }
Configuration holds the configuration for the application.
func ReadConfig ¶
func ReadConfig(filepath string) (cfg *Configuration, err error)
ReadConfig accepts a file path and returns the parsed configuration, if found. If the file was not found, or could not be parsed, an error is returned and the configuration model is nil.
func (*Configuration) File ¶
func (cfg *Configuration) File() string
File returns the file name/path for gonfig interface
func (*Configuration) Load ¶
func (cfg *Configuration) Load() error
Load the configuration from the FilePath. This overwrites any unsaved changes. Returns an error for an unset file path or any file system permission level errors.
func (*Configuration) Save ¶
func (cfg *Configuration) Save() error
Save the configuration file on the file path set in Configuration.FilePath.
Click to show internal directories.
Click to hide internal directories.