Documentation ¶
Index ¶
- type User
- type UserProvider
- type UserRecord
- type UsersFileStore
- func (p *UsersFileStore) Authenticate(userEmail string, userPass string) (*User, error)
- func (p *UsersFileStore) GetByDisplayName(displayName string) (*User, error)
- func (p *UsersFileStore) GetByEmail(email string) (*User, error)
- func (p *UsersFileStore) GetById(id string) (*User, error)
- func (p *UsersFileStore) GetStats() (int, []User, error)
- func (p *UsersFileStore) SignUp(userEmail, userPass, displayName string) (*User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserProvider ¶
type UserProvider interface { Authenticate(userEmail string, userPass string) (*User, error) SignUp(userEmail, userPass, displayName string) (*User, error) GetById(id string) (*User, error) GetByDisplayName(name string) (*User, error) GetByEmail(email string) (*User, error) GetStats() (int, []User, error) }
type UserRecord ¶
type UserRecord struct { Id string `json:"id"` Email string `json:"email"` PasswordHash string `json:"pass"` DisplayName string `json:"display_name"` }
func (*UserRecord) ToUser ¶
func (r *UserRecord) ToUser() *User
type UsersFileStore ¶
type UsersFileStore struct {
// contains filtered or unexported fields
}
func NewUsersFileStore ¶
func NewUsersFileStore(filename string) (*UsersFileStore, error)
func (*UsersFileStore) Authenticate ¶
func (p *UsersFileStore) Authenticate(userEmail string, userPass string) (*User, error)
func (*UsersFileStore) GetByDisplayName ¶
func (p *UsersFileStore) GetByDisplayName(displayName string) (*User, error)
func (*UsersFileStore) GetByEmail ¶
func (p *UsersFileStore) GetByEmail(email string) (*User, error)
Click to show internal directories.
Click to hide internal directories.