ubmanage

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must(condition bool, message string)

func NewUserRolesAggregate

func NewUserRolesAggregate() evercore.Aggregate

Note the UserRolesAggregsate is just a receiver for the related events. It does not record state.

Types

type GenerateTwoFactorSharedSecretCommand added in v0.0.11

type GenerateTwoFactorSharedSecretCommand struct {
	Id           int64  `json:"id"`
	SharedSecret string `json:"sharedSecret"`
}

type GenerateTwoFactorSharedSecretResponse added in v0.0.11

type GenerateTwoFactorSharedSecretResponse struct {
	SharedSecret string `json:"sharedSecret"`
}

type IdValue

type IdValue struct {
	Id int64 `json:"id"`
}

type ManagementImpl

type ManagementImpl struct {
	// contains filtered or unexported fields
}

func (*ManagementImpl) GenerateTwoFactorSharedSecret added in v0.0.11

func (*ManagementImpl) OrganizationAdd

func (m *ManagementImpl) OrganizationAdd(ctx context.Context,
	command OrganizationCreateCommand,
	agent string) (r.Response[IdValue], error)

func (*ManagementImpl) OrganizationGetBySystemName

func (m *ManagementImpl) OrganizationGetBySystemName(
	ctx context.Context,
	systemName string) (r.Response[OrganizationAggregate], error)

func (*ManagementImpl) OrganizationList

func (m *ManagementImpl) OrganizationList(ctx context.Context) (r.Response[[]ubdata.Organization], error)

func (*ManagementImpl) OrganizationUpdate

func (m *ManagementImpl) OrganizationUpdate(ctx context.Context,
	command OrganizationUpdateCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) RoleAdd

func (m *ManagementImpl) RoleAdd(ctx context.Context,
	command RoleCreateCommand,
	agent string) (r.Response[IdValue], error)

func (*ManagementImpl) RoleDelete

func (m *ManagementImpl) RoleDelete(ctx context.Context,
	command RoleDeleteCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) RoleGetById

func (m *ManagementImpl) RoleGetById(ctx context.Context,
	roleId int64) (r.Response[RoleAggregate], error)

func (*ManagementImpl) RoleGetBySystemName

func (m *ManagementImpl) RoleGetBySystemName(ctx context.Context,
	systemName string) (r.Response[RoleAggregate], error)

func (*ManagementImpl) RoleList

func (m *ManagementImpl) RoleList(ctx context.Context, OrganizationId int64) (r.Response[[]ubdata.RoleRow], error)

func (*ManagementImpl) RolePermissionAdd

func (m *ManagementImpl) RolePermissionAdd(ctx context.Context,
	command RolePermissionAddCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) RolePermissionRemove

func (m *ManagementImpl) RolePermissionRemove(ctx context.Context,
	command RolePermissionRemoveCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) RoleUndelete

func (m *ManagementImpl) RoleUndelete(ctx context.Context,
	command RoleUndeleteCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) RoleUpdate

func (m *ManagementImpl) RoleUpdate(ctx context.Context,
	command RoleUpdateCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) UserAdd

func (*ManagementImpl) UserAddToRole

func (m *ManagementImpl) UserAddToRole(ctx context.Context,
	command UserAddToRoleCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) UserAuthenticate

func (m *ManagementImpl) UserAuthenticate(ctx context.Context,
	command UserLoginCommand,
	agent string) (r.Response[*UserAuthenticationResponse], error)

func (*ManagementImpl) UserDisable

func (m *ManagementImpl) UserDisable(ctx context.Context,
	command UserDisableCommand, agent string) (r.Response[any], error)

func (*ManagementImpl) UserEnable

func (m *ManagementImpl) UserEnable(ctx context.Context,
	command UserEnableCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) UserGetByEmail

func (m *ManagementImpl) UserGetByEmail(ctx context.Context,
	email string) (r.Response[UserAggregate], error)

func (*ManagementImpl) UserGetById

func (m *ManagementImpl) UserGetById(ctx context.Context,
	userId int64) (r.Response[UserAggregate], error)

func (*ManagementImpl) UserGetOrganizationRoles

func (m *ManagementImpl) UserGetOrganizationRoles(ctx context.Context, userId int64, organizationId int64) (r.Response[[]ubdata.RoleRow], error)

func (*ManagementImpl) UserRemoveFromRole

