stdlib.go 837 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: stdlib.proto
  3. //go:generate mockgen -destination ./stdlib_mock.go -package stdlibclient -source $GOFILE
  4. package stdlibclient
  5. import (
  6. "app.yhyue.com/moapp/jydocs/rpc/stdlib/stdlib_pb"
  7. "context"
  8. "github.com/tal-tech/go-zero/zrpc"
  9. )
  10. type (
  11. DocQueryRequest = stdlib.DocQueryRequest
  12. DocQueryResponse = stdlib.DocQueryResponse
  13. Doc = stdlib.Doc
  14. Stdlib interface {
  15. DocQuery(ctx context.Context, in *DocQueryRequest) (*DocQueryResponse, error)
  16. }
  17. defaultStdlib struct {
  18. cli zrpc.Client
  19. }
  20. )
  21. func NewStdlib(cli zrpc.Client) Stdlib {
  22. return &defaultStdlib{
  23. cli: cli,
  24. }
  25. }
  26. func (m *defaultStdlib) DocQuery(ctx context.Context, in *DocQueryRequest) (*DocQueryResponse, error) {
  27. client := stdlib.NewStdlibClient(m.cli.Conn())
  28. return client.DocQuery(ctx, in)
  29. }