Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUserAlreadyExists = errors.New("user already exists")
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth interface { // Register creates a UserRegistered event and waits for the user to be added. // Returns the generated user ID for the user on success. Register(ctx context.Context, email string, password string) (string, error) // Validate checks if the id and password are correct. // // Returns true if they match // Returns false if they do not match, but the check itself was made // Returns an error if the check could not be made ValidateByID(ctx context.Context, id string, password string) (bool, error) // GetIDFromEmail gets the canonical user ID from the given email, if it exists // // Returns the ID on match // Returns an empty string if not found // Returns an error if something unexpected occurred GetIDFromEmail(ctx context.Context, email string) (string, error) }
Auth performs auth operations and updates an underlying data store and event stream
Click to show internal directories.
Click to hide internal directories.