moto/common/db/types.go

25 lines
319 B
Go
Raw Permalink 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
2024-12-13 10:37:09 +08:00
compareValue string
2024-12-12 17:39:04 +08:00
createdAt time.Time
lastChecked time.Time
}
)