Documentation ¶ Index ¶ type Database func NewDatabase(db *database.Database, table string, autoMigrate bool) *Database func (g *Database) Get(ctx context.Context, id string) (contracts.SessionData, error) func (g *Database) Save(ctx context.Context, data contracts.SessionData) error type DatabaseData Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Database ¶ type Database struct { // contains filtered or unexported fields } func NewDatabase ¶ func NewDatabase(db *database.Database, table string, autoMigrate bool) *Database func (*Database) Get ¶ func (g *Database) Get(ctx context.Context, id string) (contracts.SessionData, error) func (*Database) Save ¶ func (g *Database) Save(ctx context.Context, data contracts.SessionData) error type DatabaseData ¶ type DatabaseData struct { Id string `gorm:"primaryKey"` Data map[string]interface{} `gorm:"serializer:json"` ExpiredAt time.Time `gorm:"index"` CSRFToken string } Source Files ¶ View all Source files database.go Click to show internal directories. Click to hide internal directories.