mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 04:35:40 +00:00
20 lines
337 B
Go
20 lines
337 B
Go
package decoders
|
|
|
|
import (
|
|
"tinyauth/internal/config"
|
|
|
|
"github.com/traefik/paerser/parser"
|
|
)
|
|
|
|
func DecodeLabels(labels map[string]string) (config.Apps, error) {
|
|
var appLabels config.Apps
|
|
|
|
err := parser.Decode(labels, &appLabels, "tinyauth", "tinyauth.apps")
|
|
|
|
if err != nil {
|
|
return config.Apps{}, err
|
|
}
|
|
|
|
return appLabels, nil
|
|
}
|