log

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Log_AddDeviceLog_FullMethodName  = "/api.log.Log/AddDeviceLog"
	Log_GetDeviceLogs_FullMethodName = "/api.log.Log/GetDeviceLogs"
)
View Source
const OperationLogAddDeviceLog = "/api.log.Log/AddDeviceLog"
View Source
const OperationLogGetDeviceLogs = "/api.log.Log/GetDeviceLogs"

Variables

View Source
var File_log_user_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use DeviceLog.ProtoReflect.Descriptor instead.

func (*DeviceLog) GetDeviceId

func (x *DeviceLog) GetDeviceId() string

func (*DeviceLog) GetLog

func (x *DeviceLog) GetLog() string

func (*DeviceLog) ProtoMessage

func (*DeviceLog) ProtoMessage()

func (*DeviceLog) ProtoReflect

func (x *DeviceLog) ProtoReflect() protoreflect.Message

func (*DeviceLog) Reset

func (x *DeviceLog) Reset()

func (*DeviceLog) String

func (x *DeviceLog) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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 LogHTTPServer interface {
	AddDeviceLog(context.Context, *DeviceLog) (*Empty, error)
	GetDeviceLogs(context.Context, *GetDeviceLogsReq) (*DeviceLog, error)
}

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL