Documentation ¶
Index ¶
- func CheckCookieOptions(in *testInput)
- func LoadSessionTests(in *testInput)
- func PersistentSessionStoreInterfaceTests(in *testInput)
- func RunSessionStoreTests(newSS NewSessionStoreFunc, ...)
- func SessionStoreInterfaceTests(in *testInput)
- type MockLock
- func (l *MockLock) FastForward(duration time.Duration)
- func (l *MockLock) Obtain(ctx context.Context, expiration time.Duration) error
- func (l *MockLock) Peek(ctx context.Context) (bool, error)
- func (l *MockLock) Refresh(ctx context.Context, expiration time.Duration) error
- func (l *MockLock) Release(ctx context.Context) error
- type MockStore
- func (s *MockStore) Clear(_ context.Context, key string) error
- func (s *MockStore) FastForward(duration time.Duration)
- func (s *MockStore) Load(_ context.Context, key string) ([]byte, error)
- func (s *MockStore) Lock(key string) sessions.Lock
- func (s *MockStore) Save(_ context.Context, key string, value []byte, exp time.Duration) error
- func (s *MockStore) VerifyConnection(_ context.Context) error
- type NewSessionStoreFunc
- type PersistentStoreFastForwardFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCookieOptions ¶
func CheckCookieOptions(in *testInput)
func LoadSessionTests ¶
func LoadSessionTests(in *testInput)
func PersistentSessionStoreInterfaceTests ¶
func PersistentSessionStoreInterfaceTests(in *testInput)
func RunSessionStoreTests ¶
func RunSessionStoreTests(newSS NewSessionStoreFunc, persistentFastForward PersistentStoreFastForwardFunc)
func SessionStoreInterfaceTests ¶
func SessionStoreInterfaceTests(in *testInput)
Types ¶
type MockLock ¶
type MockLock struct {
// contains filtered or unexported fields
}
func (*MockLock) FastForward ¶
FastForward simulates the flow of time to test expirations
type MockStore ¶
type MockStore struct {
// contains filtered or unexported fields
}
MockStore is a generic in-memory implementation of persistence.Store for mocking in tests
func (*MockStore) FastForward ¶
FastForward simulates the flow of time to test expirations
type NewSessionStoreFunc ¶
type NewSessionStoreFunc func(sessionOpts *options.SessionOptions, cookieOpts *options.Cookie) (sessionsapi.SessionStore, error)
NewSessionStoreFunc allows any session store implementation to configure their own session store before each test.
type PersistentStoreFastForwardFunc ¶
PersistentStoreFastForwardFunc is used to adjust the time of the persistent store to fast forward expiry of sessions.
Click to show internal directories.
Click to hide internal directories.