2024-12-30 15:09:02 +08:00
|
|
|
package interfaces
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/elastic/go-elasticsearch/v7"
|
|
|
|
"github.com/loveuer/upp/pkg/cache"
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Upp interface {
|
2025-01-01 21:01:05 -08:00
|
|
|
Debug() bool
|
2024-12-30 15:09:02 +08:00
|
|
|
UseCtx() context.Context
|
|
|
|
UseDB(ctx ...context.Context) *gorm.DB
|
|
|
|
UseCache() cache.Cache
|
|
|
|
UseES() *elasticsearch.Client
|
|
|
|
UseLogger(ctxs ...context.Context) Logger
|
|
|
|
}
|