Documentation ¶
Index ¶
- type InMemoryUserRepository
- func (ur *InMemoryUserRepository) CreateUser(user models.User) (models.User, error)
- func (ur *InMemoryUserRepository) DeleteUser(realm, userID string) error
- func (ur *InMemoryUserRepository) GetUser(realm, id string) (models.User, error)
- func (ur *InMemoryUserRepository) SetPassword(realm, userID, password string) error
- func (ur *InMemoryUserRepository) UpdateUser(user models.User) (models.User, error)
- func (ur *InMemoryUserRepository) ValidatePassword(realm, userID, password string) (bool, error)
- type UserRepository
- type UserRepositoryMongoDB
- func (ur *UserRepositoryMongoDB) CreateUser(user models.User) (models.User, error)
- func (ur *UserRepositoryMongoDB) DeleteUser(realm, userID string) error
- func (ur *UserRepositoryMongoDB) GetUser(realm, userID string) (models.User, error)
- func (ur *UserRepositoryMongoDB) SetPassword(realm, userID, password string) error
- func (ur *UserRepositoryMongoDB) UpdateUser(user models.User) (models.User, error)
- func (ur *UserRepositoryMongoDB) ValidatePassword(realm, userID, password string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryUserRepository ¶
type InMemoryUserRepository struct {
// contains filtered or unexported fields
}
func (*InMemoryUserRepository) CreateUser ¶
func (*InMemoryUserRepository) DeleteUser ¶
func (ur *InMemoryUserRepository) DeleteUser(realm, userID string) error
func (*InMemoryUserRepository) GetUser ¶
func (ur *InMemoryUserRepository) GetUser(realm, id string) (models.User, error)
func (*InMemoryUserRepository) SetPassword ¶
func (ur *InMemoryUserRepository) SetPassword(realm, userID, password string) error
func (*InMemoryUserRepository) UpdateUser ¶
func (*InMemoryUserRepository) ValidatePassword ¶
func (ur *InMemoryUserRepository) ValidatePassword(realm, userID, password string) (bool, error)
type UserRepository ¶
type UserRepository interface { GetUser(realm, userID string) (models.User, error) CreateUser(user models.User) (models.User, error) UpdateUser(user models.User) (models.User, error) DeleteUser(realm, userID string) error SetPassword(realm, userID, password string) error ValidatePassword(realm, userID, password string) (bool, error) }
func NewInMemoryUserRepository ¶
func NewInMemoryUserRepository() UserRepository
type UserRepositoryMongoDB ¶
type UserRepositoryMongoDB struct {
// contains filtered or unexported fields
}
func NewUserRepositoryMongoDB ¶
func NewUserRepositoryMongoDB(uri, db, collection string) UserRepositoryMongoDB
func (*UserRepositoryMongoDB) CreateUser ¶
func (*UserRepositoryMongoDB) DeleteUser ¶
func (ur *UserRepositoryMongoDB) DeleteUser(realm, userID string) error
func (*UserRepositoryMongoDB) GetUser ¶
func (ur *UserRepositoryMongoDB) GetUser(realm, userID string) (models.User, error)
func (*UserRepositoryMongoDB) SetPassword ¶
func (ur *UserRepositoryMongoDB) SetPassword(realm, userID, password string) error
func (*UserRepositoryMongoDB) UpdateUser ¶
func (*UserRepositoryMongoDB) ValidatePassword ¶
func (ur *UserRepositoryMongoDB) ValidatePassword(realm, userID, password string) (bool, error)
Click to show internal directories.
Click to hide internal directories.