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

@@ -17,34 +17,6 @@ func loadV1Config(content []byte) (*ZurgConfigV1, error) {
return &configV1, nil
}
func (z *ZurgConfigV1) GetVersion() string {
return "v1"
}
func (z *ZurgConfigV1) GetToken() string {
return z.Token
}
func (z *ZurgConfigV1) GetPort() string {
return z.Port
}
func (z *ZurgConfigV1) GetNumOfWorkers() int {
return z.NumOfWorkers
}
func (z *ZurgConfigV1) GetRefreshEverySeconds() int {
return z.RefreshEverySeconds
}
func (z *ZurgConfigV1) GetCacheTimeHours() int {
return z.CacheTimeHours
}
func (z *ZurgConfigV1) EnableRepair() bool {
return z.CanRepair
}
func (z *ZurgConfigV1) GetDirectories() []string {
rootDirectories := make([]string, len(z.Directories))
i := 0