storage

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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) Delete added in v1.4.2

func (g *Database) Delete(ctx context.Context, id string) error

func (*Database) Get

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
}

type Firestore added in v1.4.3

type Firestore struct {
	// contains filtered or unexported fields
}

func NewFirestore added in v1.4.3

func NewFirestore(client *firestore.Client, collection string) *Firestore

func (*Firestore) Delete added in v1.4.3

func (s *Firestore) Delete(ctx context.Context, id string) error

func (*Firestore) Get added in v1.4.3

func (*Firestore) Save added in v1.4.3

func (s *Firestore) Save(ctx context.Context, data contracts.SessionData) error

type FirestoreData added in v1.4.3

type FirestoreData struct {
	Data      map[string]interface{} `firestore:"data"`
	ExpiredAt time.Time              `firestore:"expired_at"`
	CSRFToken string                 `firestore:"csrf_token"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL