feat(eventstore): sdk (#39)

* sdk

* fix(sdk): return correct error type

* AppendEventError instead of Aggregater error

* fix(tests): tests

* fix(tests): wantErr to is error func
This commit is contained in:
Silvan
2020-04-07 18:36:37 +02:00
committed by GitHub
parent 970586dfc9
commit 191690d905
27 changed files with 524 additions and 234 deletions

View File

@@ -17,11 +17,11 @@ type AlreadyExistsError struct {
}
func ThrowAlreadyExists(parent error, id, message string) error {
return &AlreadyExistsError{createCaosError(parent, id, message)}
return &AlreadyExistsError{CreateCaosError(parent, id, message)}
}
func ThrowAlreadyExistsf(parent error, id, format string, a ...interface{}) error {
return &AlreadyExistsError{createCaosError(parent, id, fmt.Sprintf(format, a...))}
return &AlreadyExistsError{CreateCaosError(parent, id, fmt.Sprintf(format, a...))}
}
func (err *AlreadyExistsError) IsAlreadyExists() {}