mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
23 lines
569 B
Go
23 lines
569 B
Go
|
package command
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/zitadel/zitadel/internal/repository/milestone"
|
||
|
)
|
||
|
|
||
|
// MilestonePushed writes a new milestone.PushedEvent with a new milestone.Aggregate to the eventstore
|
||
|
func (c *Commands) MilestonePushed(
|
||
|
ctx context.Context,
|
||
|
msType milestone.Type,
|
||
|
endpoints []string,
|
||
|
primaryDomain string,
|
||
|
) error {
|
||
|
id, err := c.idGenerator.Next()
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
_, err = c.eventstore.Push(ctx, milestone.NewPushedEvent(ctx, milestone.NewAggregate(ctx, id), msType, endpoints, primaryDomain, c.externalDomain))
|
||
|
return err
|
||
|
}
|