func (m *ManagementImpl) UserRemoveFromRole(ctx context.Context,
	command UserRemoveFromRoleCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) UserSetTwoFactorSharedSecret added in v0.0.11

func (m *ManagementImpl) UserSetTwoFactorSharedSecret(ctx context.Context, command UserSetTwoFactorSharedSecretCommand, agent string) (r.Response[any], error)

func (*ManagementImpl) UserUpdate

func (m *ManagementImpl) UserUpdate(ctx context.Context,
	command UserUpdateCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) UserVerify

func (m *ManagementImpl) UserVerify(ctx context.Context,
	command UserVerifyCommand,
	agent string) (r.Response[any], error)

func (*ManagementImpl) UserVerifyTwoFactorCode

func (m *ManagementImpl) UserVerifyTwoFactorCode(ctx context.Context,
	command UserVerifyTwoFactorLoginCommand,
	agent string) (r.Response[any], error)

type ManagementService

type ManagementService interface {

	// OrganizationList lists all organizations
	OrganizationList(ctx context.Context) (r.Response[[]ubdata.Organization], error)

	// OrganizationAdd creates a new organization with the given details
	// Returns the ID of the newly created organization or an error
	OrganizationAdd(ctx context.Context,
		command OrganizationCreateCommand,
		agent string) (r.Response[IdValue], error)

	// OrganizationGetBySystemName retrieves an organization by its system name
	// Returns the organization details or an error if not found
	OrganizationGetBySystemName(
		ctx context.Context,
		systemName string) (r.Response[OrganizationAggregate], error)

	// OrganizationUpdate modifies an existing organization's details
	// Returns success/failure status or an error
	OrganizationUpdate(ctx context.Context,
		command OrganizationUpdateCommand,
		agent string) (r.Response[any], error)

	// RoleAdd creates a new role with the given details
	// Returns the ID of the newly created role or an error
	RoleAdd(ctx context.Context,
		command RoleCreateCommand,
		agent string) (r.Response[IdValue], error)

	// RoleUpdate modifies an existing role's details
	// Returns success/failure status or an error
	RoleUpdate(ctx context.Context,
		command RoleUpdateCommand,
		agent string) (r.Response[any], error)

	// RoleList lists all roles for a given organization
	RoleList(ctx context.Context, OrganizationId int64) (r.Response[[]ubdata.RoleRow], error)

	// RoleGetById retrieves a role by its ID
	// Returns the role details or an error if not found
	RoleGetById(ctx context.Context,
		roleId int64) (r.Response[RoleAggregate], error)

	// RoleGetBySystemName retrieves a role by its system name
	// Returns the role details or an error if not found
	RoleGetBySystemName(ctx context.Context,
		systemName string) (r.Response[RoleAggregate], error)

	// RoleDelete marks a role as deleted (soft delete)
	// Returns success/failure status or an error
	RoleDelete(ctx context.Context,
		command RoleDeleteCommand,
		agent string) (r.Response[any], error)

	// RoleUndelete restores a previously deleted role
	// Returns success/failure status or an error
	RoleUndelete(ctx context.Context,
		command RoleUndeleteCommand,
		agent string) (r.Response[any], error)

	// RolePermissionAdd grants a permission to a role
	// Returns success/failure status or an error
	RolePermissionAdd(ctx context.Context,
		command RolePermissionAddCommand,
		agent string) (r.Response[any], error)

	// RolePermissionRemove revokes a permission from a role
	// Returns success/failure status or an error
	RolePermissionRemove(ctx context.Context,
		command RolePermissionRemoveCommand,
		agent string) (r.Response[any], error)

	// UserAdd creates a new user with the given details
	// Returns the ID of the newly created user or an error
	UserAdd(ctx context.Context,
		command UserCreateCommand,
		agent string) (r.Response[UserCreatedResponse], error)

	// UserGetById retrieves a user by their ID
	// Returns the user details or an error if not found
	UserGetById(ctx context.Context,
		userId int64) (r.Response[UserAggregate], error)

	// UserGetByEmail retrieves a user by email address
	// Returns the user details or an error if not found
	UserGetByEmail(ctx context.Context,
		email string) (r.Response[UserAggregate], error)

	// UserUpdate modifies an existing user's details
	// Returns success/failure status or an error
	UserUpdate(ctx context.Context,
		command UserUpdateCommand,
		agent string) (r.Response[any], error)

	// UserAuthenticate verifies user credentials and authenticates the user
	// Returns authentication status and user details if successful
	UserAuthenticate(ctx context.Context,
		command UserLoginCommand,
		agent string) (r.Response[*UserAuthenticationResponse], error)

	// UserVerifyTwoFactorCode verifies a 2FA code for an authenticated user
	// Returns success/failure status or an error
	UserVerifyTwoFactorCode(ctx context.Context,
		command UserVerifyTwoFactorLoginCommand,
		agent string) (r.Response[any], error)

	// UserGenerateVerificationToken creates a verification token for the user
	// Returns the generated token or an error
	UserGenerateVerificationToken(ctx context.Context,
		command UserGenerateVerificationTokenCommand,
		agent string) (r.Response[UserGenerateVerificationTokenResponse], error)

	// UserVerify verifies a user's account using a verification token
	// Returns success/failure status or an error
	UserVerify(ctx context.Context,
		command UserVerifyCommand,
		agent string) (r.Response[any], error)

	// UserGenerateTwoFactorSharedSecret generates a new 2FA shared secret for the user
	// Returns the secret and setup details or an error
	GenerateTwoFactorSharedSecret(
		ctx context.Context,
		command GenerateTwoFactorSharedSecretCommand) (r.Response[GenerateTwoFactorSharedSecretResponse], error)

	// UserSetTwoFactorSharedSecret sets the 2FA shared secret for the user
	UserSetTwoFactorSharedSecret(ctx context.Context, command UserSetTwoFactorSharedSecretCommand, agent string) (r.Response[any], error)

	// UserDisable deactivates a user account
	// Returns success/failure status or an error
	UserDisable(ctx context.Context,
		command UserDisableCommand,
		agent string) (r.Response[any], error)

	// UserEnable reactivates a previously disabled user account
	// Returns success/failure status or an error
	UserEnable(ctx context.Context,
		command UserEnableCommand,
		agent string) (r.Response[any], error)

	// UserAddToRole assigns a role to a user
	// Returns success/failure status or an error
	UserAddToRole(ctx context.Context,
		command UserAddToRoleCommand,
		agent string) (r.Response[any], error)

	// UserGetOrganizationRoles retrieves all roles a user has in a specific organization
	// Returns the list of roles or an error
	UserGetOrganizationRoles(ctx context.Context, userId int64, organizationId int64) (r.Response[[]ubdata.RoleRow], error)

	// UserRemoveFromRole revokes a role from a user
	// Returns success/failure status or an error
	UserRemoveFromRole(ctx context.Context,
		command UserRemoveFromRoleCommand,
		agent string) (r.Response[any], error)
}

ManagementService defines the interface for user, organization and role management operations

func NewManagement

func NewManagement(
	store *evercore.EventStore,
	dbadapter ubdata.DataAdapter,
	hashingService ubsecurity.HashGenerator,
	encryptionService ubsecurity.EncryptionService,
	twoFactorService ub2fa.TotpService,
) ManagementService

type OrganizationAddedEvent

type OrganizationAddedEvent struct {
	Id         int64  `json:"id"`
	Name       string `json:"name"`
	SystemName string `json:"systemName"`
	Status     string `json:"status"`
}

evercore:state-event

type OrganizationAggregate

type OrganizationAggregate struct {
	evercore.StateAggregate[OrganizationState]
}

evercore:aggregate

type OrganizationCreateCommand

type OrganizationCreateCommand struct {
	Name       string `json:"name"`
	SystemName string `json:"systemName"`
	Status     string `json:"status"`
}

OrganizationCreateCommand is a command to create an organization.

func (OrganizationCreateCommand) Validate

type OrganizationState

type OrganizationState struct {
	Name       string `json:"name"`
	SystemName string `json:"systemName"`
	Status     string `json:"status"`
}

evercore:aggregate

type OrganizationUpdateCommand

type OrganizationUpdateCommand struct {
	Id         int64   `json:"id"`
	Name       *string `json:"name"`
	SystemName *string `json:"systemName"`
	Status     *string `json:"status"`
}

func (OrganizationUpdateCommand) Validate

type OrganizationUpdatedEvent

type OrganizationUpdatedEvent struct {
	Id         int64   `json:"id"`
	Name       *string `json:"name"`
	SystemName *string `json:"systemName"`
	Status     *string `json:"status"`
}

evercore:state-event

type RoleAggregate

type RoleAggregate struct {
	evercore.StateAggregate[RoleState]
}

func (*RoleAggregate) ApplyEventState

func (t *RoleAggregate) ApplyEventState(eventState evercore.EventState, eventTime time.Time, reference string) error

type RoleCreateCommand

type RoleCreateCommand struct {
	Name           string `json:"name"`
	SystemName     string `json:"systemName"`
	OrganizationId int64  `json:"organizationId"`
}

RoleCreateCommand is a command to create a role.

func (RoleCreateCommand) Validate

type RoleCreatedEvent

type RoleCreatedEvent struct {
	Id             int64  `json:"id"`
	OrganizationId int64  `json:"organizationId"`
	Name           string `json:"name"`
	SystemName     string `json:"systemName"`
}

evercore:state-event

type RoleDeleteCommand

type RoleDeleteCommand struct {
	Id int64 `json:"id"`
}

type RoleDeletedEvent

type RoleDeletedEvent struct {
}

evercore:event

func (RoleDeletedEvent) GetEventType

func (a RoleDeletedEvent) GetEventType() string

func (RoleDeletedEvent) Serialize

func (a RoleDeletedEvent) Serialize() string

type RolePermissionAddCommand

type RolePermissionAddCommand struct {
	Id         int64  `json:"id"`
	Permission string `json:"permission"`
}

func (RolePermissionAddCommand) Validate

type RolePermissionAddedEvent

type RolePermissionAddedEvent struct {
	Permission string `json:"permission"`
}

evercore:event

func (RolePermissionAddedEvent) GetEventType

func (a RolePermissionAddedEvent) GetEventType() string

func (RolePermissionAddedEvent) Serialize

func (a RolePermissionAddedEvent) Serialize() string

type RolePermissionRemoveCommand

type RolePermissionRemoveCommand struct {
	Id         int64  `json:"id"`
	Permission string `json:"permission"`
}

func (RolePermissionRemoveCommand) Validate

type RolePermissionRemovedEvent

type RolePermissionRemovedEvent struct {
	Permission string `json:"permission"`
}

evercore:event

func (RolePermissionRemovedEvent) GetEventType

func (a RolePermissionRemovedEvent) GetEventType() string

func (RolePermissionRemovedEvent) Serialize

func (a RolePermissionRemovedEvent) Serialize() string

type RoleState

type RoleState struct {
	Name           string `json:"name"`
	OrganizationId int64  `json:"organizationId"`
	SystemName     string `json:"systemName"`
	Deleted        bool   `json:"deleted"`
	Permissions    []string
}

type RoleUndeleteCommand

type RoleUndeleteCommand struct {
	Id int64 `json:"id"`
}

type RoleUndeletedEvent

type RoleUndeletedEvent struct {
}

evercore:event

func (RoleUndeletedEvent) GetEventType

func (a RoleUndeletedEvent) GetEventType() string

func (RoleUndeletedEvent) Serialize

func (a RoleUndeletedEvent) Serialize() string

type RoleUpdateCommand

type RoleUpdateCommand struct {
	Id         int64   `json:"id"`
	Name       *string `json:"name"`
	SystemName *string `json:"systemName"`
}

func (RoleUpdateCommand) Validate

type RoleUpdatedEvent

type RoleUpdatedEvent struct {
	Id         int64   `json:"id"`
	Name       *string `json:"name"`
	SystemName *string `json:"systemName"`
}

evercore:state-event

type UserAddToRoleCommand

type UserAddToRoleCommand struct {
	UserId int64 `json:"userId"`
	RoleId int64 `json:"roleId"`
}

func (UserAddToRoleCommand) Validate

type UserAddedEvent

type UserAddedEvent struct {
	Email        string `json:"email"`
	PasswordHash string `json:"passwordHash"`
	FirstName    string `json:"firstName"`
	LastName     string `json:"lastName"`
	DisplayName  string `json:"displayName"`
	Verified     bool   `json:"verified"`
}

evercore:state-event

type UserAddedToRoleEvent

type UserAddedToRoleEvent struct {
	UserId int64 `json:"userId"`
	RoleId int64 `json:"roleId"`
}

evercore:event

func (UserAddedToRoleEvent) GetEventType

func (a UserAddedToRoleEvent) GetEventType() string

func (UserAddedToRoleEvent) Serialize

func (a UserAddedToRoleEvent) Serialize() string

type UserAggregate

