mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Renamed Backend.FromConfig to Backend.InitConfig and added error handling
This commit is contained in:
parent
aad542850a
commit
0f4b04c641
21 changed files with 60 additions and 48 deletions
|
@ -51,13 +51,13 @@ func (b *MalojaApiBackend) Options() []models.BackendOption {
|
|||
}}
|
||||
}
|
||||
|
||||
func (b *MalojaApiBackend) FromConfig(config *config.ServiceConfig) models.Backend {
|
||||
func (b *MalojaApiBackend) InitConfig(config *config.ServiceConfig) error {
|
||||
b.client = NewClient(
|
||||
config.GetString("server-url"),
|
||||
config.GetString("token"),
|
||||
)
|
||||
b.nofix = config.GetBool("nofix", false)
|
||||
return b
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *MalojaApiBackend) StartImport() error { return nil }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue