This commit is contained in:
adlerhurst
2020-11-27 11:30:56 +01:00
parent 3bd4d3a8e3
commit 9487e8bdeb
20 changed files with 424 additions and 183 deletions

View File

@@ -46,8 +46,8 @@ func (rm *LabelPolicyReadModel) Reduce() error {
type LabelPolicyAddedEvent struct {
eventstore.BaseEvent `json:"-"`
PrimaryColor string `json:"primaryColor"`
SecondaryColor string `json:"secondaryColor"`
PrimaryColor string `json:"primaryColor,omitempty"`
SecondaryColor string `json:"secondaryColor,omitempty"`
}
func (e *LabelPolicyAddedEvent) CheckPrevious() bool {

View File

@@ -58,7 +58,7 @@ func (rm *PasswordComplexityPolicyReadModel) Reduce() error {
type PasswordComplexityPolicyAddedEvent struct {
eventstore.BaseEvent `json:"-"`
MinLength uint8 `json:"minLength"`
MinLength uint8 `json:"minLength,omitempty"`
HasLowercase bool `json:"hasLowercase"`
HasUpperCase bool `json:"hasUppercase"`
HasNumber bool `json:"hasNumber"`

View File

@@ -46,7 +46,7 @@ func (rm *PasswordLockoutPolicyReadModel) Reduce() error {
type PasswordLockoutPolicyAddedEvent struct {
eventstore.BaseEvent `json:"-"`
MaxAttempts uint8 `json:"maxAttempts"`
MaxAttempts uint8 `json:"maxAttempts,omitempty"`
ShowLockOutFailures bool `json:"showLockOutFailures"`
}