forked from sensu/sensu-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
handlers.go
32 lines (26 loc) · 866 Bytes
/
handlers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package mockstore
import (
"context"
"github.com/sensu/sensu-go/backend/store"
"github.com/sensu/sensu-go/types"
)
// DeleteHandlerByName ...
func (s *MockStore) DeleteHandlerByName(ctx context.Context, name string) error {
args := s.Called(ctx, name)
return args.Error(0)
}
// GetHandlers ...
func (s *MockStore) GetHandlers(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Handler, error) {
args := s.Called(ctx, pred)
return args.Get(0).([]*types.Handler), args.Error(1)
}
// GetHandlerByName ...
func (s *MockStore) GetHandlerByName(ctx context.Context, name string) (*types.Handler, error) {
args := s.Called(ctx, name)
return args.Get(0).(*types.Handler), args.Error(1)
}
// UpdateHandler ...
func (s *MockStore) UpdateHandler(ctx context.Context, handler *types.Handler) error {
args := s.Called(handler)
return args.Error(0)
}