child.go 978 B

12345678910111213141516171819202122232425262728293031323334
  1. package service
  2. import (
  3. "context"
  4. "sikey/w303a/http/internal/biz"
  5. pb "sikey/w303a/http/api/user/v2"
  6. )
  7. type ChildService struct {
  8. pb.UnimplementedChildServer
  9. childUsecase *biz.ChildUsecase
  10. }
  11. func NewChildService(childUsecase *biz.ChildUsecase) *ChildService {
  12. return &ChildService{childUsecase: childUsecase}
  13. }
  14. func (s *ChildService) GetChild(ctx context.Context, req *pb.GetChildRequest) (*pb.GetChildResponse, error) {
  15. return s.childUsecase.GetChild(ctx, req)
  16. }
  17. func (s *ChildService) CreateChild(ctx context.Context, req *pb.CreateChildRequest) (*pb.CreateChildResponse, error) {
  18. return s.childUsecase.CreateChild(ctx, req)
  19. }
  20. func (s *ChildService) UpdateChild(ctx context.Context, req *pb.UpdateChildRequest) (*pb.UpdateChildResponse, error) {
  21. return s.childUsecase.UpdateChild(ctx, req)
  22. }
  23. func (s *ChildService) DeleteChild(ctx context.Context, req *pb.DeleteChildRequest) (*pb.DeleteChildResponse, error) {
  24. return s.childUsecase.DeleteChild(ctx, req)
  25. }