common.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: common.proto
  3. package common
  4. import (
  5. "context"
  6. "app.yhyue.com/moapp/jyInfo/rpc/common/type/common"
  7. "github.com/zeromicro/go-zero/zrpc"
  8. "google.golang.org/grpc"
  9. )
  10. type (
  11. AreaResp = common.AreaResp
  12. City = common.City
  13. Industry = common.Industry
  14. IndustryChildsResp = common.IndustryChildsResp
  15. IndustryResp = common.IndustryResp
  16. ProjectReq = common.ProjectReq
  17. Province = common.Province
  18. SensitiveRequest = common.SensitiveRequest
  19. SensitiveResponse = common.SensitiveResponse
  20. StateRequest = common.StateRequest
  21. StateResponse = common.StateResponse
  22. Common interface {
  23. // 获取省份信息(暂不用)
  24. AreaInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*AreaResp, error)
  25. // 获取行业信息(暂不用)
  26. IndustryInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*IndustryResp, error)
  27. // 修改信息发布状态
  28. StateMethod(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error)
  29. //
  30. SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error)
  31. }
  32. defaultCommon struct {
  33. cli zrpc.Client
  34. }
  35. )
  36. func NewCommon(cli zrpc.Client) Common {
  37. return &defaultCommon{
  38. cli: cli,
  39. }
  40. }
  41. // 获取省份信息(暂不用)
  42. func (m *defaultCommon) AreaInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*AreaResp, error) {
  43. client := common.NewCommonClient(m.cli.Conn())
  44. return client.AreaInfo(ctx, in, opts...)
  45. }
  46. // 获取行业信息(暂不用)
  47. func (m *defaultCommon) IndustryInfo(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*IndustryResp, error) {
  48. client := common.NewCommonClient(m.cli.Conn())
  49. return client.IndustryInfo(ctx, in, opts...)
  50. }
  51. // 修改信息发布状态
  52. func (m *defaultCommon) StateMethod(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) {
  53. client := common.NewCommonClient(m.cli.Conn())
  54. return client.StateMethod(ctx, in, opts...)
  55. }
  56. //
  57. func (m *defaultCommon) SensitiveMethod(ctx context.Context, in *SensitiveRequest, opts ...grpc.CallOption) (*SensitiveResponse, error) {
  58. client := common.NewCommonClient(m.cli.Conn())
  59. return client.SensitiveMethod(ctx, in, opts...)
  60. }