-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_config.go
38 lines (31 loc) · 1.1 KB
/
check_config.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
33
34
35
36
37
38
package mockstore
import (
"context"
"github.com/sensu/sensu-go/backend/store"
"github.com/sensu/sensu-go/types"
)
// DeleteCheckConfigByName ...
func (s *MockStore) DeleteCheckConfigByName(ctx context.Context, name string) error {
args := s.Called(ctx, name)
return args.Error(0)
}
// GetCheckConfigs ...
func (s *MockStore) GetCheckConfigs(ctx context.Context, pred *store.SelectionPredicate) ([]*types.CheckConfig, error) {
args := s.Called(ctx, pred)
return args.Get(0).([]*types.CheckConfig), args.Error(1)
}
// GetCheckConfigByName ...
func (s *MockStore) GetCheckConfigByName(ctx context.Context, name string) (*types.CheckConfig, error) {
args := s.Called(ctx, name)
return args.Get(0).(*types.CheckConfig), args.Error(1)
}
// UpdateCheckConfig ...
func (s *MockStore) UpdateCheckConfig(ctx context.Context, check *types.CheckConfig) error {
args := s.Called(ctx, check)
return args.Error(0)
}
// GetCheckConfigWatcher ...
func (s *MockStore) GetCheckConfigWatcher(ctx context.Context) <-chan store.WatchEventCheckConfig {
args := s.Called(ctx)
return args.Get(0).(<-chan store.WatchEventCheckConfig)
}