add comments

This commit is contained in:
2025-12-18 10:50:08 +02:00
parent 53761db1e0
commit 6f4657caff

View File

@@ -16,6 +16,8 @@ type Token struct {
Expiration time.Time `gorm:"index"` Expiration time.Time `gorm:"index"`
} }
// NewSQLiteTokenStore creates a new SQLiteTokenStore with the given GORM DB instance.
// Actually can be used for any GORM-supported database.
func NewSQLiteTokenStore(db *gorm.DB) (*SQLiteTokenStore, error) { func NewSQLiteTokenStore(db *gorm.DB) (*SQLiteTokenStore, error) {
if db == nil { if db == nil {
return nil, fmt.Errorf("db is nil") return nil, fmt.Errorf("db is nil")