grpc-api
OpenIoTHub‘s Grpc API
https://grpc.io/docs/languages/go/quickstart/
https://grpc.io/docs/protoc-installation/
brew install protobuf
$ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
dart pub global activate protoc_plugin
编译谷歌通用消息到dart,golang不用自己编译直接引用:
protoc --dart_out=grpc:lib google/protobuf/empty.proto google/protobuf/wrappers.proto
使用谷歌已经写好的常见消息,google.protobuf.Int32Value,google.protobuf.Empty:
https://www.jianshu.com/p/65ae77e4c517?utm_campaign=maleskine
引用谷歌proto:
https://github.com/google/protobuf.dart/issues/483
Libraries
- google/protobuf/empty.pb
- google/protobuf/empty.pbenum
- google/protobuf/empty.pbjson
- google/protobuf/wrappers.pb
- google/protobuf/wrappers.pbenum
- google/protobuf/wrappers.pbjson
- proto/gateway/gateway.pb
- proto/gateway/gateway.pbenum
- proto/gateway/gateway.pbgrpc
- proto/gateway/gateway.pbjson
- proto/manager/adminManager.pb
- proto/manager/adminManager.pbenum
- proto/manager/adminManager.pbgrpc
- proto/manager/adminManager.pbjson
- proto/manager/cnameManager.pb
- proto/manager/cnameManager.pbenum
- proto/manager/cnameManager.pbgrpc
- proto/manager/cnameManager.pbjson
- proto/manager/common.pb
- proto/manager/common.pbenum
- proto/manager/common.pbjson
- proto/manager/configManager.pb
- proto/manager/configManager.pbenum
- proto/manager/configManager.pbgrpc
- proto/manager/configManager.pbjson
- proto/manager/gatewayManager.pb
- proto/manager/gatewayManager.pbenum
- proto/manager/gatewayManager.pbgrpc
- proto/manager/gatewayManager.pbjson
- proto/manager/hostManager.pb
- proto/manager/hostManager.pbenum
- proto/manager/hostManager.pbgrpc
- proto/manager/hostManager.pbjson
- proto/manager/mqttDeviceManager.pb
- proto/manager/mqttDeviceManager.pbenum
- proto/manager/mqttDeviceManager.pbgrpc
- proto/manager/mqttDeviceManager.pbjson
- proto/manager/portManager.pb
- proto/manager/portManager.pbenum
- proto/manager/portManager.pbgrpc
- proto/manager/portManager.pbjson
- proto/manager/publicApi.pb
- proto/manager/publicApi.pbenum
- proto/manager/publicApi.pbgrpc
- proto/manager/publicApi.pbjson
- proto/manager/serverManager.pb
- proto/manager/serverManager.pbenum
- proto/manager/serverManager.pbgrpc
- proto/manager/serverManager.pbjson
- proto/manager/userManager.pb
- proto/manager/userManager.pbenum
- proto/manager/userManager.pbgrpc
- proto/manager/userManager.pbjson
- proto/mobile/mobile.pb
- proto/mobile/mobile.pbenum
- proto/mobile/mobile.pbgrpc
- proto/mobile/mobile.pbjson
- proto/server/server.pb
- proto/server/server.pbenum
- proto/server/server.pbgrpc
- proto/server/server.pbjson