logging

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 9 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogType_name = map[int32]string{
		0: "LogTypeNONE",
		1: "LogTypeINFO",
		2: "LogTypeWARNING",
		3: "LogTypeERROR",
		4: "LogTypeDEBUG",
	}
	LogType_value = map[string]int32{
		"LogTypeNONE":    0,
		"LogTypeINFO":    1,
		"LogTypeWARNING": 2,
		"LogTypeERROR":   3,
		"LogTypeDEBUG":   4,
	}
)

Enum value maps for LogType.

View Source
var (
	LogSortField_name = map[int32]string{
		0: "LogSortFieldNONE",
		1: "LogSortFieldId",
		2: "LogSortFieldServiceName",
		3: "LogSortFieldEventDate",
		4: "LogSortFieldCreatedAt",
		5: "LogSortFieldUpdatedAt",
	}
	LogSortField_value = map[string]int32{
		"LogSortFieldNONE":        0,
		"LogSortFieldId":          1,
		"LogSortFieldServiceName": 2,
		"LogSortFieldEventDate":   3,
		"LogSortFieldCreatedAt":   4,
		"LogSortFieldUpdatedAt":   5,
	}
)

Enum value maps for LogSortField.

View Source
var File_logging_proto protoreflect.FileDescriptor
View Source
var LoggingSvc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "LoggingSvc",
	HandlerType: (*LoggingSvcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetLogsByFilter",
			Handler:    _LoggingSvc_GetLogsByFilter_Handler,
		},
		{
			MethodName: "Log",
			Handler:    _LoggingSvc_Log_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "logging.proto",
}

LoggingSvc_ServiceDesc is the grpc.ServiceDesc for LoggingSvc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLoggingSvcServer

func RegisterLoggingSvcServer(s grpc.ServiceRegistrar, srv LoggingSvcServer)

Types

type LogBody

type LogBody struct {
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*LogBody) Descriptor deprecated

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

Deprecated: Use LogBody.ProtoReflect.Descriptor instead.

func (*LogBody) GetMessage

func (x *LogBody) GetMessage() string

func (*LogBody) ProtoMessage

func (*LogBody) ProtoMessage()

func (*LogBody) ProtoReflect

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

func (*LogBody) Reset

func (x *LogBody) Reset()

func (*LogBody) String

func (x *LogBody) String() string

type LogData

type LogData struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Header    *LogHeader             `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"`
	Body      *LogBody               `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,80,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,81,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

func (*LogData) Descriptor deprecated

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

Deprecated: Use LogData.ProtoReflect.Descriptor instead.

func (*LogData) GetBody

func (x *LogData) GetBody() *LogBody

func (*LogData) GetCreatedAt

func (x *LogData) GetCreatedAt() *timestamppb.Timestamp

func (*LogData) GetHeader

func (x *LogData) GetHeader() *LogHeader

func (*LogData) GetId

func (x *LogData) GetId() string

func (*LogData) GetUpdatedAt

func (x *LogData) GetUpdatedAt() *timestamppb.Timestamp

func (*LogData) ProtoMessage

func (*LogData) ProtoMessage()

func (*LogData) ProtoReflect

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

func (*LogData) Reset

func (x *LogData) Reset()

func (*LogData) String

func (x *LogData) String() string

type LogDataFilter

type LogDataFilter struct {
	Id            *string                `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"`
	EventDateFrom *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=eventDateFrom,proto3,oneof" json:"eventDateFrom,omitempty"`
	EventDateTo   *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=eventDateTo,proto3,oneof" json:"eventDateTo,omitempty"`
	LogType       *LogType               `protobuf:"varint,4,opt,name=logType,proto3,enum=LogType,oneof" json:"logType,omitempty"`
	ServiceName   *string                `protobuf:"bytes,5,opt,name=serviceName,proto3,oneof" json:"serviceName,omitempty"`
	Path          *string                `protobuf:"bytes,6,opt,name=path,proto3,oneof" json:"path,omitempty"`
	UserId        *string                `protobuf:"bytes,7,opt,name=userId,proto3,oneof" json:"userId,omitempty"`
	CreatedAtFrom *timestamppb.Timestamp `protobuf:"bytes,80,opt,name=createdAtFrom,proto3,oneof" json:"createdAtFrom,omitempty"`
	CreatedAtTo   *timestamppb.Timestamp `protobuf:"bytes,81,opt,name=createdAtTo,proto3,oneof" json:"createdAtTo,omitempty"`
	UpdatedAtFrom *timestamppb.Timestamp `protobuf:"bytes,82,opt,name=updatedAtFrom,proto3,oneof" json:"updatedAtFrom,omitempty"`
	UpdatedAtTo   *timestamppb.Timestamp `protobuf:"bytes,84,opt,name=updatedAtTo,proto3,oneof" json:"updatedAtTo,omitempty"`
	SearchText    *string                `protobuf:"bytes,95,opt,name=searchText,proto3,oneof" json:"searchText,omitempty"`
	SortType      *string                `protobuf:"bytes,96,opt,name=sortType,proto3,oneof" json:"sortType,omitempty"`
	SortField     *LogSortField          `protobuf:"varint,97,opt,name=sortField,proto3,enum=LogSortField,oneof" json:"sortField,omitempty"`
	Limit         *int32                 `protobuf:"varint,98,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
	Offset        *int32                 `protobuf:"varint,99,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*LogDataFilter) Descriptor deprecated

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

