add documentation

This commit is contained in:
adlerhurst
2025-05-08 19:01:55 +02:00
parent 47e63ed801
commit c6db6dc4b7
27 changed files with 126 additions and 21 deletions

View File

@@ -6,6 +6,10 @@ import (
"github.com/zitadel/zitadel/backend/v3/storage/eventstore"
)
// CreateUserCommand adds a new user including the email verification for humans.
// In the future it might make sense to separate the command into two commands:
// - CreateHumanCommand: creates a new human user
// - CreateMachineCommand: creates a new machine user
type CreateUserCommand struct {
user *User
email *SetEmailCommand
@@ -16,6 +20,7 @@ var (
_ eventer = (*CreateUserCommand)(nil)
)
// opts heavily reduces the complexity for email verification because each type of verification is a simple option which implements the [Commander] interface.
func NewCreateHumanCommand(username string, opts ...CreateHumanOpt) *CreateUserCommand {
cmd := &CreateUserCommand{
user: &User{