Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoStore ¶
type MongoStore struct { *mongo.Collection // contains filtered or unexported fields }
func NewMongoStore ¶
func NewMongoStore(col *mongo.Collection, timeout time.Duration, crypt crypt.CrypterI) *MongoStore
Creates new mongo storage
func (*MongoStore) Get ¶
func (s *MongoStore) Get(sid string) (*sessions.Session, error)
Gets session back from the store. Decrypt the values object back to fit the session object's values field
func (*MongoStore) Purge ¶
func (s *MongoStore) Purge(sid string) error
Purges the session: TODO; lurky xd
func (*MongoStore) Set ¶
func (s *MongoStore) Set(sess *sessions.Session) error
Saves session back to the store. Encrypts the [session.values] object.
Click to show internal directories.
Click to hide internal directories.