Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterLogHTTPServer(s *http.Server, srv LogHTTPServer)
- func RegisterLogServer(s grpc.ServiceRegistrar, srv LogServer)
- type DeviceLog
- type Empty
- type GetDeviceLogsReq
- func (*GetDeviceLogsReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetDeviceLogsReq) GetDeviceId() string
- func (x *GetDeviceLogsReq) GetPage() int64
- func (x *GetDeviceLogsReq) GetPageSize() int64
- func (*GetDeviceLogsReq) ProtoMessage()
- func (x *GetDeviceLogsReq) ProtoReflect() protoreflect.Message
- func (x *GetDeviceLogsReq) Reset()
- func (x *GetDeviceLogsReq) String() string
- type LogClient
- type LogHTTPClient
- type LogHTTPClientImpl
- type LogHTTPServer
- type LogServer
- type UnimplementedLogServer
- type UnsafeLogServer
Constants ¶
const ( Log_AddDeviceLog_FullMethodName = "/api.log.Log/AddDeviceLog" Log_GetDeviceLogs_FullMethodName = "/api.log.Log/GetDeviceLogs" )
const OperationLogAddDeviceLog = "/api.log.Log/AddDeviceLog"
const OperationLogGetDeviceLogs = "/api.log.Log/GetDeviceLogs"
Variables ¶
var File_log_user_proto protoreflect.FileDescriptor
var Log_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.log.Log", HandlerType: (*LogServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddDeviceLog", Handler: _Log_AddDeviceLog_Handler, }, { MethodName: "GetDeviceLogs", Handler: _Log_GetDeviceLogs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "log/user.proto", }
Log_ServiceDesc is the grpc.ServiceDesc for Log service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLogHTTPServer ¶
func RegisterLogHTTPServer(s *http.Server, srv LogHTTPServer)
func RegisterLogServer ¶
func RegisterLogServer(s grpc.ServiceRegistrar, srv LogServer)
Types ¶
type DeviceLog ¶
type DeviceLog struct {
DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
Log string `protobuf:"bytes,2,opt,name=log,proto3" json:"log,omitempty"`
// contains filtered or unexported fields
}
func (*DeviceLog) Descriptor
deprecated
func (*DeviceLog) GetDeviceId ¶
func (*DeviceLog) ProtoMessage ¶
func (*DeviceLog) ProtoMessage()
func (*DeviceLog) ProtoReflect ¶
func (x *DeviceLog) ProtoReflect() protoreflect.Message
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 GetDeviceLogsReq ¶
type GetDeviceLogsReq struct {
DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
Page int64 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
PageSize int64 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// contains filtered or unexported fields
}
func (*GetDeviceLogsReq) Descriptor
deprecated
func (*GetDeviceLogsReq) Descriptor() ([]byte, []int)
Deprecated: Use GetDeviceLogsReq.ProtoReflect.Descriptor instead.
func (*GetDeviceLogsReq) GetDeviceId ¶
func (x *GetDeviceLogsReq) GetDeviceId() string
func (*GetDeviceLogsReq) GetPage ¶
func (x *GetDeviceLogsReq) GetPage() int64
func (*GetDeviceLogsReq) GetPageSize ¶
func (x *GetDeviceLogsReq) GetPageSize() int64
func (*GetDeviceLogsReq) ProtoMessage ¶
func (*GetDeviceLogsReq) ProtoMessage()
func (*GetDeviceLogsReq) ProtoReflect ¶
func (x *GetDeviceLogsReq) ProtoReflect() protoreflect.Message
func (*GetDeviceLogsReq) Reset ¶
func (x *GetDeviceLogsReq) Reset()
func (*GetDeviceLogsReq) String ¶
func (x *GetDeviceLogsReq) String() string
type LogClient ¶
type LogClient interface {
AddDeviceLog(ctx context.Context, in *DeviceLog, opts ...grpc.CallOption) (*Empty, error)
GetDeviceLogs(ctx context.Context, in *GetDeviceLogsReq, opts ...grpc.CallOption) (*DeviceLog, error)
}
LogClient is the client API for Log 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 NewLogClient ¶
func NewLogClient(cc grpc.ClientConnInterface) LogClient
type LogHTTPClient ¶
type LogHTTPClient interface {
AddDeviceLog(ctx context.Context, req *DeviceLog, opts ...http.CallOption) (rsp *Empty, err error)
GetDeviceLogs(ctx context.Context, req *GetDeviceLogsReq, opts ...http.CallOption) (rsp *DeviceLog, err error)
}
func NewLogHTTPClient ¶
func NewLogHTTPClient(client *http.Client) LogHTTPClient
type LogHTTPClientImpl ¶
type LogHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*LogHTTPClientImpl) AddDeviceLog ¶
func (c *LogHTTPClientImpl) AddDeviceLog(ctx context.Context, in *DeviceLog, opts ...http.CallOption) (*Empty, error)
func (*LogHTTPClientImpl) GetDeviceLogs ¶
func (c *LogHTTPClientImpl) GetDeviceLogs(ctx context.Context, in *GetDeviceLogsReq, opts ...http.CallOption) (*DeviceLog, error)
type LogHTTPServer ¶
type LogServer ¶
type LogServer interface {
AddDeviceLog(context.Context, *DeviceLog) (*Empty, error)
GetDeviceLogs(context.Context, *GetDeviceLogsReq) (*DeviceLog, error)
// contains filtered or unexported methods
}
LogServer is the server API for Log service. All implementations must embed UnimplementedLogServer for forward compatibility
type UnimplementedLogServer ¶
type UnimplementedLogServer struct {
}
UnimplementedLogServer must be embedded to have forward compatible implementations.
func (UnimplementedLogServer) AddDeviceLog ¶
func (UnimplementedLogServer) GetDeviceLogs ¶
func (UnimplementedLogServer) GetDeviceLogs(context.Context, *GetDeviceLogsReq) (*DeviceLog, error)
type UnsafeLogServer ¶
type UnsafeLogServer interface {
// contains filtered or unexported methods
}
UnsafeLogServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LogServer will result in compilation errors.