Skip to content
Snippets Groups Projects
Commit a86999a6 authored by Alex Petraky's avatar Alex Petraky :basketball_player_tone1: Committed by Pavel Antonov
Browse files

feat: Обновлен сервис Logs после изменений в прото-спецификации сервиса

parent b5ccfb84
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,6 @@ import ( ...@@ -4,7 +4,6 @@ import (
"context" "context"
errorsgrpc "git.perx.ru/perxis/perxis-go/pkg/errors/grpc" errorsgrpc "git.perx.ru/perxis/perxis-go/pkg/errors/grpc"
"git.perx.ru/perxis/perxis-go/pkg/options"
pb "git.perx.ru/perxis/perxis-go/proto/logs" pb "git.perx.ru/perxis/perxis-go/proto/logs"
"google.golang.org/grpc" "google.golang.org/grpc"
) )
...@@ -36,15 +35,8 @@ func (c *Client) Log(ctx context.Context, entries []*Entry) error { ...@@ -36,15 +35,8 @@ func (c *Client) Log(ctx context.Context, entries []*Entry) error {
return nil return nil
} }
func (c *Client) Find(ctx context.Context, filter *Filter, opts *options.FindOptions) (*FindResult, error) { func (c *Client) Find(ctx context.Context, filter *Filter, opts *FindOptions) (*FindResult, error) {
request := new(pb.FindRequest) request := FindRequestToPB(&FindRequest{Filter: filter, Options: opts})
if filter != nil {
request.Filter = &pb.Filter{Q: filter.Q}
}
request.Options = options.FindOptionsToPB(opts)
response, err := c.client.Find(ctx, request) response, err := c.client.Find(ctx, request)
if err != nil { if err != nil {
return nil, err return nil, err
......
...@@ -10,7 +10,6 @@ import ( ...@@ -10,7 +10,6 @@ import (
"context" "context"
"git.perx.ru/perxis/perxis-go/logs" "git.perx.ru/perxis/perxis-go/logs"
"git.perx.ru/perxis/perxis-go/pkg/options"
"go.uber.org/zap" "go.uber.org/zap"
) )
...@@ -40,7 +39,7 @@ func (m *errorLoggingMiddleware) Delete(ctx context.Context, filter *logs.Filter ...@@ -40,7 +39,7 @@ func (m *errorLoggingMiddleware) Delete(ctx context.Context, filter *logs.Filter
return m.next.Delete(ctx, filter) return m.next.Delete(ctx, filter)
} }
func (m *errorLoggingMiddleware) Find(ctx context.Context, filter *logs.Filter, options *options.FindOptions) (fp1 *logs.FindResult, err error) { func (m *errorLoggingMiddleware) Find(ctx context.Context, filter *logs.Filter, options *logs.FindOptions) (fp1 *logs.FindResult, err error) {
logger := m.logger logger := m.logger
defer func() { defer func() {
if err != nil { if err != nil {
......
...@@ -12,7 +12,6 @@ import ( ...@@ -12,7 +12,6 @@ import (
"git.perx.ru/perxis/perxis-go/logs" "git.perx.ru/perxis/perxis-go/logs"
"git.perx.ru/perxis/perxis-go/pkg/auth" "git.perx.ru/perxis/perxis-go/pkg/auth"
"git.perx.ru/perxis/perxis-go/pkg/options"
"go.uber.org/zap" "go.uber.org/zap"
) )
...@@ -50,7 +49,7 @@ func (m *accessLoggingMiddleware) Delete(ctx context.Context, filter *logs.Filte ...@@ -50,7 +49,7 @@ func (m *accessLoggingMiddleware) Delete(ctx context.Context, filter *logs.Filte
return err return err
} }
func (m *accessLoggingMiddleware) Find(ctx context.Context, filter *logs.Filter, options *options.FindOptions) (fp1 *logs.FindResult, err error) { func (m *accessLoggingMiddleware) Find(ctx context.Context, filter *logs.Filter, options *logs.FindOptions) (fp1 *logs.FindResult, err error) {
begin := time.Now() begin := time.Now()
m.logger.Debug("Find.Request", m.logger.Debug("Find.Request",
......
...@@ -11,7 +11,6 @@ import ( ...@@ -11,7 +11,6 @@ import (
"fmt" "fmt"
"git.perx.ru/perxis/perxis-go/logs" "git.perx.ru/perxis/perxis-go/logs"
"git.perx.ru/perxis/perxis-go/pkg/options"
"go.uber.org/zap" "go.uber.org/zap"
) )
...@@ -43,7 +42,7 @@ func (m *recoveringMiddleware) Delete(ctx context.Context, filter *logs.Filter) ...@@ -43,7 +42,7 @@ func (m *recoveringMiddleware) Delete(ctx context.Context, filter *logs.Filter)
return m.next.Delete(ctx, filter) return m.next.Delete(ctx, filter)
} }
func (m *recoveringMiddleware) Find(ctx context.Context, filter *logs.Filter, options *options.FindOptions) (fp1 *logs.FindResult, err error) { func (m *recoveringMiddleware) Find(ctx context.Context, filter *logs.Filter, options *logs.FindOptions) (fp1 *logs.FindResult, err error) {
logger := m.logger logger := m.logger
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
......
...@@ -13,7 +13,6 @@ import ( ...@@ -13,7 +13,6 @@ import (
pkgId "git.perx.ru/perxis/perxis-go/id" pkgId "git.perx.ru/perxis/perxis-go/id"
"git.perx.ru/perxis/perxis-go/logs" "git.perx.ru/perxis/perxis-go/logs"
"git.perx.ru/perxis/perxis-go/pkg/auth" "git.perx.ru/perxis/perxis-go/pkg/auth"
"git.perx.ru/perxis/perxis-go/pkg/options"
"git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics" "git.perx.ru/perxis/perxis-go/pkg/telemetry/metrics"
"go.opentelemetry.io/otel" "go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/attribute"
...@@ -93,7 +92,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, filter *logs.Filter) ( ...@@ -93,7 +92,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, filter *logs.Filter) (
} }
// Find implements logs.Service // Find implements logs.Service
func (_d telemetryMiddleware) Find(ctx context.Context, filter *logs.Filter, options *options.FindOptions) (fp1 *logs.FindResult, err error) { func (_d telemetryMiddleware) Find(ctx context.Context, filter *logs.Filter, options *logs.FindOptions) (fp1 *logs.FindResult, err error) {
var att = []attribute.KeyValue{ var att = []attribute.KeyValue{
attribute.String("service", "Service"), attribute.String("service", "Service"),
attribute.String("method", "Find"), attribute.String("method", "Find"),
......
// Code generated by mockery v2.40.1. DO NOT EDIT. // Code generated by mockery v2.46.3. DO NOT EDIT.
package mocks package mocks
...@@ -7,8 +7,6 @@ import ( ...@@ -7,8 +7,6 @@ import (
logs "git.perx.ru/perxis/perxis-go/logs" logs "git.perx.ru/perxis/perxis-go/logs"
mock "github.com/stretchr/testify/mock" mock "github.com/stretchr/testify/mock"
options "git.perx.ru/perxis/perxis-go/pkg/options"
) )
// Service is an autogenerated mock type for the Service type // Service is an autogenerated mock type for the Service type
...@@ -34,9 +32,9 @@ func (_m *Service) Delete(ctx context.Context, filter *logs.Filter) error { ...@@ -34,9 +32,9 @@ func (_m *Service) Delete(ctx context.Context, filter *logs.Filter) error {
return r0 return r0
} }
// Find provides a mock function with given fields: ctx, filter, _a2 // Find provides a mock function with given fields: ctx, filter, options
func (_m *Service) Find(ctx context.Context, filter *logs.Filter, _a2 *options.FindOptions) (*logs.FindResult, error) { func (_m *Service) Find(ctx context.Context, filter *logs.Filter, options *logs.FindOptions) (*logs.FindResult, error) {
ret := _m.Called(ctx, filter, _a2) ret := _m.Called(ctx, filter, options)
if len(ret) == 0 { if len(ret) == 0 {
panic("no return value specified for Find") panic("no return value specified for Find")
...@@ -44,19 +42,19 @@ func (_m *Service) Find(ctx context.Context, filter *logs.Filter, _a2 *options.F ...@@ -44,19 +42,19 @@ func (_m *Service) Find(ctx context.Context, filter *logs.Filter, _a2 *options.F
var r0 *logs.FindResult var r0 *logs.FindResult
var r1 error var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *options.FindOptions) (*logs.FindResult, error)); ok { if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) (*logs.FindResult, error)); ok {
return rf(ctx, filter, _a2) return rf(ctx, filter, options)
} }
if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *options.FindOptions) *logs.FindResult); ok { if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) *logs.FindResult); ok {
r0 = rf(ctx, filter, _a2) r0 = rf(ctx, filter, options)
} else { } else {
if ret.Get(0) != nil { if ret.Get(0) != nil {
r0 = ret.Get(0).(*logs.FindResult) r0 = ret.Get(0).(*logs.FindResult)
} }
} }
if rf, ok := ret.Get(1).(func(context.Context, *logs.Filter, *options.FindOptions) error); ok { if rf, ok := ret.Get(1).(func(context.Context, *logs.Filter, *logs.FindOptions) error); ok {
r1 = rf(ctx, filter, _a2) r1 = rf(ctx, filter, options)
} else { } else {
r1 = ret.Error(1) r1 = ret.Error(1)
} }
......
// Code generated by mockery v2.40.1. DO NOT EDIT. // Code generated by mockery v2.46.3. DO NOT EDIT.
package mocks package mocks
...@@ -7,8 +7,6 @@ import ( ...@@ -7,8 +7,6 @@ import (
logs "git.perx.ru/perxis/perxis-go/logs" logs "git.perx.ru/perxis/perxis-go/logs"
mock "github.com/stretchr/testify/mock" mock "github.com/stretchr/testify/mock"
options "git.perx.ru/perxis/perxis-go/pkg/options"
) )
// Storage is an autogenerated mock type for the Storage type // Storage is an autogenerated mock type for the Storage type
...@@ -34,41 +32,34 @@ func (_m *Storage) Delete(ctx context.Context, filter *logs.Filter) error { ...@@ -34,41 +32,34 @@ func (_m *Storage) Delete(ctx context.Context, filter *logs.Filter) error {
return r0 return r0
} }
// Find provides a mock function with given fields: ctx, filter, _a2 // Find provides a mock function with given fields: ctx, filter, options
func (_m *Storage) Find(ctx context.Context, filter *logs.Filter, _a2 *options.FindOptions) ([]*logs.Entry, int, error) { func (_m *Storage) Find(ctx context.Context, filter *logs.Filter, options *logs.FindOptions) ([]*logs.Entry, error) {
ret := _m.Called(ctx, filter, _a2) ret := _m.Called(ctx, filter, options)
if len(ret) == 0 { if len(ret) == 0 {
panic("no return value specified for Find") panic("no return value specified for Find")
} }
var r0 []*logs.Entry var r0 []*logs.Entry
var r1 int var r1 error
var r2 error if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) ([]*logs.Entry, error)); ok {
if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *options.FindOptions) ([]*logs.Entry, int, error)); ok { return rf(ctx, filter, options)
return rf(ctx, filter, _a2)
} }
if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *options.FindOptions) []*logs.Entry); ok { if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) []*logs.Entry); ok {
r0 = rf(ctx, filter, _a2) r0 = rf(ctx, filter, options)
} else { } else {
if ret.Get(0) != nil { if ret.Get(0) != nil {
r0 = ret.Get(0).([]*logs.Entry) r0 = ret.Get(0).([]*logs.Entry)
} }
} }
if rf, ok := ret.Get(1).(func(context.Context, *logs.Filter, *options.FindOptions) int); ok { if rf, ok := ret.Get(1).(func(context.Context, *logs.Filter, *logs.FindOptions) error); ok {
r1 = rf(ctx, filter, _a2) r1 = rf(ctx, filter, options)
} else {
r1 = ret.Get(1).(int)
}
if rf, ok := ret.Get(2).(func(context.Context, *logs.Filter, *options.FindOptions) error); ok {
r2 = rf(ctx, filter, _a2)
} else { } else {
r2 = ret.Error(2) r1 = ret.Error(1)
} }
return r0, r1, r2 return r0, r1
} }
// Init provides a mock function with given fields: ctx // Init provides a mock function with given fields: ctx
......
...@@ -2,10 +2,12 @@ package logs ...@@ -2,10 +2,12 @@ package logs
import ( import (
"context" "context"
"time"
itemstransportgrpc "git.perx.ru/perxis/perxis-go/pkg/items/transport/grpc" itemstransportgrpc "git.perx.ru/perxis/perxis-go/pkg/items/transport/grpc"
"git.perx.ru/perxis/perxis-go/pkg/options" "git.perx.ru/perxis/perxis-go/pkg/options"
pb "git.perx.ru/perxis/perxis-go/proto/logs" pb "git.perx.ru/perxis/perxis-go/proto/logs"
"google.golang.org/protobuf/types/known/timestamppb"
) )
const ServiceName = "logs" const ServiceName = "logs"
...@@ -16,7 +18,7 @@ type Service interface { ...@@ -16,7 +18,7 @@ type Service interface {
Log(ctx context.Context, entries []*Entry) error Log(ctx context.Context, entries []*Entry) error
// Find метод для поиска логов по заданным параметрам // Find метод для поиска логов по заданным параметрам
Find(ctx context.Context, filter *Filter, options *options.FindOptions) (*FindResult, error) Find(ctx context.Context, filter *Filter, options *FindOptions) (*FindResult, error)
// Delete метод для удаления логов по заданным параметрам // Delete метод для удаления логов по заданным параметрам
Delete(ctx context.Context, filter *Filter) error Delete(ctx context.Context, filter *Filter) error
...@@ -26,18 +28,43 @@ type Filter struct { ...@@ -26,18 +28,43 @@ type Filter struct {
Q []string Q []string
} }
type FindRequest struct {
Filter *Filter
Options *FindOptions
}
type FindResult struct { type FindResult struct {
// Найденные записи лога
Entries []*Entry Entries []*Entry
// Использовавшийся для поиска фильтр
Filter *Filter Filter *Filter
// Использовавшиеся для поиска опции
Options *options.FindOptions Options *options.FindOptions
Total uint32 // Запрос для получения следующей страницы
Next *FindRequest
// Запрос для получения предыдущей страницы
Prev *FindRequest
} }
func FindResultToPB(result *FindResult) *pb.FindResult { type FindOptions struct {
findResult := &pb.FindResult{ // Сортировка результатов
Total: result.Total, Sort []string
// Включить поля в результаты
Fields []string
// Исключить поля из результатов
ExcludeFields bool
// Ограничение количества результатов
Limit int
// Ограничение результатов по времени начиная с этим временем (pagination)
From time.Time
// Ограничение результатов по времени заканчивая этим временем (pagination)
To time.Time
} }
// FindResultToPB перевод в proto представление FindResult
func FindResultToPB(result *FindResult) *pb.FindResult {
findResult := &pb.FindResult{Total: 0} // поле стало deprecated всегда возвращаем 0
entries := make([]*pb.LogEntry, 0, len(result.Entries)) entries := make([]*pb.LogEntry, 0, len(result.Entries))
for _, e := range result.Entries { for _, e := range result.Entries {
entries = append(entries, EntryToPB(e)) entries = append(entries, EntryToPB(e))
...@@ -51,13 +78,20 @@ func FindResultToPB(result *FindResult) *pb.FindResult { ...@@ -51,13 +78,20 @@ func FindResultToPB(result *FindResult) *pb.FindResult {
findResult.Options, _ = itemstransportgrpc.PtrServicesFindOptionsToProto(result.Options) findResult.Options, _ = itemstransportgrpc.PtrServicesFindOptionsToProto(result.Options)
} }
if result.Next != nil {
findResult.Next = FindRequestToPB(result.Next)
}
if result.Prev != nil {
findResult.Prev = FindRequestToPB(result.Prev)
}
return findResult return findResult
} }
// FindResultFromPB перевод из proto представления FindResult
func FindResultFromPB(result *pb.FindResult) *FindResult { func FindResultFromPB(result *pb.FindResult) *FindResult {
findResult := &FindResult{ findResult := new(FindResult)
Total: result.Total,
}
entries := make([]*Entry, 0, len(result.Entries)) entries := make([]*Entry, 0, len(result.Entries))
for _, e := range result.Entries { for _, e := range result.Entries {
...@@ -72,5 +106,80 @@ func FindResultFromPB(result *pb.FindResult) *FindResult { ...@@ -72,5 +106,80 @@ func FindResultFromPB(result *pb.FindResult) *FindResult {
findResult.Options, _ = itemstransportgrpc.ProtoToPtrServicesFindOptions(result.Options) findResult.Options, _ = itemstransportgrpc.ProtoToPtrServicesFindOptions(result.Options)
} }
if result.Next != nil {
findResult.Next = FindRequestFromPB(result.Next)
}
if result.Prev != nil {
findResult.Prev = FindRequestFromPB(result.Prev)
}
return findResult return findResult
} }
// FindRequestToPB перевод в proto представление FindRequest
func FindRequestToPB(request *FindRequest) *pb.FindRequest {
if request == nil {
return nil
}
req := new(pb.FindRequest)
if request.Filter != nil {
req.Filter = &pb.Filter{Q: request.Filter.Q}
}
if request.Options != nil {
req.Options = FindOptionsToPB(request.Options)
}
return req
}
// FindRequestFromPB перевод из proto представления FindRequest
func FindRequestFromPB(request *pb.FindRequest) *FindRequest {
if request == nil {
return nil
}
req := new(FindRequest)
if request.Filter != nil {
req.Filter = &Filter{Q: request.Filter.Q}
}
if request.Options != nil {
req.Options = FindOptionsFromPB(request.Options)
}
return req
}
// FindOptionsToPB перевод в proto представление FindOptions
func FindOptionsToPB(result *FindOptions) *pb.FindOptions {
if result == nil {
return nil
}
return &pb.FindOptions{
Sort: result.Sort,
Fields: result.Fields,
ExcludeFields: result.ExcludeFields,
Limit: int32(result.Limit),
From: timestamppb.New(result.From),
To: timestamppb.New(result.To),
}
}
// FindOptionsFromPB перевод из proto представления FindOptions
func FindOptionsFromPB(result *pb.FindOptions) *FindOptions {
if result == nil {
return nil
}
return &FindOptions{
Sort: result.Sort,
Fields: result.Fields,
ExcludeFields: result.ExcludeFields,
Limit: int(result.Limit),
From: result.From.AsTime(),
To: result.To.AsTime(),
}
}
...@@ -2,14 +2,12 @@ package logs ...@@ -2,14 +2,12 @@ package logs
import ( import (
"context" "context"
"git.perx.ru/perxis/perxis-go/pkg/options"
) )
type Storage interface { type Storage interface {
Init(ctx context.Context) error Init(ctx context.Context) error
Reset(ctx context.Context) error Reset(ctx context.Context) error
Log(ctx context.Context, entry []*Entry) error Log(ctx context.Context, entry []*Entry) error
Find(ctx context.Context, filter *Filter, options *options.FindOptions) ([]*Entry, int, error) Find(ctx context.Context, filter *Filter, options *FindOptions) ([]*Entry, error)
Delete(ctx context.Context, filter *Filter) error Delete(ctx context.Context, filter *Filter) error
} }
Subproject commit 806e7b2bd397ed2f3f980a73b4ac7b5a9c47b492 Subproject commit 2b68dc129457f993c2d55aac9322fda9d582fbf4
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
common "git.perx.ru/perxis/perxis-go/proto/common" common "git.perx.ru/perxis/perxis-go/proto/common"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/known/timestamppb" timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect" reflect "reflect"
sync "sync" sync "sync"
) )
...@@ -167,21 +167,113 @@ func (x *Filter) GetQ() []string { ...@@ -167,21 +167,113 @@ func (x *Filter) GetQ() []string {
return nil return nil
} }
// Опции поиска по логам
type FindOptions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Сортировка результатов
Sort []string `protobuf:"bytes,1,rep,name=sort,proto3" json:"sort,omitempty"`
// Включить поля в результаты
Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
// Исключить поля из результатов
ExcludeFields bool `protobuf:"varint,3,opt,name=exclude_fields,json=excludeFields,proto3" json:"exclude_fields,omitempty"`
// Ограничение количества результатов
Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
// Ограничение результатов по времени начиная с этим временем (pagination)
From *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=from,proto3" json:"from,omitempty"`
// Ограничение результатов по времени заканчивая этим временем (pagination)
To *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"`
}
func (x *FindOptions) Reset() {
*x = FindOptions{}
mi := &file_logs_log_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FindOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindOptions) ProtoMessage() {}
func (x *FindOptions) ProtoReflect() protoreflect.Message {
mi := &file_logs_log_service_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindOptions.ProtoReflect.Descriptor instead.
func (*FindOptions) Descriptor() ([]byte, []int) {
return file_logs_log_service_proto_rawDescGZIP(), []int{3}
}
func (x *FindOptions) GetSort() []string {
if x != nil {
return x.Sort
}
return nil
}
func (x *FindOptions) GetFields() []string {
if x != nil {
return x.Fields
}
return nil
}
func (x *FindOptions) GetExcludeFields() bool {
if x != nil {
return x.ExcludeFields
}
return false
}
func (x *FindOptions) GetLimit() int32 {
if x != nil {
return x.Limit
}
return 0
}
func (x *FindOptions) GetFrom() *timestamppb.Timestamp {
if x != nil {
return x.From
}
return nil
}
func (x *FindOptions) GetTo() *timestamppb.Timestamp {
if x != nil {
return x.To
}
return nil
}
// Запрос на поиск логов // Запрос на поиск логов
type FindRequest struct { type FindRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// Фильтры для поиска // Фильтр для поиска
Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// Опции поиска // Опции поиска
Options *common.FindOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` Options *FindOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
} }
func (x *FindRequest) Reset() { func (x *FindRequest) Reset() {
*x = FindRequest{} *x = FindRequest{}
mi := &file_logs_log_service_proto_msgTypes[3] mi := &file_logs_log_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -193,7 +285,7 @@ func (x *FindRequest) String() string { ...@@ -193,7 +285,7 @@ func (x *FindRequest) String() string {
func (*FindRequest) ProtoMessage() {} func (*FindRequest) ProtoMessage() {}
func (x *FindRequest) ProtoReflect() protoreflect.Message { func (x *FindRequest) ProtoReflect() protoreflect.Message {
mi := &file_logs_log_service_proto_msgTypes[3] mi := &file_logs_log_service_proto_msgTypes[4]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -206,7 +298,7 @@ func (x *FindRequest) ProtoReflect() protoreflect.Message { ...@@ -206,7 +298,7 @@ func (x *FindRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use FindRequest.ProtoReflect.Descriptor instead. // Deprecated: Use FindRequest.ProtoReflect.Descriptor instead.
func (*FindRequest) Descriptor() ([]byte, []int) { func (*FindRequest) Descriptor() ([]byte, []int) {
return file_logs_log_service_proto_rawDescGZIP(), []int{3} return file_logs_log_service_proto_rawDescGZIP(), []int{4}
} }
func (x *FindRequest) GetFilter() *Filter { func (x *FindRequest) GetFilter() *Filter {
...@@ -216,7 +308,7 @@ func (x *FindRequest) GetFilter() *Filter { ...@@ -216,7 +308,7 @@ func (x *FindRequest) GetFilter() *Filter {
return nil return nil
} }
func (x *FindRequest) GetOptions() *common.FindOptions { func (x *FindRequest) GetOptions() *FindOptions {
if x != nil { if x != nil {
return x.Options return x.Options
} }
...@@ -237,12 +329,16 @@ type FindResult struct { ...@@ -237,12 +329,16 @@ type FindResult struct {
// Использовавшиеся для поиска опции // Использовавшиеся для поиска опции
Options *common.FindOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` Options *common.FindOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
// Общее количество найденных записей // Общее количество найденных записей
Total uint32 `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"` Total uint32 `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"` // DEPRECATED
// Запрос для получения следующей страницы
Next *FindRequest `protobuf:"bytes,5,opt,name=next,proto3" json:"next,omitempty"`
// Запрос для получения предыдущей страницы
Prev *FindRequest `protobuf:"bytes,6,opt,name=prev,proto3" json:"prev,omitempty"`
} }
func (x *FindResult) Reset() { func (x *FindResult) Reset() {
*x = FindResult{} *x = FindResult{}
mi := &file_logs_log_service_proto_msgTypes[4] mi := &file_logs_log_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -254,7 +350,7 @@ func (x *FindResult) String() string { ...@@ -254,7 +350,7 @@ func (x *FindResult) String() string {
func (*FindResult) ProtoMessage() {} func (*FindResult) ProtoMessage() {}
func (x *FindResult) ProtoReflect() protoreflect.Message { func (x *FindResult) ProtoReflect() protoreflect.Message {
mi := &file_logs_log_service_proto_msgTypes[4] mi := &file_logs_log_service_proto_msgTypes[5]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -267,7 +363,7 @@ func (x *FindResult) ProtoReflect() protoreflect.Message { ...@@ -267,7 +363,7 @@ func (x *FindResult) ProtoReflect() protoreflect.Message {
// Deprecated: Use FindResult.ProtoReflect.Descriptor instead. // Deprecated: Use FindResult.ProtoReflect.Descriptor instead.
func (*FindResult) Descriptor() ([]byte, []int) { func (*FindResult) Descriptor() ([]byte, []int) {
return file_logs_log_service_proto_rawDescGZIP(), []int{4} return file_logs_log_service_proto_rawDescGZIP(), []int{5}
} }
func (x *FindResult) GetEntries() []*LogEntry { func (x *FindResult) GetEntries() []*LogEntry {
...@@ -298,6 +394,20 @@ func (x *FindResult) GetTotal() uint32 { ...@@ -298,6 +394,20 @@ func (x *FindResult) GetTotal() uint32 {
return 0 return 0
} }
func (x *FindResult) GetNext() *FindRequest {
if x != nil {
return x.Next
}
return nil
}
func (x *FindResult) GetPrev() *FindRequest {
if x != nil {
return x.Prev
}
return nil
}
// Ответ сервера на запрос поиска // Ответ сервера на запрос поиска
type FindResponse struct { type FindResponse struct {
state protoimpl.MessageState state protoimpl.MessageState
...@@ -313,7 +423,7 @@ type FindResponse struct { ...@@ -313,7 +423,7 @@ type FindResponse struct {
func (x *FindResponse) Reset() { func (x *FindResponse) Reset() {
*x = FindResponse{} *x = FindResponse{}
mi := &file_logs_log_service_proto_msgTypes[5] mi := &file_logs_log_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -325,7 +435,7 @@ func (x *FindResponse) String() string { ...@@ -325,7 +435,7 @@ func (x *FindResponse) String() string {
func (*FindResponse) ProtoMessage() {} func (*FindResponse) ProtoMessage() {}
func (x *FindResponse) ProtoReflect() protoreflect.Message { func (x *FindResponse) ProtoReflect() protoreflect.Message {
mi := &file_logs_log_service_proto_msgTypes[5] mi := &file_logs_log_service_proto_msgTypes[6]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -338,7 +448,7 @@ func (x *FindResponse) ProtoReflect() protoreflect.Message { ...@@ -338,7 +448,7 @@ func (x *FindResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use FindResponse.ProtoReflect.Descriptor instead. // Deprecated: Use FindResponse.ProtoReflect.Descriptor instead.
func (*FindResponse) Descriptor() ([]byte, []int) { func (*FindResponse) Descriptor() ([]byte, []int) {
return file_logs_log_service_proto_rawDescGZIP(), []int{5} return file_logs_log_service_proto_rawDescGZIP(), []int{6}
} }
func (m *FindResponse) GetResponse() isFindResponse_Response { func (m *FindResponse) GetResponse() isFindResponse_Response {
...@@ -392,7 +502,7 @@ type DeleteRequest struct { ...@@ -392,7 +502,7 @@ type DeleteRequest struct {
func (x *DeleteRequest) Reset() { func (x *DeleteRequest) Reset() {
*x = DeleteRequest{} *x = DeleteRequest{}
mi := &file_logs_log_service_proto_msgTypes[6] mi := &file_logs_log_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -404,7 +514,7 @@ func (x *DeleteRequest) String() string { ...@@ -404,7 +514,7 @@ func (x *DeleteRequest) String() string {
func (*DeleteRequest) ProtoMessage() {} func (*DeleteRequest) ProtoMessage() {}
func (x *DeleteRequest) ProtoReflect() protoreflect.Message { func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
mi := &file_logs_log_service_proto_msgTypes[6] mi := &file_logs_log_service_proto_msgTypes[7]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -417,7 +527,7 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message { ...@@ -417,7 +527,7 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. // Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) Descriptor() ([]byte, []int) { func (*DeleteRequest) Descriptor() ([]byte, []int) {
return file_logs_log_service_proto_rawDescGZIP(), []int{6} return file_logs_log_service_proto_rawDescGZIP(), []int{7}
} }
func (x *DeleteRequest) GetFilter() *Filter { func (x *DeleteRequest) GetFilter() *Filter {
...@@ -439,7 +549,7 @@ type DeleteResponse struct { ...@@ -439,7 +549,7 @@ type DeleteResponse struct {
func (x *DeleteResponse) Reset() { func (x *DeleteResponse) Reset() {
*x = DeleteResponse{} *x = DeleteResponse{}
mi := &file_logs_log_service_proto_msgTypes[7] mi := &file_logs_log_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
...@@ -451,7 +561,7 @@ func (x *DeleteResponse) String() string { ...@@ -451,7 +561,7 @@ func (x *DeleteResponse) String() string {
func (*DeleteResponse) ProtoMessage() {} func (*DeleteResponse) ProtoMessage() {}
func (x *DeleteResponse) ProtoReflect() protoreflect.Message { func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
mi := &file_logs_log_service_proto_msgTypes[7] mi := &file_logs_log_service_proto_msgTypes[8]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
...@@ -464,7 +574,7 @@ func (x *DeleteResponse) ProtoReflect() protoreflect.Message { ...@@ -464,7 +574,7 @@ func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. // Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) Descriptor() ([]byte, []int) { func (*DeleteResponse) Descriptor() ([]byte, []int) {
return file_logs_log_service_proto_rawDescGZIP(), []int{7} return file_logs_log_service_proto_rawDescGZIP(), []int{8}
} }
func (x *DeleteResponse) GetError() *common.Error { func (x *DeleteResponse) GetError() *common.Error {
...@@ -492,51 +602,69 @@ var file_logs_log_service_proto_rawDesc = []byte{ ...@@ -492,51 +602,69 @@ var file_logs_log_service_proto_rawDesc = []byte{
0x23, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x23, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x22, 0x16, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x0c, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x16, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x0c,
0x0a, 0x01, 0x71, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x01, 0x71, 0x22, 0x62, 0x0a, 0x0b, 0x0a, 0x01, 0x71, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x01, 0x71, 0x22, 0xd2, 0x01, 0x0a,
0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04,
0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74,
0x67, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
0x72, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x75, 0x64, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12,
0x22, 0xa1, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x28, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20,
0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28,
0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74,
0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x70, 0x6f, 0x22, 0x60, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06,
0x6f, 0x74, 0x61, 0x6c, 0x22, 0x6d, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69,
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x6f, 0x6e, 0x73, 0x22, 0xef, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75,
0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6c, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20,
0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e,
0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x06,
0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c,
0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20,
0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x0e, 0x44, 0x65, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x6e,
0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d,
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x25, 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18,
0x72, 0x32, 0xa3, 0x01, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6e,
0x65, 0x12, 0x2c, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x12, 0x25,
0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x0a, 0x04, 0x70, 0x72, 0x65, 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c,
0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52,
0x2f, 0x0a, 0x04, 0x46, 0x69, 0x6e, 0x64, 0x12, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x04, 0x70, 0x72, 0x65, 0x76, 0x22, 0x6d, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73,
0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6f, 0x67, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
0x73, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6e,
0x12, 0x35, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x6c, 0x6f, 0x67, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c,
0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x74, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x14, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x2e, 0x70, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70,
0x65, 0x72, 0x78, 0x2e, 0x72, 0x75, 0x2f, 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2f, 0x70, 0x65, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
0x72, 0x78, 0x69, 0x73, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6c, 0x6f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18,
0x67, 0x73, 0x3b, 0x6c, 0x6f, 0x67, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6c,
0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x0e, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a,
0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72,
0x6f, 0x72, 0x32, 0xa3, 0x01, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x2c, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x73,
0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6c, 0x6f,
0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x2f, 0x0a, 0x04, 0x46, 0x69, 0x6e, 0x64, 0x12, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6f,
0x67, 0x73, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x12, 0x35, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x6c, 0x6f,
0x67, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x14, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x2e,
0x70, 0x65, 0x72, 0x78, 0x2e, 0x72, 0x75, 0x2f, 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2f, 0x70,
0x65, 0x72, 0x78, 0x69, 0x73, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6c,
0x6f, 0x67, 0x73, 0x3b, 0x6c, 0x6f, 0x67, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
...@@ -551,43 +679,49 @@ func file_logs_log_service_proto_rawDescGZIP() []byte { ...@@ -551,43 +679,49 @@ func file_logs_log_service_proto_rawDescGZIP() []byte {
return file_logs_log_service_proto_rawDescData return file_logs_log_service_proto_rawDescData
} }
var file_logs_log_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_logs_log_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_logs_log_service_proto_goTypes = []any{ var file_logs_log_service_proto_goTypes = []any{
(*LogRequest)(nil), // 0: logs.LogRequest (*LogRequest)(nil), // 0: logs.LogRequest
(*LogResponse)(nil), // 1: logs.LogResponse (*LogResponse)(nil), // 1: logs.LogResponse
(*Filter)(nil), // 2: logs.Filter (*Filter)(nil), // 2: logs.Filter
(*FindRequest)(nil), // 3: logs.FindRequest (*FindOptions)(nil), // 3: logs.FindOptions
(*FindResult)(nil), // 4: logs.FindResult (*FindRequest)(nil), // 4: logs.FindRequest
(*FindResponse)(nil), // 5: logs.FindResponse (*FindResult)(nil), // 5: logs.FindResult
(*DeleteRequest)(nil), // 6: logs.DeleteRequest (*FindResponse)(nil), // 6: logs.FindResponse
(*DeleteResponse)(nil), // 7: logs.DeleteResponse (*DeleteRequest)(nil), // 7: logs.DeleteRequest
(*LogEntry)(nil), // 8: logs.LogEntry (*DeleteResponse)(nil), // 8: logs.DeleteResponse
(*common.Error)(nil), // 9: common.Error (*LogEntry)(nil), // 9: logs.LogEntry
(*common.FindOptions)(nil), // 10: common.FindOptions (*common.Error)(nil), // 10: common.Error
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
(*common.FindOptions)(nil), // 12: common.FindOptions
} }
var file_logs_log_service_proto_depIdxs = []int32{ var file_logs_log_service_proto_depIdxs = []int32{
8, // 0: logs.LogRequest.entries:type_name -> logs.LogEntry 9, // 0: logs.LogRequest.entries:type_name -> logs.LogEntry
9, // 1: logs.LogResponse.error:type_name -> common.Error 10, // 1: logs.LogResponse.error:type_name -> common.Error
2, // 2: logs.FindRequest.filter:type_name -> logs.Filter 11, // 2: logs.FindOptions.from:type_name -> google.protobuf.Timestamp
10, // 3: logs.FindRequest.options:type_name -> common.FindOptions 11, // 3: logs.FindOptions.to:type_name -> google.protobuf.Timestamp
8, // 4: logs.FindResult.entries:type_name -> logs.LogEntry 2, // 4: logs.FindRequest.filter:type_name -> logs.Filter
2, // 5: logs.FindResult.filter:type_name -> logs.Filter 3, // 5: logs.FindRequest.options:type_name -> logs.FindOptions
10, // 6: logs.FindResult.options:type_name -> common.FindOptions 9, // 6: logs.FindResult.entries:type_name -> logs.LogEntry
4, // 7: logs.FindResponse.result:type_name -> logs.FindResult 2, // 7: logs.FindResult.filter:type_name -> logs.Filter
9, // 8: logs.FindResponse.error:type_name -> common.Error 12, // 8: logs.FindResult.options:type_name -> common.FindOptions
2, // 9: logs.DeleteRequest.filter:type_name -> logs.Filter 4, // 9: logs.FindResult.next:type_name -> logs.FindRequest
9, // 10: logs.DeleteResponse.error:type_name -> common.Error 4, // 10: logs.FindResult.prev:type_name -> logs.FindRequest
0, // 11: logs.LogsService.Log:input_type -> logs.LogRequest 5, // 11: logs.FindResponse.result:type_name -> logs.FindResult
3, // 12: logs.LogsService.Find:input_type -> logs.FindRequest 10, // 12: logs.FindResponse.error:type_name -> common.Error
6, // 13: logs.LogsService.Delete:input_type -> logs.DeleteRequest 2, // 13: logs.DeleteRequest.filter:type_name -> logs.Filter
1, // 14: logs.LogsService.Log:output_type -> logs.LogResponse 10, // 14: logs.DeleteResponse.error:type_name -> common.Error
5, // 15: logs.LogsService.Find:output_type -> logs.FindResponse 0, // 15: logs.LogsService.Log:input_type -> logs.LogRequest
7, // 16: logs.LogsService.Delete:output_type -> logs.DeleteResponse 4, // 16: logs.LogsService.Find:input_type -> logs.FindRequest
14, // [14:17] is the sub-list for method output_type 7, // 17: logs.LogsService.Delete:input_type -> logs.DeleteRequest
11, // [11:14] is the sub-list for method input_type 1, // 18: logs.LogsService.Log:output_type -> logs.LogResponse
11, // [11:11] is the sub-list for extension type_name 6, // 19: logs.LogsService.Find:output_type -> logs.FindResponse
11, // [11:11] is the sub-list for extension extendee 8, // 20: logs.LogsService.Delete:output_type -> logs.DeleteResponse
0, // [0:11] is the sub-list for field type_name 18, // [18:21] is the sub-list for method output_type
15, // [15:18] is the sub-list for method input_type
15, // [15:15] is the sub-list for extension type_name
15, // [15:15] is the sub-list for extension extendee
0, // [0:15] is the sub-list for field type_name
} }
func init() { file_logs_log_service_proto_init() } func init() { file_logs_log_service_proto_init() }
...@@ -596,7 +730,7 @@ func file_logs_log_service_proto_init() { ...@@ -596,7 +730,7 @@ func file_logs_log_service_proto_init() {
return return
} }
file_logs_log_proto_init() file_logs_log_proto_init()
file_logs_log_service_proto_msgTypes[5].OneofWrappers = []any{ file_logs_log_service_proto_msgTypes[6].OneofWrappers = []any{
(*FindResponse_Result)(nil), (*FindResponse_Result)(nil),
(*FindResponse_Error)(nil), (*FindResponse_Error)(nil),
} }
...@@ -606,7 +740,7 @@ func file_logs_log_service_proto_init() { ...@@ -606,7 +740,7 @@ func file_logs_log_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_logs_log_service_proto_rawDesc, RawDescriptor: file_logs_log_service_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 8, NumMessages: 9,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment