mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-31 19:42:15 +00:00
feat: Private label email policy (#813)
* Label Policy added * save * chore: update docs action * Save * Save * Get colors from DB * Variables inserted * Get images from global directory. * Add tests * Add tests * Corrections from mergerequest * Corrections from mergerequest * Test corrected. * Added colors to all notifications. * Added colors to Corrected text and formatting.all notifications. * Spelling error corrected. * fix: tests * Merge Branch corrected. * Step6 added * Corrections from mergerequest * fix: generate management * Formatted texts. * fix: migrations Co-authored-by: Florian Forster <[email protected]> Co-authored-by: adlerhurst <[email protected]> Co-authored-by: Fabiennne <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
adlerhurst
Fabiennne
parent
cfd119924f
commit
42384763d1
@@ -4209,6 +4209,259 @@ var _IdpSearchQuery_Key_NotInLookup = map[IdpSearchKey]struct{}{
|
||||
0: {},
|
||||
}
|
||||
|
||||
// Validate checks the field values on DefaultLabelPolicy with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *DefaultLabelPolicy) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// no validation rules for PrimaryColor
|
||||
|
||||
// no validation rules for SecondaryColor
|
||||
|
||||
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DefaultLabelPolicyValidationError{
|
||||
field: "CreationDate",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DefaultLabelPolicyValidationError{
|
||||
field: "ChangeDate",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DefaultLabelPolicyValidationError is the validation error returned by
|
||||
// DefaultLabelPolicy.Validate if the designated constraints aren't met.
|
||||
type DefaultLabelPolicyValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e DefaultLabelPolicyValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e DefaultLabelPolicyValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e DefaultLabelPolicyValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e DefaultLabelPolicyValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e DefaultLabelPolicyValidationError) ErrorName() string {
|
||||
return "DefaultLabelPolicyValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e DefaultLabelPolicyValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sDefaultLabelPolicy.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = DefaultLabelPolicyValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = DefaultLabelPolicyValidationError{}
|
||||
|
||||
// Validate checks the field values on DefaultLabelPolicyUpdate with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *DefaultLabelPolicyUpdate) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// no validation rules for PrimaryColor
|
||||
|
||||
// no validation rules for SecondaryColor
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DefaultLabelPolicyUpdateValidationError is the validation error returned by
|
||||
// DefaultLabelPolicyUpdate.Validate if the designated constraints aren't met.
|
||||
type DefaultLabelPolicyUpdateValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) ErrorName() string {
|
||||
return "DefaultLabelPolicyUpdateValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sDefaultLabelPolicyUpdate.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = DefaultLabelPolicyUpdateValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = DefaultLabelPolicyUpdateValidationError{}
|
||||
|
||||
// Validate checks the field values on DefaultLabelPolicyView with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *DefaultLabelPolicyView) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// no validation rules for PrimaryColor
|
||||
|
||||
// no validation rules for SecondaryColor
|
||||
|
||||
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DefaultLabelPolicyViewValidationError{
|
||||
field: "CreationDate",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DefaultLabelPolicyViewValidationError{
|
||||
field: "ChangeDate",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DefaultLabelPolicyViewValidationError is the validation error returned by
|
||||
// DefaultLabelPolicyView.Validate if the designated constraints aren't met.
|
||||
type DefaultLabelPolicyViewValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e DefaultLabelPolicyViewValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e DefaultLabelPolicyViewValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e DefaultLabelPolicyViewValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e DefaultLabelPolicyViewValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e DefaultLabelPolicyViewValidationError) ErrorName() string {
|
||||
return "DefaultLabelPolicyViewValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e DefaultLabelPolicyViewValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sDefaultLabelPolicyView.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = DefaultLabelPolicyViewValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = DefaultLabelPolicyViewValidationError{}
|
||||
|
||||
// Validate checks the field values on DefaultLoginPolicy with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
|
||||
Reference in New Issue
Block a user