Documentation ¶
Index ¶
- Variables
- func TestCreateSession(t *testing.T, sr userland.SessionRepository, ...) userland.Session
- func TestCreateSessions(t *testing.T, sr userland.SessionRepository, ...) []userland.Session
- func TestCreateTFAEnabledUser(t *testing.T, ur userland.UserRepository, opts ...func(user *userland.User)) *userland.User
- func TestCreateUser(t *testing.T, ur userland.UserRepository, opts ...func(user *userland.User)) *userland.User
- func Verified(verified bool) func(user *userland.User)
- func WithExpiration(exp time.Duration) func(*SessionCreateConfig)
- func WithNumberOfSessions(num int) func(*SessionCreateConfig)
- func WithUserEmail(email string) func(user *userland.User)
- func WithUserID(userID int) func(*SessionCreateConfig)
- func WithUserPassword(password string) func(user *userland.User)
- type SessionCreateConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultSessionUserID = 1 DefaultSessionExpiration = security.UserAccessTokenExpiration )
View Source
var ( DefaultUserEmail = "adhitya.ramadhanus@gmail.com" DefaultUserPassword = "test123" )
Functions ¶
func TestCreateSession ¶
func TestCreateSession(t *testing.T, sr userland.SessionRepository, opts ...func(*SessionCreateConfig)) userland.Session
func TestCreateSessions ¶
func TestCreateSessions(t *testing.T, sr userland.SessionRepository, opts ...func(*SessionCreateConfig)) []userland.Session
func TestCreateUser ¶
func WithExpiration ¶
func WithExpiration(exp time.Duration) func(*SessionCreateConfig)
func WithNumberOfSessions ¶
func WithNumberOfSessions(num int) func(*SessionCreateConfig)
func WithUserEmail ¶
func WithUserID ¶
func WithUserID(userID int) func(*SessionCreateConfig)
func WithUserPassword ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.