Moved cursor to a separate file
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/tech/sendico/pkg/mlogger"
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
"github.com/tech/sendico/pkg/mservice"
|
||||
paginationv2 "github.com/tech/sendico/pkg/proto/common/pagination/v2"
|
||||
methodsv1 "github.com/tech/sendico/pkg/proto/payments/methods/v1"
|
||||
eapi "github.com/tech/sendico/server/interface/api"
|
||||
"github.com/tech/sendico/server/interface/api/sresponse"
|
||||
@@ -274,12 +275,12 @@ func resolveClientAddress(service string, cfg *eapi.PaymentOrchestratorConfig) (
|
||||
return "", merrors.InvalidArgument(strings.TrimSpace(service) + " address is not specified")
|
||||
}
|
||||
|
||||
func toProtoCursor(cursor *model.ViewCursor) *methodsv1.ViewCursor {
|
||||
func toProtoCursor(cursor *model.ViewCursor) *paginationv2.ViewCursor {
|
||||
if cursor == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
res := &methodsv1.ViewCursor{}
|
||||
res := &paginationv2.ViewCursor{}
|
||||
hasAny := false
|
||||
if cursor.Limit != nil {
|
||||
res.Limit = wrapperspb.Int64(*cursor.Limit)
|
||||
|
||||
Reference in New Issue
Block a user