mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 19:14:23 +00:00
24 lines
474 B
Go
24 lines
474 B
Go
|
package eventstore
|
||
|
|
||
|
import (
|
||
|
"github.com/caos/zitadel/internal/eventstore/internal/repository/sql"
|
||
|
"github.com/caos/zitadel/internal/eventstore/models"
|
||
|
)
|
||
|
|
||
|
type Config struct {
|
||
|
Repository sql.Config
|
||
|
ServiceName string
|
||
|
}
|
||
|
|
||
|
func Start(conf Config) (Eventstore, error) {
|
||
|
repo, err := sql.Start(conf.Repository)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
return &eventstore{
|
||
|
repo: repo,
|
||
|
aggregateCreator: models.NewAggregateCreator(conf.ServiceName),
|
||
|
}, nil
|
||
|
}
|