Add hooks functionality

This commit is contained in:
Ben Sarmiento
2023-10-28 13:19:32 +02:00
parent a9d017f481
commit 1cb7873a3b
5 changed files with 79 additions and 28 deletions

View File

@@ -8,4 +8,37 @@ type ZurgConfig struct {
RefreshEverySeconds int `yaml:"check_for_changes_every_secs"`
CacheTimeHours int `yaml:"info_cache_time_hours"`
CanRepair bool `yaml:"enable_repair"`
OnLibraryUpdate string `yaml:"on_library_update"`
}
func (z *ZurgConfig) GetVersion() string {
return "v1"
}
func (z *ZurgConfig) GetToken() string {
return z.Token
}
func (z *ZurgConfig) GetPort() string {
return z.Port
}
func (z *ZurgConfig) GetNumOfWorkers() int {
return z.NumOfWorkers
}
func (z *ZurgConfig) GetRefreshEverySeconds() int {
return z.RefreshEverySeconds
}
func (z *ZurgConfig) GetCacheTimeHours() int {
return z.CacheTimeHours
}
func (z *ZurgConfig) EnableRepair() bool {
return z.CanRepair
}
func (z *ZurgConfig) GetOnLibraryUpdate() string {
return z.OnLibraryUpdate
}