Documentation ¶
Index ¶
- Variables
- func RegisterLogServiceServer(s grpc.ServiceRegistrar, srv LogServiceServer)
- type AddLogReq
- func (*AddLogReq) Descriptor() ([]byte, []int)deprecated
- func (x *AddLogReq) GetContent() []byte
- func (x *AddLogReq) GetLevel() LogLevel
- func (x *AddLogReq) GetServiceName() string
- func (x *AddLogReq) GetTraceId() string
- func (*AddLogReq) ProtoMessage()
- func (x *AddLogReq) ProtoReflect() protoreflect.Message
- func (x *AddLogReq) Reset()
- func (x *AddLogReq) String() string
- type AddLogRes
- type GetLogsReq
- func (*GetLogsReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetLogsReq) GetCreatedFrom() int64
- func (x *GetLogsReq) GetCreatedTo() int64
- func (x *GetLogsReq) GetLevel() LogLevel
- func (x *GetLogsReq) GetPagination() *PaginationReq
- func (x *GetLogsReq) GetServiceName() string
- func (x *GetLogsReq) GetSort() *SortReq
- func (x *GetLogsReq) GetTraceId() string
- func (*GetLogsReq) ProtoMessage()
- func (x *GetLogsReq) ProtoReflect() protoreflect.Message
- func (x *GetLogsReq) Reset()
- func (x *GetLogsReq) String() string
- type GetLogsRes
- func (*GetLogsRes) Descriptor() ([]byte, []int)deprecated
- func (x *GetLogsRes) GetLogs() []*LogInfo
- func (x *GetLogsRes) GetPagination() *PaginationRes
- func (*GetLogsRes) ProtoMessage()
- func (x *GetLogsRes) ProtoReflect() protoreflect.Message
- func (x *GetLogsRes) Reset()
- func (x *GetLogsRes) String() string
- type LogInfo
- func (*LogInfo) Descriptor() ([]byte, []int)deprecated
- func (x *LogInfo) GetContent() []byte
- func (x *LogInfo) GetCreatedAt() string
- func (x *LogInfo) GetId() string
- func (x *LogInfo) GetLevel() string
- func (x *LogInfo) GetServiceName() string
- func (x *LogInfo) GetTraceId() string
- func (*LogInfo) ProtoMessage()
- func (x *LogInfo) ProtoReflect() protoreflect.Message
- func (x *LogInfo) Reset()
- func (x *LogInfo) String() string
- type LogLevel
- type LogServiceClient
- type LogServiceServer
- type PaginationReq
- func (*PaginationReq) Descriptor() ([]byte, []int)deprecated
- func (x *PaginationReq) GetLimit() int64
- func (x *PaginationReq) GetPage() int64
- func (*PaginationReq) ProtoMessage()
- func (x *PaginationReq) ProtoReflect() protoreflect.Message
- func (x *PaginationReq) Reset()
- func (x *PaginationReq) String() string
- type PaginationRes
- func (*PaginationRes) Descriptor() ([]byte, []int)deprecated
- func (x *PaginationRes) GetCurrentPage() int64
- func (x *PaginationRes) GetLimit() int64
- func (x *PaginationRes) GetSkip() int64
- func (x *PaginationRes) GetTotal() int64
- func (x *PaginationRes) GetTotalPage() int64
- func (*PaginationRes) ProtoMessage()
- func (x *PaginationRes) ProtoReflect() protoreflect.Message
- func (x *PaginationRes) Reset()
- func (x *PaginationRes) String() string
- type SortReq
- type UnimplementedLogServiceServer
- type UnsafeLogServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( LogLevel_name = map[int32]string{ 0: "LOG_LEVEL_INVALID", 1: "LOG_LEVEL_DEBUG", 2: "LOG_LEVEL_INFO", 3: "LOG_LEVEL_WARNING", 4: "LOG_LEVEL_ERROR", 5: "LOG_LEVEL_FATAL", } LogLevel_value = map[string]int32{ "LOG_LEVEL_INVALID": 0, "LOG_LEVEL_DEBUG": 1, "LOG_LEVEL_INFO": 2, "LOG_LEVEL_WARNING": 3, "LOG_LEVEL_ERROR": 4, "LOG_LEVEL_FATAL": 5, } )
Enum value maps for LogLevel.
var File_log_base_proto protoreflect.FileDescriptor
var File_log_log_proto protoreflect.FileDescriptor
var LogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "log.LogService", HandlerType: (*LogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddLog", Handler: _LogService_AddLog_Handler, }, { MethodName: "GetLogs", Handler: _LogService_GetLogs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "log/log.proto", }
LogService_ServiceDesc is the grpc.ServiceDesc for LogService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLogServiceServer ¶
func RegisterLogServiceServer(s grpc.ServiceRegistrar, srv LogServiceServer)
Types ¶
type AddLogReq ¶
type AddLogReq struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` Level LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=log.LogLevel" json:"level,omitempty"` Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` TraceId string `protobuf:"bytes,4,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` // contains filtered or unexported fields }
func (*AddLogReq) Descriptor
deprecated
func (*AddLogReq) GetContent ¶
func (*AddLogReq) GetServiceName ¶
func (*AddLogReq) GetTraceId ¶
func (*AddLogReq) ProtoMessage ¶
func (*AddLogReq) ProtoMessage()
func (*AddLogReq) ProtoReflect ¶
func (x *AddLogReq) ProtoReflect() protoreflect.Message
type AddLogRes ¶
type AddLogRes struct { Log *LogInfo `protobuf:"bytes,1,opt,name=log,proto3" json:"log,omitempty"` // contains filtered or unexported fields }
func (*AddLogRes) Descriptor
deprecated
func (*AddLogRes) ProtoMessage ¶
func (*AddLogRes) ProtoMessage()
func (*AddLogRes) ProtoReflect ¶
func (x *AddLogRes) ProtoReflect() protoreflect.Message
type GetLogsReq ¶
type GetLogsReq struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` Level LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=log.LogLevel" json:"level,omitempty"` TraceId string `protobuf:"bytes,3,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` CreatedFrom int64 `protobuf:"varint,4,opt,name=created_from,json=createdFrom,proto3" json:"created_from,omitempty"` CreatedTo int64 `protobuf:"varint,5,opt,name=created_to,json=createdTo,proto3" json:"created_to,omitempty"` Pagination *PaginationReq `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination,omitempty"` Sort *SortReq `protobuf:"bytes,7,opt,name=sort,proto3" json:"sort,omitempty"` // contains filtered or unexported fields }
func (*GetLogsReq) Descriptor
deprecated
func (*GetLogsReq) Descriptor() ([]byte, []int)
Deprecated: Use GetLogsReq.ProtoReflect.Descriptor instead.
func (*GetLogsReq) GetCreatedFrom ¶
func (x *GetLogsReq) GetCreatedFrom() int64
func (*GetLogsReq) GetCreatedTo ¶
func (x *GetLogsReq) GetCreatedTo() int64
func (*GetLogsReq) GetLevel ¶
func (x *GetLogsReq) GetLevel() LogLevel
func (*GetLogsReq) GetPagination ¶
func (x *GetLogsReq) GetPagination() *PaginationReq
func (*GetLogsReq) GetServiceName ¶
func (x *GetLogsReq) GetServiceName() string
func (*GetLogsReq) GetSort ¶
func (x *GetLogsReq) GetSort() *SortReq
func (*GetLogsReq) GetTraceId ¶
func (x *GetLogsReq) GetTraceId() string
func (*GetLogsReq) ProtoMessage ¶
func (*GetLogsReq) ProtoMessage()
func (*GetLogsReq) ProtoReflect ¶
func (x *GetLogsReq) ProtoReflect() protoreflect.Message
func (*GetLogsReq) Reset ¶
func (x *GetLogsReq) Reset()
func (*GetLogsReq) String ¶
func (x *GetLogsReq) String() string
type GetLogsRes ¶
type GetLogsRes struct { Logs []*LogInfo `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` Pagination *PaginationRes `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // contains filtered or unexported fields }
func (*GetLogsRes) Descriptor
deprecated
func (*GetLogsRes) Descriptor() ([]byte, []int)
Deprecated: Use GetLogsRes.ProtoReflect.Descriptor instead.
func (*GetLogsRes) GetLogs ¶
func (x *GetLogsRes) GetLogs() []*LogInfo
func (*GetLogsRes) GetPagination ¶
func (x *GetLogsRes) GetPagination() *PaginationRes
func (*GetLogsRes) ProtoMessage ¶
func (*GetLogsRes) ProtoMessage()
func (*GetLogsRes) ProtoReflect ¶
func (x *GetLogsRes) ProtoReflect() protoreflect.Message
func (*GetLogsRes) Reset ¶
func (x *GetLogsRes) Reset()
func (*GetLogsRes) String ¶
func (x *GetLogsRes) String() string
type LogInfo ¶
type LogInfo struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` Level string `protobuf:"bytes,3,opt,name=level,proto3" json:"level,omitempty"` Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` TraceId string `protobuf:"bytes,5,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` CreatedAt string `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*LogInfo) Descriptor
deprecated
func (*LogInfo) GetContent ¶
func (*LogInfo) GetCreatedAt ¶
func (*LogInfo) GetServiceName ¶
func (*LogInfo) GetTraceId ¶
func (*LogInfo) ProtoMessage ¶
func (*LogInfo) ProtoMessage()
func (*LogInfo) ProtoReflect ¶
func (x *LogInfo) ProtoReflect() protoreflect.Message
type LogLevel ¶
type LogLevel int32
func (LogLevel) Descriptor ¶
func (LogLevel) Descriptor() protoreflect.EnumDescriptor
func (LogLevel) EnumDescriptor
deprecated
func (LogLevel) Number ¶
func (x LogLevel) Number() protoreflect.EnumNumber
func (LogLevel) Type ¶
func (LogLevel) Type() protoreflect.EnumType
type LogServiceClient ¶
type LogServiceClient interface { AddLog(ctx context.Context, in *AddLogReq, opts ...grpc.CallOption) (*AddLogRes, error) GetLogs(ctx context.Context, in *GetLogsReq, opts ...grpc.CallOption) (*GetLogsRes, error) }
LogServiceClient is the client API for LogService 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 NewLogServiceClient ¶
func NewLogServiceClient(cc grpc.ClientConnInterface) LogServiceClient
type LogServiceServer ¶
type LogServiceServer interface { AddLog(context.Context, *AddLogReq) (*AddLogRes, error) GetLogs(context.Context, *GetLogsReq) (*GetLogsRes, error) // contains filtered or unexported methods }
LogServiceServer is the server API for LogService service. All implementations must embed UnimplementedLogServiceServer for forward compatibility
type PaginationReq ¶
type PaginationReq struct { Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*PaginationReq) Descriptor
deprecated
func (*PaginationReq) Descriptor() ([]byte, []int)
Deprecated: Use PaginationReq.ProtoReflect.Descriptor instead.
func (*PaginationReq) GetLimit ¶
func (x *PaginationReq) GetLimit() int64
func (*PaginationReq) GetPage ¶
func (x *PaginationReq) GetPage() int64
func (*PaginationReq) ProtoMessage ¶
func (*PaginationReq) ProtoMessage()
func (*PaginationReq) ProtoReflect ¶
func (x *PaginationReq) ProtoReflect() protoreflect.Message
func (*PaginationReq) Reset ¶
func (x *PaginationReq) Reset()
func (*PaginationReq) String ¶
func (x *PaginationReq) String() string
type PaginationRes ¶
type PaginationRes struct { CurrentPage int64 `protobuf:"varint,1,opt,name=current_page,json=currentPage,proto3" json:"current_page,omitempty"` TotalPage int64 `protobuf:"varint,2,opt,name=total_page,json=totalPage,proto3" json:"total_page,omitempty"` Skip int64 `protobuf:"varint,3,opt,name=skip,proto3" json:"skip,omitempty"` Limit int64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*PaginationRes) Descriptor
deprecated
func (*PaginationRes) Descriptor() ([]byte, []int)
Deprecated: Use PaginationRes.ProtoReflect.Descriptor instead.
func (*PaginationRes) GetCurrentPage ¶
func (x *PaginationRes) GetCurrentPage() int64
func (*PaginationRes) GetLimit ¶
func (x *PaginationRes) GetLimit() int64
func (*PaginationRes) GetSkip ¶
func (x *PaginationRes) GetSkip() int64
func (*PaginationRes) GetTotal ¶
func (x *PaginationRes) GetTotal() int64
func (*PaginationRes) GetTotalPage ¶
func (x *PaginationRes) GetTotalPage() int64
func (*PaginationRes) ProtoMessage ¶
func (*PaginationRes) ProtoMessage()
func (*PaginationRes) ProtoReflect ¶
func (x *PaginationRes) ProtoReflect() protoreflect.Message
func (*PaginationRes) Reset ¶
func (x *PaginationRes) Reset()
func (*PaginationRes) String ¶
func (x *PaginationRes) String() string
type SortReq ¶
type SortReq struct { Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` Desc bool `protobuf:"varint,2,opt,name=desc,proto3" json:"desc,omitempty"` // contains filtered or unexported fields }
func (*SortReq) Descriptor
deprecated
func (*SortReq) ProtoMessage ¶
func (*SortReq) ProtoMessage()
func (*SortReq) ProtoReflect ¶
func (x *SortReq) ProtoReflect() protoreflect.Message
type UnimplementedLogServiceServer ¶
type UnimplementedLogServiceServer struct { }
UnimplementedLogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLogServiceServer) GetLogs ¶
func (UnimplementedLogServiceServer) GetLogs(context.Context, *GetLogsReq) (*GetLogsRes, error)
type UnsafeLogServiceServer ¶
type UnsafeLogServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLogServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LogServiceServer will result in compilation errors.