Deprecated: Use LogDataFilter.ProtoReflect.Descriptor instead.

func (*LogDataFilter) GetCreatedAtFrom

func (x *LogDataFilter) GetCreatedAtFrom() *timestamppb.Timestamp

func (*LogDataFilter) GetCreatedAtTo

func (x *LogDataFilter) GetCreatedAtTo() *timestamppb.Timestamp

func (*LogDataFilter) GetEventDateFrom

func (x *LogDataFilter) GetEventDateFrom() *timestamppb.Timestamp

func (*LogDataFilter) GetEventDateTo

func (x *LogDataFilter) GetEventDateTo() *timestamppb.Timestamp

func (*LogDataFilter) GetId

func (x *LogDataFilter) GetId() string

func (*LogDataFilter) GetLimit

func (x *LogDataFilter) GetLimit() int32

func (*LogDataFilter) GetLogType

func (x *LogDataFilter) GetLogType() LogType

func (*LogDataFilter) GetOffset

func (x *LogDataFilter) GetOffset() int32

func (*LogDataFilter) GetPath

func (x *LogDataFilter) GetPath() string

func (*LogDataFilter) GetSearchText

func (x *LogDataFilter) GetSearchText() string

func (*LogDataFilter) GetServiceName

func (x *LogDataFilter) GetServiceName() string

func (*LogDataFilter) GetSortField

func (x *LogDataFilter) GetSortField() LogSortField

func (*LogDataFilter) GetSortType

func (x *LogDataFilter) GetSortType() string

func (*LogDataFilter) GetUpdatedAtFrom

func (x *LogDataFilter) GetUpdatedAtFrom() *timestamppb.Timestamp

func (*LogDataFilter) GetUpdatedAtTo

func (x *LogDataFilter) GetUpdatedAtTo() *timestamppb.Timestamp

func (*LogDataFilter) GetUserId

func (x *LogDataFilter) GetUserId() string

func (*LogDataFilter) ProtoMessage

func (*LogDataFilter) ProtoMessage()

func (*LogDataFilter) ProtoReflect

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

func (*LogDataFilter) Reset

func (x *LogDataFilter) Reset()

func (*LogDataFilter) String

func (x *LogDataFilter) String() string

type LogDatas

type LogDatas struct {
	LogDatas  []*LogData `protobuf:"bytes,1,rep,name=logDatas,proto3" json:"logDatas,omitempty"`
	TotalRows int64      `protobuf:"varint,2,opt,name=totalRows,proto3" json:"totalRows,omitempty"`
	// contains filtered or unexported fields
}

func (*LogDatas) Descriptor deprecated

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

Deprecated: Use LogDatas.ProtoReflect.Descriptor instead.

func (*LogDatas) GetLogDatas

func (x *LogDatas) GetLogDatas() []*LogData

func (*LogDatas) GetTotalRows

func (x *LogDatas) GetTotalRows() int64

func (*LogDatas) ProtoMessage

func (*LogDatas) ProtoMessage()

func (*LogDatas) ProtoReflect

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

func (*LogDatas) Reset

func (x *LogDatas) Reset()

func (*LogDatas) String

func (x *LogDatas) String() string

type LogHeader

