Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrApplicationRun is the error of the run of the application. ErrApplicationRun = errors.New("application: run error") )
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { // Run runs the application. Run() (err error) }
Application is an interface of an application.
type ApplicationDefault ¶
type ApplicationDefault struct {
// contains filtered or unexported fields
}
ApplicationDefault is the default implementation of Application.
func NewApplicationDefault ¶
func NewApplicationDefault(cfg *Config) (a *ApplicationDefault)
NewApplicationDefault creates a new application.
func (*ApplicationDefault) Run ¶
func (a *ApplicationDefault) Run() (err error)
Run runs the application.
type CasesConfig ¶
type Config ¶
type Config struct { // server Server ServerConfig // database Database *DatabaseConfig // Cases Cases CasesConfig }
Config is the config of the application.
func NewConfigApplicationDefaultFromYAML ¶
ConfigApplicationDefault is the config of the default application.
type ConfigApplicationDefaultYAML ¶
type ConfigApplicationDefaultYAML struct { // server config Server struct { // server address Address string `yaml:"address"` } `yaml:"server"` // database config Database struct { // database address Address string `yaml:"address"` // database user User string `yaml:"user"` // database password Password string `yaml:"password"` // database name Name string `yaml:"name"` } `yaml:"database"` // cases config Cases struct { Reader struct { FilePath string `yaml:"file_path"` BatchSize int `yaml:"batch_size"` } `yaml:"reader"` Reporter struct { ExcludedHeaders []string `yaml:"excluded_headers"` } `yaml:"reporter"` } `yaml:"cases"` }
ConfigApplicationDefaultYAML is the config of the default application from yaml file.
type DatabaseConfig ¶
type ServerConfig ¶
type ServerConfig struct { // server address Address string }
Config is the config of the application.
Click to show internal directories.
Click to hide internal directories.