type UserAggregate struct {
	evercore.StateAggregate[UserState]
}

evercore:aggregate

func (*UserAggregate) ApplyEventState

func (t *UserAggregate) ApplyEventState(eventState evercore.EventState, eventTime time.Time, reference string) error

type UserAuthenticationResponse

type UserAuthenticationResponse struct {
	UserId               int64  `json:"user_id"`
	Email                string `json:"email"`
	RequiresTwoFactor    bool   `json:"requires_two_factor"`
	RequiresVerification bool   `json:"requires_verification"`
}

type UserCreateCommand

type UserCreateCommand struct {
	Email                     string `json:"email"`
	Password                  string `json:"password"`
	FirstName                 string `json:"firstName"`
	LastName                  string `json:"lastName"`
	DisplayName               string `json:"displayName"`
	Verified                  bool   `json:"verified"`
	GenerateVerificationToken bool   `json:"verificationRequired"`
}

func (UserCreateCommand) Validate

type UserCreatedResponse added in v0.0.11

type UserCreatedResponse struct {
	Id                int64   `json:"id"`
	VerificationToken *string `json:"verificationToken,omitempty"`
}

type UserDisableCommand

type UserDisableCommand struct {
	Id int64 `json:"id"`
}

type UserDisabledEvent

type UserDisabledEvent struct {
}

evercore:event

func (UserDisabledEvent) GetEventType

func (a UserDisabledEvent) GetEventType() string

func (UserDisabledEvent) Serialize

func (a UserDisabledEvent) Serialize() string

type UserEnableCommand

type UserEnableCommand struct {
	Id int64 `json:"id"`
}

type UserEnabledEvent

type UserEnabledEvent struct {
}

evercore:event

func (UserEnabledEvent) GetEventType

func (a UserEnabledEvent) GetEventType() string

func (UserEnabledEvent) Serialize

func (a UserEnabledEvent) Serialize() string

type UserGenerateVerificationTokenCommand

type UserGenerateVerificationTokenCommand struct {
	Id int64 `json:"id"`
}

func (UserGenerateVerificationTokenCommand) Validate

type UserGenerateVerificationTokenResponse

type UserGenerateVerificationTokenResponse struct {
	Token string `json:"token"`
}

type UserLoginCommand

type UserLoginCommand struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type UserLoginFailedEvent

type UserLoginFailedEvent struct {
}

evercore:event

func (UserLoginFailedEvent) GetEventType

func (a UserLoginFailedEvent) GetEventType() string

func (UserLoginFailedEvent) Serialize

func (a UserLoginFailedEvent) Serialize() string

type UserLoginSucceededEvent

type UserLoginSucceededEvent struct {
}

evercore:event

func (UserLoginSucceededEvent) GetEventType

func (a UserLoginSucceededEvent) GetEventType() string

func (UserLoginSucceededEvent) Serialize

func (a UserLoginSucceededEvent) Serialize() string

type UserRemoveFromRoleCommand

type UserRemoveFromRoleCommand struct {
	UserId int64 `json:"userId"`
	RoleId int64 `json:"roleId"`
}

func (UserRemoveFromRoleCommand) Validate

type UserRemovedFromRoleEvent

type UserRemovedFromRoleEvent struct {
	UserId int64 `json:"userId"`
	RoleId int64 `json:"roleId"`
}

evercore:event

func (UserRemovedFromRoleEvent) GetEventType

func (a UserRemovedFromRoleEvent) GetEventType() string

func (UserRemovedFromRoleEvent) Serialize

func (a UserRemovedFromRoleEvent) Serialize() string

type UserRolesAggregate

type UserRolesAggregate struct {
	Id       int64
	Sequence int64
}

evercore:aggregate

func (*UserRolesAggregate) ApplyEventState

func (t *UserRolesAggregate) ApplyEventState(eventState evercore.EventState, eventTime time.Time, reference string) error

func (*UserRolesAggregate) ApplySnapshot

func (t *UserRolesAggregate) ApplySnapshot(snapshot *evercore.Snapshot) error

func (*UserRolesAggregate) GetAggregateType

func (t *UserRolesAggregate) GetAggregateType() string

func (*UserRolesAggregate) GetId

func (t *UserRolesAggregate) GetId() int64

func (*UserRolesAggregate) GetSequence

func (t *UserRolesAggregate) GetSequence() int64

func (*UserRolesAggregate) GetSnapshotFrequency

