Documentation
¶
Index ¶
- Variables
- func NewCarService(cli *ent.ClientWrapper) biz.DataCarServiceIfce
- func NewDeptService(cli *ent.ClientWrapper) biz.DataDeptServiceIfce
- func NewGreeterRepo(data *Data, logger log.Logger) biz.GreeterRepo
- func NewUserService(cli *ent.ClientWrapper) biz.DataUserServiceIfce
- type CarService
- func (this *CarService) Count(ctx context.Context, req *pb.Car) (int32, error)
- func (this *CarService) Create(ctx context.Context, req *pb.Car) (id string, err error)
- func (this *CarService) Delete(ctx context.Context, id string) error
- func (this *CarService) Find(ctx context.Context, req *pb.CarPageQuery) ([]*ent.Car, int, error)
- func (this *CarService) FindById(ctx context.Context, id string) (*ent.Car, error)
- func (this *CarService) Update(ctx context.Context, req *pb.Car) (err error)
- type Data
- type DeptService
- func (this *DeptService) AddUser(ctx context.Context, req *pb.DeptAddUserReq) (id string, err error)
- func (this *DeptService) AddUserById(ctx context.Context, req *pb.DeptIdAndUserId) error
- func (this *DeptService) Count(ctx context.Context, req *pb.Dept) (int32, error)
- func (this *DeptService) Create(ctx context.Context, req *pb.Dept) (id string, err error)
- func (this *DeptService) Delete(ctx context.Context, id string) error
- func (this *DeptService) Find(ctx context.Context, req *pb.DeptPageQuery) ([]*ent.Dept, int, error)
- func (this *DeptService) FindById(ctx context.Context, id string) (*ent.Dept, error)
- func (this *DeptService) FindUsers(ctx context.Context, req *pb.DeptFindUsersReq) (data []*ent.User, total int, err error)
- func (this *DeptService) RemoveUser(ctx context.Context, req *pb.DeptRemoveUserReq) error
- func (this *DeptService) Update(ctx context.Context, req *pb.Dept) (err error)
- type UserService
- func (this *UserService) AddCar(ctx context.Context, req *pb.Car) (id string, err error)
- func (this *UserService) AddCarById(ctx context.Context, req *pb.UserIdAndCarId) error
- func (this *UserService) Count(ctx context.Context, req *pb.User) (int32, error)
- func (this *UserService) Create(ctx context.Context, req *pb.User) (id string, err error)
- func (this *UserService) Delete(ctx context.Context, id string) error
- func (this *UserService) Find(ctx context.Context, req *pb.UserPageQuery) ([]*ent.User, int, error)
- func (this *UserService) FindById(ctx context.Context, id string) (*ent.User, error)
- func (this *UserService) FindCars(ctx context.Context, req *pb.UserFindCarsReq) (data []*ent.Car, total int, err error)
- func (this *UserService) FindDepts(ctx context.Context, req *pb.UserFindDeptsReq) (data []*ent.Dept, total int, err error)
- func (this *UserService) RemoveCar(ctx context.Context, req *pb.UserRemoveCarReq) error
- func (this *UserService) Update(ctx context.Context, req *pb.User) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewData, NewGreeterRepo)
ProviderSet is data providers.
View Source
var ProviderSet = wire.NewSet(NewCarService, NewDeptService, NewUserService)
ProviderSet is service providers.
Functions ¶
func NewGreeterRepo ¶
func NewGreeterRepo(data *Data, logger log.Logger) biz.GreeterRepo
NewGreeterRepo .
Types ¶
type CarService ¶
type CarService struct {
// contains filtered or unexported fields
}
func (*CarService) Find ¶
func (this *CarService) Find(ctx context.Context, req *pb.CarPageQuery) ([]*ent.Car, int, error)
type DeptService ¶
type DeptService struct {
// contains filtered or unexported fields
}
func (*DeptService) AddUser ¶
func (this *DeptService) AddUser(ctx context.Context, req *pb.DeptAddUserReq) (id string, err error)
m2m add TODO
func (*DeptService) AddUserById ¶
func (this *DeptService) AddUserById(ctx context.Context, req *pb.DeptIdAndUserId) error
func (*DeptService) Find ¶
func (this *DeptService) Find(ctx context.Context, req *pb.DeptPageQuery) ([]*ent.Dept, int, error)
func (*DeptService) FindUsers ¶
func (this *DeptService) FindUsers(ctx context.Context, req *pb.DeptFindUsersReq) (data []*ent.User, total int, err error)
func (*DeptService) RemoveUser ¶
func (this *DeptService) RemoveUser(ctx context.Context, req *pb.DeptRemoveUserReq) error
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) AddCarById ¶
func (this *UserService) AddCarById(ctx context.Context, req *pb.UserIdAndCarId) error
func (*UserService) Find ¶
func (this *UserService) Find(ctx context.Context, req *pb.UserPageQuery) ([]*ent.User, int, error)
func (*UserService) FindCars ¶
func (this *UserService) FindCars(ctx context.Context, req *pb.UserFindCarsReq) (data []*ent.Car, total int, err error)
func (*UserService) FindDepts ¶
func (this *UserService) FindDepts(ctx context.Context, req *pb.UserFindDeptsReq) (data []*ent.Dept, total int, err error)
func (*UserService) RemoveCar ¶
func (this *UserService) RemoveCar(ctx context.Context, req *pb.UserRemoveCarReq) error
Click to show internal directories.
Click to hide internal directories.