From 71a9ef101ec985f63eb9b9ef54d5f1cf58420779 Mon Sep 17 00:00:00 2001 From: zhulongcheng Date: Wed, 27 Feb 2019 21:10:48 +0800 Subject: [PATCH] fix(mock): remove view service --- mock/view_service.go | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 mock/view_service.go diff --git a/mock/view_service.go b/mock/view_service.go deleted file mode 100644 index 37b5989104..0000000000 --- a/mock/view_service.go +++ /dev/null @@ -1,37 +0,0 @@ -package mock - -import ( - "context" - - platform "github.com/influxdata/influxdb" -) - -var _ platform.ViewService = &ViewService{} - -type ViewService struct { - CreateViewF func(context.Context, *platform.View) error - FindViewByIDF func(context.Context, platform.ID) (*platform.View, error) - FindViewsF func(context.Context, platform.ViewFilter) ([]*platform.View, int, error) - UpdateViewF func(context.Context, platform.ID, platform.ViewUpdate) (*platform.View, error) - DeleteViewF func(context.Context, platform.ID) error -} - -func (s *ViewService) FindViewByID(ctx context.Context, id platform.ID) (*platform.View, error) { - return s.FindViewByIDF(ctx, id) -} - -func (s *ViewService) FindViews(ctx context.Context, filter platform.ViewFilter) ([]*platform.View, int, error) { - return s.FindViewsF(ctx, filter) -} - -func (s *ViewService) CreateView(ctx context.Context, b *platform.View) error { - return s.CreateViewF(ctx, b) -} - -func (s *ViewService) UpdateView(ctx context.Context, id platform.ID, upd platform.ViewUpdate) (*platform.View, error) { - return s.UpdateViewF(ctx, id, upd) -} - -func (s *ViewService) DeleteView(ctx context.Context, id platform.ID) error { - return s.DeleteViewF(ctx, id) -}