Documentation ¶
Index ¶
Constants ¶
View Source
const (
// The minimun number of bytes to be used for each session token.
MinBytesPerToken = 32
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PostgresConfig ¶
type PostgresConfig struct { Host string Port string User string Password string Database string SSLMode string }
func DefaultPostgresConfig ¶
func DefaultPostgresConfig() PostgresConfig
func (PostgresConfig) String ¶
func (cfg PostgresConfig) String() string
type SessionService ¶
type SessionService struct { DB *sql.DB // BytesPerToken is used to determine how many bytes to use when // generating each session token. If this value is not set or less than // the MinBytesPerToken const, the MinBytesPerToken will be used. BytesPerToken int }
func (*SessionService) Delete ¶
func (ss *SessionService) Delete(token string) error
type UserService ¶
func (*UserService) Authenticate ¶
func (us *UserService) Authenticate(email, password string) (*User, error)
Click to show internal directories.
Click to hide internal directories.