From f2587092c20218979b30d8eee4eb07c82606a3ff Mon Sep 17 00:00:00 2001 From: Michael Desa Date: Mon, 16 Jul 2018 13:00:31 -0400 Subject: [PATCH] fix(mocks): use platform package instead of chronografv2 --- mocks/cells.go | 24 ++++++++++++------------ mocks/store.go | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/mocks/cells.go b/mocks/cells.go index c40933fb82..ab27bcbc6c 100644 --- a/mocks/cells.go +++ b/mocks/cells.go @@ -3,35 +3,35 @@ package mocks import ( "context" - chronograf "github.com/influxdata/chronograf/v2" + "github.com/influxdata/chronograf/v2" ) -var _ chronograf.CellService = &CellService{} +var _ platform.CellService = &CellService{} type CellService struct { - CreateCellF func(context.Context, *chronograf.Cell) error - FindCellByIDF func(context.Context, chronograf.ID) (*chronograf.Cell, error) - FindCellsF func(context.Context, chronograf.CellFilter) ([]*chronograf.Cell, int, error) - UpdateCellF func(context.Context, chronograf.ID, chronograf.CellUpdate) (*chronograf.Cell, error) - DeleteCellF func(context.Context, chronograf.ID) error + CreateCellF func(context.Context, *platform.Cell) error + FindCellByIDF func(context.Context, platform.ID) (*platform.Cell, error) + FindCellsF func(context.Context, platform.CellFilter) ([]*platform.Cell, int, error) + UpdateCellF func(context.Context, platform.ID, platform.CellUpdate) (*platform.Cell, error) + DeleteCellF func(context.Context, platform.ID) error } -func (s *CellService) FindCellByID(ctx context.Context, id chronograf.ID) (*chronograf.Cell, error) { +func (s *CellService) FindCellByID(ctx context.Context, id platform.ID) (*platform.Cell, error) { return s.FindCellByIDF(ctx, id) } -func (s *CellService) FindCells(ctx context.Context, filter chronograf.CellFilter) ([]*chronograf.Cell, int, error) { +func (s *CellService) FindCells(ctx context.Context, filter platform.CellFilter) ([]*platform.Cell, int, error) { return s.FindCellsF(ctx, filter) } -func (s *CellService) CreateCell(ctx context.Context, b *chronograf.Cell) error { +func (s *CellService) CreateCell(ctx context.Context, b *platform.Cell) error { return s.CreateCellF(ctx, b) } -func (s *CellService) UpdateCell(ctx context.Context, id chronograf.ID, upd chronograf.CellUpdate) (*chronograf.Cell, error) { +func (s *CellService) UpdateCell(ctx context.Context, id platform.ID, upd platform.CellUpdate) (*platform.Cell, error) { return s.UpdateCellF(ctx, id, upd) } -func (s *CellService) DeleteCell(ctx context.Context, id chronograf.ID) error { +func (s *CellService) DeleteCell(ctx context.Context, id platform.ID) error { return s.DeleteCellF(ctx, id) } diff --git a/mocks/store.go b/mocks/store.go index a848f74089..9c1dcbe9a5 100644 --- a/mocks/store.go +++ b/mocks/store.go @@ -4,7 +4,7 @@ import ( "context" "github.com/influxdata/chronograf" - chronografv2 "github.com/influxdata/chronograf/v2" + "github.com/influxdata/chronograf/v2" ) // Store is a server.DataStore @@ -18,7 +18,7 @@ type Store struct { OrganizationsStore chronograf.OrganizationsStore ConfigStore chronograf.ConfigStore OrganizationConfigStore chronograf.OrganizationConfigStore - CellService chronografv2.CellService + CellService platform.CellService } func (s *Store) Sources(ctx context.Context) chronograf.SourcesStore { @@ -56,6 +56,6 @@ func (s *Store) OrganizationConfig(ctx context.Context) chronograf.OrganizationC return s.OrganizationConfigStore } -func (s *Store) Cells(ctx context.Context) chronografv2.CellService { +func (s *Store) Cells(ctx context.Context) platform.CellService { return s.CellService }