event.go 855 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: hi.proto
  3. package client
  4. import (
  5. "context"
  6. "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/example/rpc/hi/pb/hi"
  7. "github.com/wuntsong-org/go-zero-plus/zrpc"
  8. "google.golang.org/grpc"
  9. )
  10. type (
  11. EventReq = hi.EventReq
  12. EventResp = hi.EventResp
  13. HelloReq = hi.HelloReq
  14. HelloResp = hi.HelloResp
  15. HiReq = hi.HiReq
  16. HiResp = hi.HiResp
  17. Event interface {
  18. AskQuestion(ctx context.Context, in *EventReq, opts ...grpc.CallOption) (*EventResp, error)
  19. }
  20. defaultEvent struct {
  21. cli zrpc.Client
  22. }
  23. )
  24. func NewEvent(cli zrpc.Client) Event {
  25. return &defaultEvent{
  26. cli: cli,
  27. }
  28. }
  29. func (m *defaultEvent) AskQuestion(ctx context.Context, in *EventReq, opts ...grpc.CallOption) (*EventResp, error) {
  30. client := hi.NewEventClient(m.cli.Conn())
  31. return client.AskQuestion(ctx, in, opts...)
  32. }