✅ Test app
This commit is contained in:
parent
e441e541c7
commit
6498f3d56b
4 changed files with 142 additions and 2 deletions
16
app.go
16
app.go
|
|
@ -26,6 +26,7 @@ func NewApp(ver string, conf config.Config, db proc.Store) (*App, error) {
|
|||
}
|
||||
app := App{
|
||||
version: ver,
|
||||
conf: conf,
|
||||
}
|
||||
|
||||
selfIRI := boxap.DefaultServiceIRI(conf.BaseURL)
|
||||
|
|
@ -44,6 +45,10 @@ func (l *App) Config() config.Config {
|
|||
return l.conf
|
||||
}
|
||||
|
||||
func (l *App) Environment() config.Env {
|
||||
return l.conf.Environment()
|
||||
}
|
||||
|
||||
func (l *App) Storage() proc.Store {
|
||||
return l.storage
|
||||
}
|
||||
|
|
@ -64,6 +69,13 @@ func (l *App) Version() string {
|
|||
return l.version
|
||||
}
|
||||
|
||||
func (l *App) String() string {
|
||||
return fmt.Sprintf("Lenore (%s)", l.version)
|
||||
func (l *App) Name() string {
|
||||
if l.conf.Name == "" {
|
||||
return "Lenore"
|
||||
}
|
||||
return l.conf.Name
|
||||
}
|
||||
|
||||
func (l *App) String() string {
|
||||
return fmt.Sprintf("%s (%s)", l.Name(), l.version)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue