new pkg structure (#1150)

* fix: split command query side

* fix: split command query side

* fix: members in correct pkg structure

* fix: label policy in correct pkg structure

* fix: structure

* fix: structure of login policy

* fix: identityprovider structure

* fix: org iam policy structure

* fix: password age policy structure

* fix: password complexity policy structure

* fix: password lockout policy structure

* fix: idp structure

* fix: user events structure

* fix: user write model

* fix: profile email changed command

* fix: address changed command

* fix: user states

* fix: user

* fix: org structure and add human

* begin iam setup command side

* setup

* step2

* step2

* fix: add user

* step2

* isvalid

* fix: folder structure v2 business

Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
This commit is contained in:
Livio Amstutz
2021-01-04 14:52:13 +01:00
committed by GitHub
parent 762941f0ea
commit 21ffe1b0cb
260 changed files with 7917 additions and 6570 deletions

View File

@@ -3,7 +3,7 @@ package eventstore
type aggregater interface {
//ID returns the aggreagte id
ID() string
//Type returns the aggregate type
//KeyType returns the aggregate type
Type() AggregateType
//Events returns the events which will be pushed
Events() []EventPusher
@@ -74,7 +74,7 @@ func (a *Aggregate) ID() string {
return a.id
}
//Type implements aggregater
//KeyType implements aggregater
func (a *Aggregate) Type() AggregateType {
return a.typ
}

View File

@@ -9,7 +9,7 @@ type EventPusher interface {
EditorService() string
//EditorUser is the user who wants to push the event
EditorUser() string
//Type must return an event type which should be unique in the aggregate
//KeyType must return an event type which should be unique in the aggregate
Type() EventType
//Data returns the payload of the event. It represent the changed fields by the event
// valid types are:
@@ -25,7 +25,7 @@ type EventReader interface {
EditorService() string
//EditorUser is the user who pushed the event
EditorUser() string
//Type is the type of the event
//KeyType is the type of the event
Type() EventType
AggregateID() string

View File

@@ -36,7 +36,7 @@ func (e *BaseEvent) EditorUser() string {
return e.User
}
//Type implements EventPusher
//KeyType implements EventPusher
func (e *BaseEvent) Type() EventType {
return e.EventType
}

View File

@@ -6,7 +6,7 @@ import (
"log"
)
//ReadModel is the minimum representation of a View model.
//MemberReadModel is the minimum representation of a View model.
// it might be saved in a database or in memory
type ReadModel struct {
ProcessedSequence uint64

View File

@@ -2,7 +2,7 @@ package eventstore
import "time"
//ReadModel is the minimum representation of a View model.
//MemberReadModel is the minimum representation of a View model.
// It implements a basic reducer
// it might be saved in a database or in memory
type ReadModel struct {

View File

@@ -26,7 +26,7 @@ type Event struct {
// time drifts in different services could cause integrity problems
CreationDate time.Time
//Type describes the cause of the event (e.g. user.added)
//KeyType describes the cause of the event (e.g. user.added)
// it should always be in past-form
Type EventType

View File

@@ -2,7 +2,7 @@ package eventstore
import "time"
//WriteModel is the minimum representation of a command side view model.
//MemberWriteModel is the minimum representation of a command side view model.
// It implements a basic reducer
// it's purpose is to reduce events to create new ones
type WriteModel struct {