2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 22:07:16 +08:00
Files
panel/internal/biz/cache.go
耗子 dded5e26aa feat: 支持远程插件 (#180)
* feat: api基本完成

* feat: 阶段性提交

* feat: 初步支持远程插件

* feat: 支持远程插件

* fix: tests
2024-09-19 01:17:29 +08:00

23 lines
527 B
Go

package biz
import "github.com/golang-module/carbon/v2"
type CacheKey string
const (
CacheKeyApps CacheKey = "apps"
CacheKeyRewrites CacheKey = "rewrites"
)
type Cache struct {
Key CacheKey `gorm:"primaryKey" json:"key"`
Value string `gorm:"not null" json:"value"`
CreatedAt carbon.DateTime `json:"created_at"`
UpdatedAt carbon.DateTime `json:"updated_at"`
}
type CacheRepo interface {
Get(key CacheKey, defaultValue ...string) (string, error)
Set(key CacheKey, value string) error
}