经皮湿水仪init and bind's all api
This commit is contained in:
@@ -0,0 +1,388 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v4.25.8
|
||||
// source: percutaneous/percutaneous.proto
|
||||
|
||||
package percutaneous
|
||||
|
||||
import (
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type WifiCheckRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
HostCode string `protobuf:"bytes,1,opt,name=host_code,json=hostCode,proto3" json:"host_code,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *WifiCheckRequest) Reset() {
|
||||
*x = WifiCheckRequest{}
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *WifiCheckRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WifiCheckRequest) ProtoMessage() {}
|
||||
|
||||
func (x *WifiCheckRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WifiCheckRequest.ProtoReflect.Descriptor instead.
|
||||
func (*WifiCheckRequest) Descriptor() ([]byte, []int) {
|
||||
return file_percutaneous_percutaneous_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *WifiCheckRequest) GetHostCode() string {
|
||||
if x != nil {
|
||||
return x.HostCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type WifiSetRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
HostCode string `protobuf:"bytes,1,opt,name=host_code,json=hostCode,proto3" json:"host_code,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *WifiSetRequest) Reset() {
|
||||
*x = WifiSetRequest{}
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *WifiSetRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WifiSetRequest) ProtoMessage() {}
|
||||
|
||||
func (x *WifiSetRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WifiSetRequest.ProtoReflect.Descriptor instead.
|
||||
func (*WifiSetRequest) Descriptor() ([]byte, []int) {
|
||||
return file_percutaneous_percutaneous_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *WifiSetRequest) GetHostCode() string {
|
||||
if x != nil {
|
||||
return x.HostCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UseRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
HostCode string `protobuf:"bytes,1,opt,name=host_code,json=hostCode,proto3" json:"host_code,omitempty"`
|
||||
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
||||
Stamp string `protobuf:"bytes,4,opt,name=stamp,proto3" json:"stamp,omitempty"`
|
||||
Position int32 `protobuf:"varint,5,opt,name=position,proto3" json:"position,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UseRequest) Reset() {
|
||||
*x = UseRequest{}
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UseRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UseRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UseRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UseRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UseRequest) Descriptor() ([]byte, []int) {
|
||||
return file_percutaneous_percutaneous_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *UseRequest) GetHostCode() string {
|
||||
if x != nil {
|
||||
return x.HostCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UseRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UseRequest) GetData() string {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UseRequest) GetStamp() string {
|
||||
if x != nil {
|
||||
return x.Stamp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UseRequest) GetPosition() int32 {
|
||||
if x != nil {
|
||||
return x.Position
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type UsedLogRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
|
||||
Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UsedLogRequest) Reset() {
|
||||
*x = UsedLogRequest{}
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UsedLogRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UsedLogRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UsedLogRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UsedLogRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UsedLogRequest) Descriptor() ([]byte, []int) {
|
||||
return file_percutaneous_percutaneous_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *UsedLogRequest) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UsedLogRequest) GetSize() int32 {
|
||||
if x != nil {
|
||||
return x.Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Response) Reset() {
|
||||
*x = Response{}
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Response) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Response) ProtoMessage() {}
|
||||
|
||||
func (x *Response) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_percutaneous_percutaneous_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Response.ProtoReflect.Descriptor instead.
|
||||
func (*Response) Descriptor() ([]byte, []int) {
|
||||
return file_percutaneous_percutaneous_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *Response) GetCode() int32 {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Response) GetMsg() string {
|
||||
if x != nil {
|
||||
return x.Msg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Response) GetData() string {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_percutaneous_percutaneous_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_percutaneous_percutaneous_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1fpercutaneous/percutaneous.proto\x12\fpercutaneous\x1a\x1cgoogle/api/annotations.proto\"/\n" +
|
||||
"\x10WifiCheckRequest\x12\x1b\n" +
|
||||
"\thost_code\x18\x01 \x01(\tR\bhostCode\"-\n" +
|
||||
"\x0eWifiSetRequest\x12\x1b\n" +
|
||||
"\thost_code\x18\x01 \x01(\tR\bhostCode\"\x88\x01\n" +
|
||||
"\n" +
|
||||
"UseRequest\x12\x1b\n" +
|
||||
"\thost_code\x18\x01 \x01(\tR\bhostCode\x12\x17\n" +
|
||||
"\auser_id\x18\x02 \x01(\x03R\x06userId\x12\x12\n" +
|
||||
"\x04data\x18\x03 \x01(\tR\x04data\x12\x14\n" +
|
||||
"\x05stamp\x18\x04 \x01(\tR\x05stamp\x12\x1a\n" +
|
||||
"\bposition\x18\x05 \x01(\x05R\bposition\"8\n" +
|
||||
"\x0eUsedLogRequest\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x05R\x04page\x12\x12\n" +
|
||||
"\x04size\x18\x02 \x01(\x05R\x04size\"D\n" +
|
||||
"\bResponse\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x10\n" +
|
||||
"\x03msg\x18\x02 \x01(\tR\x03msg\x12\x12\n" +
|
||||
"\x04data\x18\x03 \x01(\tR\x04data2\xb3\x03\n" +
|
||||
"\fPercutaneous\x12o\n" +
|
||||
"\tWifiCheck\x12\x1e.percutaneous.WifiCheckRequest\x1a\x16.percutaneous.Response\"*\x82\xd3\xe4\x93\x02$:\x01*\x12\x1f/api/v3/percutaneous/wifi/check\x12i\n" +
|
||||
"\aWifiSet\x12\x1c.percutaneous.WifiSetRequest\x1a\x16.percutaneous.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\"\x1d/api/v3/percutaneous/wifi/set\x12\\\n" +
|
||||
"\x03Use\x12\x18.percutaneous.UseRequest\x1a\x16.percutaneous.Response\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/api/v3/percutaneous/use\x12i\n" +
|
||||
"\aUsedLog\x12\x1c.percutaneous.UsedLogRequest\x1a\x16.percutaneous.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\x12\x1d/api/v3/percutaneous/used/logB\x10Z\x0e./percutaneousb\x06proto3"
|
||||
|
||||
var (
|
||||
file_percutaneous_percutaneous_proto_rawDescOnce sync.Once
|
||||
file_percutaneous_percutaneous_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_percutaneous_percutaneous_proto_rawDescGZIP() []byte {
|
||||
file_percutaneous_percutaneous_proto_rawDescOnce.Do(func() {
|
||||
file_percutaneous_percutaneous_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_percutaneous_percutaneous_proto_rawDesc), len(file_percutaneous_percutaneous_proto_rawDesc)))
|
||||
})
|
||||
return file_percutaneous_percutaneous_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_percutaneous_percutaneous_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_percutaneous_percutaneous_proto_goTypes = []any{
|
||||
(*WifiCheckRequest)(nil), // 0: percutaneous.WifiCheckRequest
|
||||
(*WifiSetRequest)(nil), // 1: percutaneous.WifiSetRequest
|
||||
(*UseRequest)(nil), // 2: percutaneous.UseRequest
|
||||
(*UsedLogRequest)(nil), // 3: percutaneous.UsedLogRequest
|
||||
(*Response)(nil), // 4: percutaneous.Response
|
||||
}
|
||||
var file_percutaneous_percutaneous_proto_depIdxs = []int32{
|
||||
0, // 0: percutaneous.Percutaneous.WifiCheck:input_type -> percutaneous.WifiCheckRequest
|
||||
1, // 1: percutaneous.Percutaneous.WifiSet:input_type -> percutaneous.WifiSetRequest
|
||||
2, // 2: percutaneous.Percutaneous.Use:input_type -> percutaneous.UseRequest
|
||||
3, // 3: percutaneous.Percutaneous.UsedLog:input_type -> percutaneous.UsedLogRequest
|
||||
4, // 4: percutaneous.Percutaneous.WifiCheck:output_type -> percutaneous.Response
|
||||
4, // 5: percutaneous.Percutaneous.WifiSet:output_type -> percutaneous.Response
|
||||
4, // 6: percutaneous.Percutaneous.Use:output_type -> percutaneous.Response
|
||||
4, // 7: percutaneous.Percutaneous.UsedLog:output_type -> percutaneous.Response
|
||||
4, // [4:8] is the sub-list for method output_type
|
||||
0, // [0:4] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_percutaneous_percutaneous_proto_init() }
|
||||
func file_percutaneous_percutaneous_proto_init() {
|
||||
if File_percutaneous_percutaneous_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_percutaneous_percutaneous_proto_rawDesc), len(file_percutaneous_percutaneous_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_percutaneous_percutaneous_proto_goTypes,
|
||||
DependencyIndexes: file_percutaneous_percutaneous_proto_depIdxs,
|
||||
MessageInfos: file_percutaneous_percutaneous_proto_msgTypes,
|
||||
}.Build()
|
||||
File_percutaneous_percutaneous_proto = out.File
|
||||
file_percutaneous_percutaneous_proto_goTypes = nil
|
||||
file_percutaneous_percutaneous_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v4.25.8
|
||||
// source: percutaneous/percutaneous.proto
|
||||
|
||||
package percutaneous
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Percutaneous_WifiCheck_FullMethodName = "/percutaneous.Percutaneous/WifiCheck"
|
||||
Percutaneous_WifiSet_FullMethodName = "/percutaneous.Percutaneous/WifiSet"
|
||||
Percutaneous_Use_FullMethodName = "/percutaneous.Percutaneous/Use"
|
||||
Percutaneous_UsedLog_FullMethodName = "/percutaneous.Percutaneous/UsedLog"
|
||||
)
|
||||
|
||||
// PercutaneousClient is the client API for Percutaneous service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type PercutaneousClient interface {
|
||||
WifiCheck(ctx context.Context, in *WifiCheckRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
WifiSet(ctx context.Context, in *WifiSetRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
Use(ctx context.Context, in *UseRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
UsedLog(ctx context.Context, in *UsedLogRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
}
|
||||
|
||||
type percutaneousClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPercutaneousClient(cc grpc.ClientConnInterface) PercutaneousClient {
|
||||
return &percutaneousClient{cc}
|
||||
}
|
||||
|
||||
func (c *percutaneousClient) WifiCheck(ctx context.Context, in *WifiCheckRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Percutaneous_WifiCheck_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *percutaneousClient) WifiSet(ctx context.Context, in *WifiSetRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Percutaneous_WifiSet_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *percutaneousClient) Use(ctx context.Context, in *UseRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Percutaneous_Use_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *percutaneousClient) UsedLog(ctx context.Context, in *UsedLogRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Percutaneous_UsedLog_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PercutaneousServer is the server API for Percutaneous service.
|
||||
// All implementations must embed UnimplementedPercutaneousServer
|
||||
// for forward compatibility.
|
||||
type PercutaneousServer interface {
|
||||
WifiCheck(context.Context, *WifiCheckRequest) (*Response, error)
|
||||
WifiSet(context.Context, *WifiSetRequest) (*Response, error)
|
||||
Use(context.Context, *UseRequest) (*Response, error)
|
||||
UsedLog(context.Context, *UsedLogRequest) (*Response, error)
|
||||
mustEmbedUnimplementedPercutaneousServer()
|
||||
}
|
||||
|
||||
// UnimplementedPercutaneousServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedPercutaneousServer struct{}
|
||||
|
||||
func (UnimplementedPercutaneousServer) WifiCheck(context.Context, *WifiCheckRequest) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method WifiCheck not implemented")
|
||||
}
|
||||
func (UnimplementedPercutaneousServer) WifiSet(context.Context, *WifiSetRequest) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method WifiSet not implemented")
|
||||
}
|
||||
func (UnimplementedPercutaneousServer) Use(context.Context, *UseRequest) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Use not implemented")
|
||||
}
|
||||
func (UnimplementedPercutaneousServer) UsedLog(context.Context, *UsedLogRequest) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method UsedLog not implemented")
|
||||
}
|
||||
func (UnimplementedPercutaneousServer) mustEmbedUnimplementedPercutaneousServer() {}
|
||||
func (UnimplementedPercutaneousServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePercutaneousServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PercutaneousServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePercutaneousServer interface {
|
||||
mustEmbedUnimplementedPercutaneousServer()
|
||||
}
|
||||
|
||||
func RegisterPercutaneousServer(s grpc.ServiceRegistrar, srv PercutaneousServer) {
|
||||
// If the following call panics, it indicates UnimplementedPercutaneousServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Percutaneous_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Percutaneous_WifiCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WifiCheckRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PercutaneousServer).WifiCheck(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Percutaneous_WifiCheck_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PercutaneousServer).WifiCheck(ctx, req.(*WifiCheckRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Percutaneous_WifiSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WifiSetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PercutaneousServer).WifiSet(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Percutaneous_WifiSet_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PercutaneousServer).WifiSet(ctx, req.(*WifiSetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Percutaneous_Use_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UseRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PercutaneousServer).Use(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Percutaneous_Use_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PercutaneousServer).Use(ctx, req.(*UseRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Percutaneous_UsedLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UsedLogRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PercutaneousServer).UsedLog(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Percutaneous_UsedLog_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PercutaneousServer).UsedLog(ctx, req.(*UsedLogRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Percutaneous_ServiceDesc is the grpc.ServiceDesc for Percutaneous service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Percutaneous_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "percutaneous.Percutaneous",
|
||||
HandlerType: (*PercutaneousServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "WifiCheck",
|
||||
Handler: _Percutaneous_WifiCheck_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WifiSet",
|
||||
Handler: _Percutaneous_WifiSet_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Use",
|
||||
Handler: _Percutaneous_Use_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UsedLog",
|
||||
Handler: _Percutaneous_UsedLog_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "percutaneous/percutaneous.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user