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.
43 lines
835 B
43 lines
835 B
11 months ago
|
package data
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"verifyCode/internal/biz"
|
||
|
|
||
|
"github.com/go-kratos/kratos/v2/log"
|
||
|
)
|
||
|
|
||
|
type greeterRepo struct {
|
||
|
data *Data
|
||
|
log *log.Helper
|
||
|
}
|
||
|
|
||
|
// NewGreeterRepo .
|
||
|
func NewGreeterRepo(data *Data, logger log.Logger) biz.GreeterRepo {
|
||
|
return &greeterRepo{
|
||
|
data: data,
|
||
|
log: log.NewHelper(logger),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (r *greeterRepo) Save(ctx context.Context, g *biz.Greeter) (*biz.Greeter, error) {
|
||
|
return g, nil
|
||
|
}
|
||
|
|
||
|
func (r *greeterRepo) Update(ctx context.Context, g *biz.Greeter) (*biz.Greeter, error) {
|
||
|
return g, nil
|
||
|
}
|
||
|
|
||
|
func (r *greeterRepo) FindByID(context.Context, int64) (*biz.Greeter, error) {
|
||
|
return nil, nil
|
||
|
}
|
||
|
|
||
|
func (r *greeterRepo) ListByHello(context.Context, string) ([]*biz.Greeter, error) {
|
||
|
return nil, nil
|
||
|
}
|
||
|
|
||
|
func (r *greeterRepo) ListAll(context.Context) ([]*biz.Greeter, error) {
|
||
|
return nil, nil
|
||
|
}
|