You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
628 B
30 lines
628 B
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)
|
|
}
|
|
|