Documentation
¶
Index ¶
- Constants
- type PostgresStore
- func (store *PostgresStore) ChangePassword(username string, password string) error
- func (store *PostgresStore) CheckPassword(username string, password string) bool
- func (store *PostgresStore) CheckSession(username string, code string) (bool, error)
- func (store *PostgresStore) Create(username string, password string) (*User, error)
- func (store *PostgresStore) CreateSession(username string) (*Session, error)
- func (store *PostgresStore) Delete(username string) error
- func (store *PostgresStore) Get(username string) (*User, error)
- func (store *PostgresStore) HashPassword(password string) (string, error)
- type Session
- type Store
- type User
Constants ¶
View Source
const PostgresSessionTable = "\"badger.user_session\""
View Source
const PostgresUserTable = "\"badger.user\""
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresStore ¶
func (*PostgresStore) ChangePassword ¶
func (store *PostgresStore) ChangePassword(username string, password string) error
func (*PostgresStore) CheckPassword ¶
func (store *PostgresStore) CheckPassword(username string, password string) bool
func (*PostgresStore) CheckSession ¶
func (store *PostgresStore) CheckSession(username string, code string) (bool, error)
func (*PostgresStore) Create ¶
func (store *PostgresStore) Create(username string, password string) (*User, error)
func (*PostgresStore) CreateSession ¶
func (store *PostgresStore) CreateSession(username string) (*Session, error)
func (*PostgresStore) Delete ¶
func (store *PostgresStore) Delete(username string) error
func (*PostgresStore) HashPassword ¶
func (store *PostgresStore) HashPassword(password string) (string, error)
type Store ¶
type Store interface { Get(username string) (*User, error) Create(username string, password string) (*User, error) Delete(username string) error CheckPassword(username string, password string) bool //TODO: Remove the following? ChangePassword(username string, password string) error HashPassword(password string) (string, error) CheckSession(username string, code string) (bool, error) CreateSession(username string) (*Session, error) }
Click to show internal directories.
Click to hide internal directories.