Documentation
¶
Index ¶
- Variables
- func RegisterDeviceSrvServer(s grpc.ServiceRegistrar, srv DeviceSrvServer)
- type Client
- type Device
- func (*Device) Descriptor() ([]byte, []int)deprecated
- func (x *Device) GetAddTime() uint64
- func (x *Device) GetConnectId() string
- func (x *Device) GetDTUid() string
- func (x *Device) GetDeviceName() string
- func (x *Device) GetDeviceToken() string
- func (x *Device) GetDeviceType() int32
- func (x *Device) GetDeviceUUid() string
- func (x *Device) GetIsEnabled() bool
- func (x *Device) GetUid() string
- func (x *Device) GetUsername() string
- func (*Device) ProtoMessage()
- func (x *Device) ProtoReflect() protoreflect.Message
- func (x *Device) Reset()
- func (x *Device) String() string
- type DeviceSrvClient
- type DeviceSrvServer
- type Empty
- type EnableThreadPushDeviceRequest
- func (*EnableThreadPushDeviceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EnableThreadPushDeviceRequest) GetConnId() string
- func (x *EnableThreadPushDeviceRequest) GetUid() string
- func (*EnableThreadPushDeviceRequest) ProtoMessage()
- func (x *EnableThreadPushDeviceRequest) ProtoReflect() protoreflect.Message
- func (x *EnableThreadPushDeviceRequest) Reset()
- func (x *EnableThreadPushDeviceRequest) String() string
- type GetUserAllDevicesReply
- func (*GetUserAllDevicesReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserAllDevicesReply) GetDevices() []*Device
- func (*GetUserAllDevicesReply) ProtoMessage()
- func (x *GetUserAllDevicesReply) ProtoReflect() protoreflect.Message
- func (x *GetUserAllDevicesReply) Reset()
- func (x *GetUserAllDevicesReply) String() string
- type GetUserAllDevicesRequest
- func (*GetUserAllDevicesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserAllDevicesRequest) GetUid() string
- func (*GetUserAllDevicesRequest) ProtoMessage()
- func (x *GetUserAllDevicesRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserAllDevicesRequest) Reset()
- func (x *GetUserAllDevicesRequest) String() string
- type UnimplementedDeviceSrvServer
- func (UnimplementedDeviceSrvServer) AddDevice(context.Context, *Device) (*Empty, error)
- func (UnimplementedDeviceSrvServer) EnableThreadPushDevice(context.Context, *EnableThreadPushDeviceRequest) (*Empty, error)
- func (UnimplementedDeviceSrvServer) GetUserAllDevices(context.Context, *GetUserAllDevicesRequest) (*GetUserAllDevicesReply, error)
- type UnsafeDeviceSrvServer
Constants ¶
This section is empty.
Variables ¶
var DeviceSrv_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dtalk.device.DeviceSrv", HandlerType: (*DeviceSrvServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddDevice", Handler: _DeviceSrv_AddDevice_Handler, }, { MethodName: "EnableThreadPushDevice", Handler: _DeviceSrv_EnableThreadPushDevice_Handler, }, { MethodName: "GetUserAllDevices", Handler: _DeviceSrv_GetUserAllDevices_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api.proto", }
DeviceSrv_ServiceDesc is the grpc.ServiceDesc for DeviceSrv service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDeviceSrvServer ¶
func RegisterDeviceSrvServer(s grpc.ServiceRegistrar, srv DeviceSrvServer)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) EnableThreadPushDevice ¶
func (c *Client) EnableThreadPushDevice(ctx context.Context, in *EnableThreadPushDeviceRequest) error
func (*Client) GetUserAllDevices ¶
func (c *Client) GetUserAllDevices(ctx context.Context, in *GetUserAllDevicesRequest) (*GetUserAllDevicesReply, error)
type Device ¶
type Device struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
ConnectId string `protobuf:"bytes,2,opt,name=connectId,proto3" json:"connectId,omitempty"`
DeviceUUid string `protobuf:"bytes,3,opt,name=deviceUUid,proto3" json:"deviceUUid,omitempty"`
DeviceType int32 `protobuf:"varint,4,opt,name=deviceType,proto3" json:"deviceType,omitempty"`
DeviceName string `protobuf:"bytes,5,opt,name=deviceName,proto3" json:"deviceName,omitempty"`
Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"`
DeviceToken string `protobuf:"bytes,7,opt,name=deviceToken,proto3" json:"deviceToken,omitempty"`
IsEnabled bool `protobuf:"varint,8,opt,name=isEnabled,proto3" json:"isEnabled,omitempty"`
AddTime uint64 `protobuf:"varint,9,opt,name=addTime,proto3" json:"addTime,omitempty"`
DTUid string `protobuf:"bytes,10,opt,name=DTUid,proto3" json:"DTUid,omitempty"`
// contains filtered or unexported fields
}
func (*Device) Descriptor
deprecated
func (*Device) GetAddTime ¶
func (*Device) GetConnectId ¶
func (*Device) GetDeviceName ¶
func (*Device) GetDeviceToken ¶
func (*Device) GetDeviceType ¶
func (*Device) GetDeviceUUid ¶
func (*Device) GetIsEnabled ¶
func (*Device) GetUsername ¶
func (*Device) ProtoMessage ¶
func (*Device) ProtoMessage()
func (*Device) ProtoReflect ¶
func (x *Device) ProtoReflect() protoreflect.Message
type DeviceSrvClient ¶
type DeviceSrvClient interface {
AddDevice(ctx context.Context, in *Device, opts ...grpc.CallOption) (*Empty, error)
EnableThreadPushDevice(ctx context.Context, in *EnableThreadPushDeviceRequest, opts ...grpc.CallOption) (*Empty, error)
GetUserAllDevices(ctx context.Context, in *GetUserAllDevicesRequest, opts ...grpc.CallOption) (*GetUserAllDevicesReply, error)
}
DeviceSrvClient is the client API for DeviceSrv 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.
func NewDeviceSrvClient ¶
func NewDeviceSrvClient(cc grpc.ClientConnInterface) DeviceSrvClient
type DeviceSrvServer ¶
type DeviceSrvServer interface {
AddDevice(context.Context, *Device) (*Empty, error)
EnableThreadPushDevice(context.Context, *EnableThreadPushDeviceRequest) (*Empty, error)
GetUserAllDevices(context.Context, *GetUserAllDevicesRequest) (*GetUserAllDevicesReply, error)
// contains filtered or unexported methods
}
DeviceSrvServer is the server API for DeviceSrv service. All implementations must embed UnimplementedDeviceSrvServer for forward compatibility
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type EnableThreadPushDeviceRequest ¶
type EnableThreadPushDeviceRequest struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
ConnId string `protobuf:"bytes,2,opt,name=connId,proto3" json:"connId,omitempty"`
// contains filtered or unexported fields
}
func (*EnableThreadPushDeviceRequest) Descriptor
deprecated
func (*EnableThreadPushDeviceRequest) Descriptor() ([]byte, []int)
Deprecated: Use EnableThreadPushDeviceRequest.ProtoReflect.Descriptor instead.
func (*EnableThreadPushDeviceRequest) GetConnId ¶
func (x *EnableThreadPushDeviceRequest) GetConnId() string
func (*EnableThreadPushDeviceRequest) GetUid ¶
func (x *EnableThreadPushDeviceRequest) GetUid() string
func (*EnableThreadPushDeviceRequest) ProtoMessage ¶
func (*EnableThreadPushDeviceRequest) ProtoMessage()
func (*EnableThreadPushDeviceRequest) ProtoReflect ¶
func (x *EnableThreadPushDeviceRequest) ProtoReflect() protoreflect.Message
func (*EnableThreadPushDeviceRequest) Reset ¶
func (x *EnableThreadPushDeviceRequest) Reset()
func (*EnableThreadPushDeviceRequest) String ¶
func (x *EnableThreadPushDeviceRequest) String() string
type GetUserAllDevicesReply ¶
type GetUserAllDevicesReply struct {
Devices []*Device `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserAllDevicesReply) Descriptor
deprecated
func (*GetUserAllDevicesReply) Descriptor() ([]byte, []int)
Deprecated: Use GetUserAllDevicesReply.ProtoReflect.Descriptor instead.
func (*GetUserAllDevicesReply) GetDevices ¶
func (x *GetUserAllDevicesReply) GetDevices() []*Device
func (*GetUserAllDevicesReply) ProtoMessage ¶
func (*GetUserAllDevicesReply) ProtoMessage()
func (*GetUserAllDevicesReply) ProtoReflect ¶
func (x *GetUserAllDevicesReply) ProtoReflect() protoreflect.Message
func (*GetUserAllDevicesReply) Reset ¶
func (x *GetUserAllDevicesReply) Reset()
func (*GetUserAllDevicesReply) String ¶
func (x *GetUserAllDevicesReply) String() string
type GetUserAllDevicesRequest ¶
type GetUserAllDevicesRequest struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserAllDevicesRequest) Descriptor
deprecated
func (*GetUserAllDevicesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserAllDevicesRequest.ProtoReflect.Descriptor instead.
func (*GetUserAllDevicesRequest) GetUid ¶
func (x *GetUserAllDevicesRequest) GetUid() string
func (*GetUserAllDevicesRequest) ProtoMessage ¶
func (*GetUserAllDevicesRequest) ProtoMessage()
func (*GetUserAllDevicesRequest) ProtoReflect ¶
func (x *GetUserAllDevicesRequest) ProtoReflect() protoreflect.Message
func (*GetUserAllDevicesRequest) Reset ¶
func (x *GetUserAllDevicesRequest) Reset()
func (*GetUserAllDevicesRequest) String ¶
func (x *GetUserAllDevicesRequest) String() string
type UnimplementedDeviceSrvServer ¶
type UnimplementedDeviceSrvServer struct {
}
UnimplementedDeviceSrvServer must be embedded to have forward compatible implementations.
func (UnimplementedDeviceSrvServer) EnableThreadPushDevice ¶
func (UnimplementedDeviceSrvServer) EnableThreadPushDevice(context.Context, *EnableThreadPushDeviceRequest) (*Empty, error)
func (UnimplementedDeviceSrvServer) GetUserAllDevices ¶
func (UnimplementedDeviceSrvServer) GetUserAllDevices(context.Context, *GetUserAllDevicesRequest) (*GetUserAllDevicesReply, error)
type UnsafeDeviceSrvServer ¶
type UnsafeDeviceSrvServer interface {
// contains filtered or unexported methods
}
UnsafeDeviceSrvServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DeviceSrvServer will result in compilation errors.