Right now container labels are scattered instead of being grouped in purpose-specific groups:
// OAuthLabels is a list of labels that can be used in a tinyauth protected container
type OAuthLabels struct {
Whitelist string
Groups string
}
// Basic auth labels for a tinyauth protected container
type BasicLabels struct {
User string
Password string
}
// Labels is a struct that contains the labels for a tinyauth protected container
type Labels struct {
Users string
Allowed string
Headers []string
Domain string
Basic BasicLabels
OAuth OAuthLabels
}
They should be instead refactored to more intuitive labels like:
type PathLabels struct {
Allowed string
}
type GenericLabels struct {
Users string
}
type OAuthLabels struct {
Whitelist string
Groups string
}
type ConfigLabels struct {
Domain string
Headers []string
Basic BasicLabels
Paths PathLabels
}
type Labels struct {
Generic GenericLabels
OAuth OAuthLabels
Config ConfigLabels
}
This would require a breaking change but it would make labels easier to understand and use.
Right now container labels are scattered instead of being grouped in purpose-specific groups:
They should be instead refactored to more intuitive labels like:
This would require a breaking change but it would make labels easier to understand and use.