Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuntDBStore ¶
type BuntDBStore struct {
// contains filtered or unexported fields
}
BuntDBStore represents the session store.
func New ¶
func New(db *buntdb.DB) *BuntDBStore
New returns a new BuntDBStore instance. The db parameter should be a pointer to a buntdb store instance.
func (*BuntDBStore) All ¶
func (bs *BuntDBStore) All() (map[string][]byte, error)
All returns a map containing the token and data for all active (i.e. not expired) sessions in the BuntDBStore instance.
func (*BuntDBStore) Commit ¶
Commit adds a session token and data to the BuntDBStore instance with the given expiry time. If the session token already exists then the data and expiry time are updated.
func (*BuntDBStore) Delete ¶
func (bs *BuntDBStore) Delete(token string) error
Delete removes a session token and corresponding data from the BuntDBStore instance.
Click to show internal directories.
Click to hide internal directories.