diff --git a/logs/client.go b/logs/client.go index fc6a5b901343514c27a9f39e2c5c50ab234f1be7..0892055ced687104e80d7a381d8e6bf38e70aa48 100644 --- a/logs/client.go +++ b/logs/client.go @@ -4,7 +4,6 @@ import ( "context" 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" "google.golang.org/grpc" ) @@ -36,15 +35,8 @@ func (c *Client) Log(ctx context.Context, entries []*Entry) error { return nil } -func (c *Client) Find(ctx context.Context, filter *Filter, opts *options.FindOptions) (*FindResult, error) { - request := new(pb.FindRequest) - - if filter != nil { - request.Filter = &pb.Filter{Q: filter.Q} - } - - request.Options = options.FindOptionsToPB(opts) - +func (c *Client) Find(ctx context.Context, filter *Filter, opts *FindOptions) (*FindResult, error) { + request := FindRequestToPB(&FindRequest{Filter: filter, Options: opts}) response, err := c.client.Find(ctx, request) if err != nil { return nil, err diff --git a/logs/middleware/error_logging_middleware.go b/logs/middleware/error_logging_middleware.go index 5d6ab71065765f8c366dcf4f6528f944e27f87b1..3c897c7fe79dfeb35d95ccc247d21c5eaca01831 100644 --- a/logs/middleware/error_logging_middleware.go +++ b/logs/middleware/error_logging_middleware.go @@ -10,7 +10,6 @@ import ( "context" "git.perx.ru/perxis/perxis-go/logs" - "git.perx.ru/perxis/perxis-go/pkg/options" "go.uber.org/zap" ) @@ -40,7 +39,7 @@ func (m *errorLoggingMiddleware) Delete(ctx context.Context, filter *logs.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 defer func() { if err != nil { diff --git a/logs/middleware/logging_middleware.go b/logs/middleware/logging_middleware.go index 3a425bf03a64b0f5fa6d998db8d4076f92755d29..75c21c61808c1aacaacfd3bf8e3984eeacab46bf 100644 --- a/logs/middleware/logging_middleware.go +++ b/logs/middleware/logging_middleware.go @@ -12,7 +12,6 @@ import ( "git.perx.ru/perxis/perxis-go/logs" "git.perx.ru/perxis/perxis-go/pkg/auth" - "git.perx.ru/perxis/perxis-go/pkg/options" "go.uber.org/zap" ) @@ -50,7 +49,7 @@ func (m *accessLoggingMiddleware) Delete(ctx context.Context, filter *logs.Filte 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() m.logger.Debug("Find.Request", diff --git a/logs/middleware/recovering_middleware.go b/logs/middleware/recovering_middleware.go index 950963dbf13a88fb5d82cecc7f983f1a605d0f84..004e13fbc3394b3ba7ac1c7b6fd7fb3e71d73cb4 100644 --- a/logs/middleware/recovering_middleware.go +++ b/logs/middleware/recovering_middleware.go @@ -11,7 +11,6 @@ import ( "fmt" "git.perx.ru/perxis/perxis-go/logs" - "git.perx.ru/perxis/perxis-go/pkg/options" "go.uber.org/zap" ) @@ -43,7 +42,7 @@ func (m *recoveringMiddleware) Delete(ctx context.Context, filter *logs.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 defer func() { if r := recover(); r != nil { diff --git a/logs/middleware/telemetry_middleware.go b/logs/middleware/telemetry_middleware.go index c85083ee29f676321c8f6bcf445c6e5c0f8afe45..c71ac6f7d5047ad0164d11abe87e4e40ca0de3c7 100644 --- a/logs/middleware/telemetry_middleware.go +++ b/logs/middleware/telemetry_middleware.go @@ -13,7 +13,6 @@ import ( pkgId "git.perx.ru/perxis/perxis-go/id" "git.perx.ru/perxis/perxis-go/logs" "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" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" @@ -93,7 +92,7 @@ func (_d telemetryMiddleware) Delete(ctx context.Context, filter *logs.Filter) ( } // 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{ attribute.String("service", "Service"), attribute.String("method", "Find"), diff --git a/logs/mocks/Service.go b/logs/mocks/Service.go index 0031c92c3b99e49348bf5c14c54a909f2e9736a7..0a68972e99e34478d0853fc27e9909eb1802508d 100644 --- a/logs/mocks/Service.go +++ b/logs/mocks/Service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.40.1. DO NOT EDIT. +// Code generated by mockery v2.46.3. DO NOT EDIT. package mocks @@ -7,8 +7,6 @@ import ( logs "git.perx.ru/perxis/perxis-go/logs" 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 @@ -34,9 +32,9 @@ func (_m *Service) Delete(ctx context.Context, filter *logs.Filter) error { return r0 } -// Find provides a mock function with given fields: ctx, filter, _a2 -func (_m *Service) Find(ctx context.Context, filter *logs.Filter, _a2 *options.FindOptions) (*logs.FindResult, error) { - ret := _m.Called(ctx, filter, _a2) +// Find provides a mock function with given fields: ctx, filter, options +func (_m *Service) Find(ctx context.Context, filter *logs.Filter, options *logs.FindOptions) (*logs.FindResult, error) { + ret := _m.Called(ctx, filter, options) if len(ret) == 0 { panic("no return value specified for Find") @@ -44,19 +42,19 @@ func (_m *Service) Find(ctx context.Context, filter *logs.Filter, _a2 *options.F var r0 *logs.FindResult var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *options.FindOptions) (*logs.FindResult, error)); ok { - return rf(ctx, filter, _a2) + if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) (*logs.FindResult, error)); ok { + return rf(ctx, filter, options) } - if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *options.FindOptions) *logs.FindResult); ok { - r0 = rf(ctx, filter, _a2) + if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) *logs.FindResult); ok { + r0 = rf(ctx, filter, options) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*logs.FindResult) } } - if rf, ok := ret.Get(1).(func(context.Context, *logs.Filter, *options.FindOptions) error); ok { - r1 = rf(ctx, filter, _a2) + if rf, ok := ret.Get(1).(func(context.Context, *logs.Filter, *logs.FindOptions) error); ok { + r1 = rf(ctx, filter, options) } else { r1 = ret.Error(1) } diff --git a/logs/mocks/Storage.go b/logs/mocks/Storage.go index e341b0263c2570f508c4088ed1d9d2408b313e18..ef2fb59da96a6eebaf8f8da2718019b41d8f6d67 100644 --- a/logs/mocks/Storage.go +++ b/logs/mocks/Storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.40.1. DO NOT EDIT. +// Code generated by mockery v2.46.3. DO NOT EDIT. package mocks @@ -7,8 +7,6 @@ import ( logs "git.perx.ru/perxis/perxis-go/logs" 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 @@ -34,41 +32,34 @@ func (_m *Storage) Delete(ctx context.Context, filter *logs.Filter) error { return r0 } -// Find provides a mock function with given fields: ctx, filter, _a2 -func (_m *Storage) Find(ctx context.Context, filter *logs.Filter, _a2 *options.FindOptions) ([]*logs.Entry, int, error) { - ret := _m.Called(ctx, filter, _a2) +// Find provides a mock function with given fields: ctx, filter, options +func (_m *Storage) Find(ctx context.Context, filter *logs.Filter, options *logs.FindOptions) ([]*logs.Entry, error) { + ret := _m.Called(ctx, filter, options) if len(ret) == 0 { panic("no return value specified for Find") } var r0 []*logs.Entry - var r1 int - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *options.FindOptions) ([]*logs.Entry, int, error)); ok { - return rf(ctx, filter, _a2) + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) ([]*logs.Entry, error)); ok { + return rf(ctx, filter, options) } - if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *options.FindOptions) []*logs.Entry); ok { - r0 = rf(ctx, filter, _a2) + if rf, ok := ret.Get(0).(func(context.Context, *logs.Filter, *logs.FindOptions) []*logs.Entry); ok { + r0 = rf(ctx, filter, options) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*logs.Entry) } } - if rf, ok := ret.Get(1).(func(context.Context, *logs.Filter, *options.FindOptions) int); ok { - r1 = rf(ctx, filter, _a2) - } 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) + if rf, ok := ret.Get(1).(func(context.Context, *logs.Filter, *logs.FindOptions) error); ok { + r1 = rf(ctx, filter, options) } 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 diff --git a/logs/service.go b/logs/service.go index 34b3b4e61bd4b24c43dea910dcc54874deab13c5..fe92b160dacc80e3cc978dc1f1e409855adde98f 100644 --- a/logs/service.go +++ b/logs/service.go @@ -2,10 +2,12 @@ package logs import ( "context" + "time" itemstransportgrpc "git.perx.ru/perxis/perxis-go/pkg/items/transport/grpc" "git.perx.ru/perxis/perxis-go/pkg/options" pb "git.perx.ru/perxis/perxis-go/proto/logs" + "google.golang.org/protobuf/types/known/timestamppb" ) const ServiceName = "logs" @@ -16,7 +18,7 @@ type Service interface { Log(ctx context.Context, entries []*Entry) error // Find метод для РїРѕРёСЃРєР° логов РїРѕ заданным параметрам - Find(ctx context.Context, filter *Filter, options *options.FindOptions) (*FindResult, error) + Find(ctx context.Context, filter *Filter, options *FindOptions) (*FindResult, error) // Delete метод для удаления логов РїРѕ заданным параметрам Delete(ctx context.Context, filter *Filter) error @@ -26,17 +28,42 @@ type Filter struct { Q []string } +type FindRequest struct { + Filter *Filter + Options *FindOptions +} + type FindResult struct { + // Найденные записи лога Entries []*Entry - Filter *Filter + // Рспользовавшийся для РїРѕРёСЃРєР° фильтр + Filter *Filter + // Рспользовавшиеся для РїРѕРёСЃРєР° опции Options *options.FindOptions - Total uint32 + // Запрос для получения следующей страницы + Next *FindRequest + // Запрос для получения предыдущей страницы + Prev *FindRequest +} + +type FindOptions struct { + // Сортировка результатов + 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: result.Total, - } + findResult := &pb.FindResult{Total: 0} // поле стало deprecated всегда возвращаем 0 entries := make([]*pb.LogEntry, 0, len(result.Entries)) for _, e := range result.Entries { @@ -51,13 +78,20 @@ func FindResultToPB(result *FindResult) *pb.FindResult { 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 } +// FindResultFromPB перевод РёР· proto представления FindResult func FindResultFromPB(result *pb.FindResult) *FindResult { - findResult := &FindResult{ - Total: result.Total, - } + findResult := new(FindResult) entries := make([]*Entry, 0, len(result.Entries)) for _, e := range result.Entries { @@ -72,5 +106,80 @@ func FindResultFromPB(result *pb.FindResult) *FindResult { 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 } + +// 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(), + } +} diff --git a/logs/storage.go b/logs/storage.go index e6271dace2fca81715c0fa2d0982191c4fa517e6..328cd255e05b9051a025fb97904757b356c4919f 100644 --- a/logs/storage.go +++ b/logs/storage.go @@ -2,14 +2,12 @@ package logs import ( "context" - - "git.perx.ru/perxis/perxis-go/pkg/options" ) type Storage interface { Init(ctx context.Context) error Reset(ctx context.Context) 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 } diff --git a/perxis-proto b/perxis-proto index 806e7b2bd397ed2f3f980a73b4ac7b5a9c47b492..2b68dc129457f993c2d55aac9322fda9d582fbf4 160000 --- a/perxis-proto +++ b/perxis-proto @@ -1 +1 @@ -Subproject commit 806e7b2bd397ed2f3f980a73b4ac7b5a9c47b492 +Subproject commit 2b68dc129457f993c2d55aac9322fda9d582fbf4 diff --git a/proto/logs/log_service.pb.go b/proto/logs/log_service.pb.go index 63dff2cb63fa400b9406039c243b7852fddb5a04..8861e400205048aab0544d2661e1c15dcc758668 100644 --- a/proto/logs/log_service.pb.go +++ b/proto/logs/log_service.pb.go @@ -10,7 +10,7 @@ import ( common "git.perx.ru/perxis/perxis-go/proto/common" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -167,21 +167,113 @@ func (x *Filter) GetQ() []string { 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 { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Фильтры для РїРѕРёСЃРєР° + // Фильтр для РїРѕРёСЃРєР° 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() { *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.StoreMessageInfo(mi) } @@ -193,7 +285,7 @@ func (x *FindRequest) String() string { func (*FindRequest) ProtoMessage() {} 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 { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -206,7 +298,7 @@ func (x *FindRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindRequest.ProtoReflect.Descriptor instead. 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 { @@ -216,7 +308,7 @@ func (x *FindRequest) GetFilter() *Filter { return nil } -func (x *FindRequest) GetOptions() *common.FindOptions { +func (x *FindRequest) GetOptions() *FindOptions { if x != nil { return x.Options } @@ -237,12 +329,16 @@ type FindResult struct { // Рспользовавшиеся для РїРѕРёСЃРєР° опции 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() { *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.StoreMessageInfo(mi) } @@ -254,7 +350,7 @@ func (x *FindResult) String() string { func (*FindResult) ProtoMessage() {} 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 { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -267,7 +363,7 @@ func (x *FindResult) ProtoReflect() protoreflect.Message { // Deprecated: Use FindResult.ProtoReflect.Descriptor instead. 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 { @@ -298,6 +394,20 @@ func (x *FindResult) GetTotal() uint32 { 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 { state protoimpl.MessageState @@ -313,7 +423,7 @@ type FindResponse struct { func (x *FindResponse) Reset() { *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.StoreMessageInfo(mi) } @@ -325,7 +435,7 @@ func (x *FindResponse) String() string { func (*FindResponse) ProtoMessage() {} 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 { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -338,7 +448,7 @@ func (x *FindResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FindResponse.ProtoReflect.Descriptor instead. 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 { @@ -392,7 +502,7 @@ type DeleteRequest struct { func (x *DeleteRequest) Reset() { *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.StoreMessageInfo(mi) } @@ -404,7 +514,7 @@ func (x *DeleteRequest) String() string { func (*DeleteRequest) ProtoMessage() {} 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 { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -417,7 +527,7 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. 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 { @@ -439,7 +549,7 @@ type DeleteResponse struct { func (x *DeleteResponse) Reset() { *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.StoreMessageInfo(mi) } @@ -451,7 +561,7 @@ func (x *DeleteResponse) String() string { func (*DeleteResponse) ProtoMessage() {} 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 { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -464,7 +574,7 @@ func (x *DeleteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. 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 { @@ -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, 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, - 0x0a, 0x01, 0x71, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x01, 0x71, 0x22, 0x62, 0x0a, 0x0b, - 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 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, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0xa1, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x28, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x18, 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, 0x12, - 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x6d, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 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, + 0x0a, 0x01, 0x71, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x01, 0x71, 0x22, 0xd2, 0x01, 0x0a, + 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, + 0x6f, 0x22, 0x60, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 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, 0x12, 0x2b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0xef, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 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, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x25, 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x12, 0x25, + 0x0a, 0x04, 0x70, 0x72, 0x65, 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, + 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, + 0x04, 0x70, 0x72, 0x65, 0x76, 0x22, 0x6d, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, + 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 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 ( @@ -551,43 +679,49 @@ func file_logs_log_service_proto_rawDescGZIP() []byte { 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{ - (*LogRequest)(nil), // 0: logs.LogRequest - (*LogResponse)(nil), // 1: logs.LogResponse - (*Filter)(nil), // 2: logs.Filter - (*FindRequest)(nil), // 3: logs.FindRequest - (*FindResult)(nil), // 4: logs.FindResult - (*FindResponse)(nil), // 5: logs.FindResponse - (*DeleteRequest)(nil), // 6: logs.DeleteRequest - (*DeleteResponse)(nil), // 7: logs.DeleteResponse - (*LogEntry)(nil), // 8: logs.LogEntry - (*common.Error)(nil), // 9: common.Error - (*common.FindOptions)(nil), // 10: common.FindOptions + (*LogRequest)(nil), // 0: logs.LogRequest + (*LogResponse)(nil), // 1: logs.LogResponse + (*Filter)(nil), // 2: logs.Filter + (*FindOptions)(nil), // 3: logs.FindOptions + (*FindRequest)(nil), // 4: logs.FindRequest + (*FindResult)(nil), // 5: logs.FindResult + (*FindResponse)(nil), // 6: logs.FindResponse + (*DeleteRequest)(nil), // 7: logs.DeleteRequest + (*DeleteResponse)(nil), // 8: logs.DeleteResponse + (*LogEntry)(nil), // 9: logs.LogEntry + (*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{ - 8, // 0: logs.LogRequest.entries:type_name -> logs.LogEntry - 9, // 1: logs.LogResponse.error:type_name -> common.Error - 2, // 2: logs.FindRequest.filter:type_name -> logs.Filter - 10, // 3: logs.FindRequest.options:type_name -> common.FindOptions - 8, // 4: logs.FindResult.entries:type_name -> logs.LogEntry - 2, // 5: logs.FindResult.filter:type_name -> logs.Filter - 10, // 6: logs.FindResult.options:type_name -> common.FindOptions - 4, // 7: logs.FindResponse.result:type_name -> logs.FindResult - 9, // 8: logs.FindResponse.error:type_name -> common.Error - 2, // 9: logs.DeleteRequest.filter:type_name -> logs.Filter - 9, // 10: logs.DeleteResponse.error:type_name -> common.Error - 0, // 11: logs.LogsService.Log:input_type -> logs.LogRequest - 3, // 12: logs.LogsService.Find:input_type -> logs.FindRequest - 6, // 13: logs.LogsService.Delete:input_type -> logs.DeleteRequest - 1, // 14: logs.LogsService.Log:output_type -> logs.LogResponse - 5, // 15: logs.LogsService.Find:output_type -> logs.FindResponse - 7, // 16: logs.LogsService.Delete:output_type -> logs.DeleteResponse - 14, // [14:17] is the sub-list for method output_type - 11, // [11:14] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 9, // 0: logs.LogRequest.entries:type_name -> logs.LogEntry + 10, // 1: logs.LogResponse.error:type_name -> common.Error + 11, // 2: logs.FindOptions.from:type_name -> google.protobuf.Timestamp + 11, // 3: logs.FindOptions.to:type_name -> google.protobuf.Timestamp + 2, // 4: logs.FindRequest.filter:type_name -> logs.Filter + 3, // 5: logs.FindRequest.options:type_name -> logs.FindOptions + 9, // 6: logs.FindResult.entries:type_name -> logs.LogEntry + 2, // 7: logs.FindResult.filter:type_name -> logs.Filter + 12, // 8: logs.FindResult.options:type_name -> common.FindOptions + 4, // 9: logs.FindResult.next:type_name -> logs.FindRequest + 4, // 10: logs.FindResult.prev:type_name -> logs.FindRequest + 5, // 11: logs.FindResponse.result:type_name -> logs.FindResult + 10, // 12: logs.FindResponse.error:type_name -> common.Error + 2, // 13: logs.DeleteRequest.filter:type_name -> logs.Filter + 10, // 14: logs.DeleteResponse.error:type_name -> common.Error + 0, // 15: logs.LogsService.Log:input_type -> logs.LogRequest + 4, // 16: logs.LogsService.Find:input_type -> logs.FindRequest + 7, // 17: logs.LogsService.Delete:input_type -> logs.DeleteRequest + 1, // 18: logs.LogsService.Log:output_type -> logs.LogResponse + 6, // 19: logs.LogsService.Find:output_type -> logs.FindResponse + 8, // 20: logs.LogsService.Delete:output_type -> logs.DeleteResponse + 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() } @@ -596,7 +730,7 @@ func file_logs_log_service_proto_init() { return } 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_Error)(nil), } @@ -606,7 +740,7 @@ func file_logs_log_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_logs_log_service_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 1, },