mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-08 00:02:49 +01:00
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/blevesearch/bleve/v2"
|
||||
|
||||
"github.com/SecurityBrewery/catalyst/generated/models"
|
||||
"github.com/SecurityBrewery/catalyst/generated/model"
|
||||
)
|
||||
|
||||
type Index struct {
|
||||
@@ -31,7 +31,7 @@ func New(name string) (*Index, error) {
|
||||
return &Index{name: name, internal: bleveIndex}, nil
|
||||
}
|
||||
|
||||
func (i *Index) Index(incidents []*models.TicketSimpleResponse) {
|
||||
func (i *Index) Index(incidents []*model.TicketSimpleResponse) {
|
||||
b := i.internal.NewBatch()
|
||||
for _, incident := range incidents {
|
||||
if incident.ID == 0 {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/SecurityBrewery/catalyst/generated/models"
|
||||
"github.com/SecurityBrewery/catalyst/generated/model"
|
||||
"github.com/SecurityBrewery/catalyst/test"
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ func TestIndex(t *testing.T) {
|
||||
}
|
||||
defer cleanup()
|
||||
|
||||
i.Index([]*models.TicketSimpleResponse{
|
||||
i.Index([]*model.TicketSimpleResponse{
|
||||
{ID: 0, Name: "bar"},
|
||||
{ID: 1, Name: "foo"},
|
||||
})
|
||||
@@ -61,7 +61,7 @@ func TestIndex_Truncate(t *testing.T) {
|
||||
}
|
||||
defer cleanup()
|
||||
|
||||
i.Index([]*models.TicketSimpleResponse{
|
||||
i.Index([]*model.TicketSimpleResponse{
|
||||
{ID: 0, Name: "bar"},
|
||||
{ID: 1, Name: "foo"},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user