scs: Index | Files

package buntstore

import ""

Package buntstore is a buntdb based session store for the SCS session package.


Package Files


type BuntStore Uses

type BuntStore struct {
    // contains filtered or unexported fields

BuntStore is a SCS session store backed by a buntdb file.

func New Uses

func New(db *buntdb.DB) *BuntStore

New creates a BuntStore instance.

func (*BuntStore) Delete Uses

func (bs *BuntStore) Delete(token string) error

Delete removes session token and corresponding data.

func (*BuntStore) Find Uses

func (bs *BuntStore) Find(token string) (b []byte, exists bool, err error)

Find returns the data for a session token. If the session token is not found or is expired, the exists flag will be false.

func (*BuntStore) Save Uses

func (bs *BuntStore) Save(token string, b []byte, expiry time.Time) error

Save updates data for a given session token with a given expiry. Any existing data + expiry will be over-written.

Package buntstore imports 2 packages (graph). Updated 2017-09-01. Refresh now. Tools for package owners.