type LogHeader struct {
	EventDate   *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=eventDate,proto3" json:"eventDate,omitempty"`
	LogType     LogType                `protobuf:"varint,2,opt,name=logType,proto3,enum=LogType" json:"logType,omitempty"`
	ServiceName string                 `protobuf:"bytes,3,opt,name=serviceName,proto3" json:"serviceName,omitempty"`
	Path        string                 `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	UserId      string                 `protobuf:"bytes,5,opt,name=userId,proto3" json:"userId,omitempty"`
	// contains filtered or unexported fields
}

func (*LogHeader) Descriptor deprecated

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

Deprecated: Use LogHeader.ProtoReflect.Descriptor instead.

func (*LogHeader) GetEventDate

func (x *LogHeader) GetEventDate() *timestamppb.Timestamp

func (*LogHeader) GetLogType

func (x *LogHeader) GetLogType() LogType

func (*LogHeader) GetPath

func (x *LogHeader) GetPath() string

func (*LogHeader) GetServiceName

func (x *LogHeader) GetServiceName() string

func (*LogHeader) GetUserId

func (x *LogHeader) GetUserId() string

func (*LogHeader) ProtoMessage

func (*LogHeader) ProtoMessage()

func (*LogHeader) ProtoReflect

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

func (*LogHeader) Reset

func (x *LogHeader) Reset()

func (*LogHeader) String

func (x *LogHeader) String() string

type LogSortField

type LogSortField int32
const (
	LogSortField_LogSortFieldNONE        LogSortField = 0
	LogSortField_LogSortFieldId          LogSortField = 1
	LogSortField_LogSortFieldServiceName LogSortField = 2
	LogSortField_LogSortFieldEventDate   LogSortField = 3
	LogSortField_LogSortFieldCreatedAt   LogSortField = 4
	LogSortField_LogSortFieldUpdatedAt   LogSortField = 5
)

func (LogSortField) Descriptor

func (LogSortField) Enum

func (x LogSortField) Enum() *LogSortField

func (LogSortField) EnumDescriptor deprecated

func (LogSortField) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogSortField.Descriptor instead.

func (LogSortField) Number

func (LogSortField) String

func (x LogSortField) String() string

func (LogSortField) Type

type LogType

type LogType int32
const (
	LogType_LogTypeNONE    LogType = 0
	LogType_LogTypeINFO    LogType = 1
	LogType_LogTypeWARNING LogType = 2
	LogType_LogTypeERROR   LogType = 3
	LogType_LogTypeDEBUG   LogType = 4
)

func (LogType) Descriptor

func (LogType) Descriptor() protoreflect.EnumDescriptor

func (LogType) Enum

func (x LogType) Enum() *LogType

func (LogType) EnumDescriptor deprecated

func (LogType) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogType.Descriptor instead.

func (LogType) Number

func (x LogType) Number() protoreflect.EnumNumber

func (LogType) String

func (x LogType) String() string

func (LogType) Type

func (LogType) Type() protoreflect.EnumType

type LoggingResult

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

func (*LoggingResult) Descriptor deprecated

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

Deprecated: Use LoggingResult.ProtoReflect.Descriptor instead.

func (*LoggingResult) ProtoMessage

func (*LoggingResult) ProtoMessage()

func (*LoggingResult) ProtoReflect

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

func (*LoggingResult) Reset

func (x *LoggingResult) Reset()

func (*LoggingResult) String

func (x *LoggingResult) String() string

type LoggingSvcClient

type LoggingSvcClient interface {
	GetLogsByFilter(ctx context.Context, in *LogDataFilter, opts ...grpc.CallOption) (*LogDatas, error)
	Log(ctx context.Context, in *LogData, opts ...grpc.CallOption) (*LoggingResult, error)
}

LoggingSvcClient is the client API for LoggingSvc 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 NewLoggingSvcClient

func NewLoggingSvcClient(cc grpc.ClientConnInterface) LoggingSvcClient

type LoggingSvcServer

type LoggingSvcServer interface {
	GetLogsByFilter(context.Context, *LogDataFilter) (*LogDatas, error)
	Log(context.Context, *LogData) (*LoggingResult, error)
	// contains filtered or unexported methods
}

LoggingSvcServer is the server API for LoggingSvc service. All implementations must embed UnimplementedLoggingSvcServer for forward compatibility

type UnimplementedLoggingSvcServer

type UnimplementedLoggingSvcServer struct {
}

UnimplementedLoggingSvcServer must be embedded to have forward compatible implementations.

func (UnimplementedLoggingSvcServer) GetLogsByFilter

func (UnimplementedLoggingSvcServer) Log

type UnsafeLoggingSvcServer

type UnsafeLoggingSvcServer interface {
	// contains filtered or unexported methods
}

UnsafeLoggingSvcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoggingSvcServer will result in compilation errors.

Jump to

Keyboard shortcuts

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