moto/common/db/types.go

25 lines
316 B
Go
Raw Normal View History

2024-12-12 17:39:04 +08:00
package db
import (
"gorm.io/gorm"
"time"
)
type (
CachingFunc func(tx *gorm.DB) (any, error)
CacheOptions struct {
dependSQL string
dependArgs []any
}
CacheOption func(o *CacheOptions)
cacheEntry struct {
storeValue any
compareValue any
createdAt time.Time
lastChecked time.Time
}
)