iris/sessions/sessiondb
2017-06-12 18:23:35 +03:00
..
redis Fix https://github.com/iris-contrib/community-board/issues/10 and upgrade the minor version number 2017-06-12 18:23:35 +03:00
README.md Publish the new version ✈️ | Look description please! 2017-06-03 23:22:52 +03:00

Session databases

Find more databases at github.com/kataras/go-sessions/sessiondb.

This folder contains only the redis database because the rest (two so far, 'file' and 'leveldb') were created by the Community. So go there and find more about them. Database is just an interface so you're able to UseDatabase(anyCompatibleDatabase). A Database should implement two functions, Load and Update.

Database interface

type Database interface {
	Load(string) map[string]interface{}
	Update(string, map[string]interface{})
}
import (
  "...myDatabase"
)
s := New(...)
s.UseDatabase(myDatabase) // <---

app := iris.New()
app.Adapt(s)

app.Listen(":8080")