func (t *UserRolesAggregate) GetSnapshotFrequency() int64

func (*UserRolesAggregate) GetSnapshotState

func (t *UserRolesAggregate) GetSnapshotState() (*string, error)

func (*UserRolesAggregate) SetId

func (t *UserRolesAggregate) SetId(id int64)

func (*UserRolesAggregate) SetSequence

func (t *UserRolesAggregate) SetSequence(seq int64)

type UserSetTwoFactorSharedSecretCommand added in v0.0.11

type UserSetTwoFactorSharedSecretCommand struct {
	Id     int64  `json:"id"`
	Secret string `json:"secret"`
}

type UserState

type UserState struct {
	Email                 string  `json:"email"`
	PasswordHash          string  `json:"passwordHash"`
	FirstName             string  `json:"firstName"`
	LastName              string  `json:"lastName"`
	VerificationToken     *string `json:"verificationToken,omitempty"`
	Verified              bool    `json:"verified"`
	Disabled              bool    `json:"disabled"`
	DisplayName           string  `json:"displayName"`
	ResetToken            *string `json:"resetToken,omitempty"`
	LastLogin             int64   `json:"lastLogin,omitempty"`
	LastLoginAttempt      int64   `json:"lastLoginAttempt,omitempty"`
	FailedLoginAttempts   int64   `json:"failedLoginAttempts,omitempty"`
	TwoFactorSharedSecret *string `json:"twoFactorSharedSecret,omitempty"`
	Roles                 []int64 `json:"roles,omitempty"`
}

type UserTwoFactorAuthenticatedEvent

type UserTwoFactorAuthenticatedEvent struct {
}

evercore:event

func (UserTwoFactorAuthenticatedEvent) GetEventType

func (a UserTwoFactorAuthenticatedEvent) GetEventType() string

func (UserTwoFactorAuthenticatedEvent) Serialize

type UserTwoFactorDisabledEvent

type UserTwoFactorDisabledEvent struct {
}

evercore:event

func (UserTwoFactorDisabledEvent) GetEventType

func (a UserTwoFactorDisabledEvent) GetEventType() string

func (UserTwoFactorDisabledEvent) Serialize

func (a UserTwoFactorDisabledEvent) Serialize() string

type UserTwoFactorEnabledEvent

type UserTwoFactorEnabledEvent struct {
	SharedSecret string `json:"sharedSecret"`
}

evercore:event

func (UserTwoFactorEnabledEvent) GetEventType

func (a UserTwoFactorEnabledEvent) GetEventType() string

func (UserTwoFactorEnabledEvent) Serialize

func (a UserTwoFactorEnabledEvent) Serialize() string

type UserUpdateCommand

type UserUpdateCommand struct {
	Id          int64   `json:"id"`
	Email       *string `json:"email"`
	Password    *string `json:"password"`
	FirstName   *string `json:"firstName"`
	LastName    *string `json:"lastName"`
	DisplayName *string `json:"displayName"`
	Verified    *bool   `json:"verified"`
}

func (UserUpdateCommand) Validate

type UserUpdatedEvent

type UserUpdatedEvent struct {
	Id           int64   `json:"id"`
	Email        *string `json:"email"`
	PasswordHash *string `json:"passwordHash"`
	FirstName    *string `json:"firstName"`
	LastName     *string `json:"lastName"`
	DisplayName  *string `json:"displayName"`
	Verified     *bool   `json:"verified"`
}

evercore:state-event

type UserVerificationTokenGeneratedEvent

type UserVerificationTokenGeneratedEvent struct {
	Token string `json:"token"`
}

evercore:event

func (UserVerificationTokenGeneratedEvent) GetEventType

func (UserVerificationTokenGeneratedEvent) Serialize

type UserVerificationTokenVerifiedEvent

type UserVerificationTokenVerifiedEvent struct {
}

evercore:event

func (UserVerificationTokenVerifiedEvent) GetEventType

func (a UserVerificationTokenVerifiedEvent) GetEventType() string

func (UserVerificationTokenVerifiedEvent) Serialize

type UserVerifyCommand

type UserVerifyCommand struct {
	Id           int64  `json:"id"`
	Verification string `json:"verification"`
}

type UserVerifyTwoFactorLoginCommand

type UserVerifyTwoFactorLoginCommand struct {
	UserId int64  `json:"id"`
	Code   string `json:"code"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL