- refactor secrets

- add support for env in config
- redact sensitive information in logs/responses
This commit is contained in:
seydx
2025-05-26 21:56:45 +02:00
parent e8e798d955
commit bf45f64a7e
14 changed files with 202 additions and 160 deletions
+6
View File
@@ -6,6 +6,8 @@ import (
"strconv"
"strings"
"time"
"github.com/AlexxIT/go2rtc/internal/app"
)
const (
@@ -77,3 +79,7 @@ func Caller() string {
_, file, line, _ := runtime.Caller(1)
return file + ":" + strconv.Itoa(line)
}
func NewSecret(name string, defaultValues interface{}) (*app.Secret, error) {
return app.NewSecret(name, defaultValues)
}
-6
View File
@@ -1,7 +1,5 @@
package core
import "github.com/AlexxIT/go2rtc/internal/app"
type EventFunc func(msg any)
// Listener base struct for all classes with support feedback
@@ -18,7 +16,3 @@ func (l *Listener) Fire(msg any) {
f(msg)
}
}
func (l *Listener) NewSecret(name string, defaultValues interface{}) *app.Secret {
return app.NewSecret(name, defaultValues)
}