mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-24 03:46:37 +02:00
0ffb6233bc
add genbts & genmc
31 lines
628 B
Go
31 lines
628 B
Go
package testdata
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// mock test
|
|
var (
|
|
_noneCacheFunc func(c context.Context) (*Demo, error)
|
|
_noneRawFunc func(c context.Context) (*Demo, error)
|
|
_noneAddCacheFunc func(c context.Context, value *Demo) error
|
|
)
|
|
|
|
// CacheNone .
|
|
func (d *Dao) CacheNone(c context.Context) (*Demo, error) {
|
|
// get data from cache
|
|
return _noneCacheFunc(c)
|
|
}
|
|
|
|
// RawNone .
|
|
func (d *Dao) RawNone(c context.Context) (*Demo, error) {
|
|
// get data from db
|
|
return _noneRawFunc(c)
|
|
}
|
|
|
|
// AddCacheNone .
|
|
func (d *Dao) AddCacheNone(c context.Context, value *Demo) error {
|
|
// add to cache
|
|
return _noneAddCacheFunc(c, value)
|
|
}
|