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.
kratos/tool/kratos-gen-bts/testdata/single.go

49 lines
1.1 KiB

package testdata
import (
"context"
)
// mock test
var (
_singleCacheFunc func(c context.Context, key int64) (*Demo, error)
_singleRawFunc func(c context.Context, key int64) (*Demo, error)
_singleAddCacheFunc func(c context.Context, key int64, value *Demo) error
)
// CacheDemo .
5 years ago
func (d *dao) CacheDemo(c context.Context, key int64) (*Demo, error) {
// get data from cache
return _singleCacheFunc(c, key)
}
// RawDemo .
5 years ago
func (d *dao) RawDemo(c context.Context, key int64) (*Demo, error) {
// get data from db
return _singleRawFunc(c, key)
}
// AddCacheDemo .
5 years ago
func (d *dao) AddCacheDemo(c context.Context, key int64, value *Demo) error {
// add to cache
return _singleAddCacheFunc(c, key, value)
}
// CacheDemo1 .
5 years ago
func (d *dao) CacheDemo1(c context.Context, key int64, pn, ps int) (*Demo, error) {
// get data from cache
return nil, nil
}
// RawDemo1 .
5 years ago
func (d *dao) RawDemo1(c context.Context, key int64, pn, ps int) (*Demo, *Demo, error) {
// get data from db
return nil, nil, nil
}
// AddCacheDemo1 .
5 years ago
func (d *dao) AddCacheDemo1(c context.Context, key int64, value *Demo, pn, ps int) error {
// add to cache
return nil
}