mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-01 11:26:29 +02:00
32 lines
816 B
Go
32 lines
816 B
Go
// Package config contains protobuf definitions for config.
|
|
package config
|
|
|
|
// IsSet returns true if one of the route redirect options has been chosen.
|
|
func (rr *RouteRedirect) IsSet() bool {
|
|
if rr == nil {
|
|
return false
|
|
}
|
|
|
|
return rr.StripQuery != nil ||
|
|
rr.ResponseCode != nil ||
|
|
rr.PrefixRewrite != nil ||
|
|
rr.PathRedirect != nil ||
|
|
rr.PortRedirect != nil ||
|
|
rr.HostRedirect != nil ||
|
|
rr.SchemeRedirect != nil ||
|
|
rr.HttpsRedirect != nil
|
|
}
|
|
|
|
func (x *Config) GetId() string { //nolint
|
|
return x.Name
|
|
}
|
|
|
|
func (x *Settings) HasBrandingOptions() bool {
|
|
return x.GetPrimaryColor() != "" ||
|
|
x.GetSecondaryColor() != "" ||
|
|
x.GetDarkmodePrimaryColor() != "" ||
|
|
x.GetDarkmodeSecondaryColor() != "" ||
|
|
x.GetLogoUrl() != "" ||
|
|
x.GetFaviconUrl() != "" ||
|
|
x.GetErrorMessageFirstParagraph() != ""
|
|
}
|