1 Star 0 Fork 0

ryancartoon / sensu-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
entities.go 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
package mockstore
import (
"context"
"github.com/sensu/sensu-go/backend/store"
"github.com/sensu/sensu-go/types"
)
// DeleteEntity ...
func (s *MockStore) DeleteEntity(ctx context.Context, e *types.Entity) error {
args := s.Called(ctx, e)
return args.Error(0)
}
// DeleteEntityByName ...
func (s *MockStore) DeleteEntityByName(ctx context.Context, id string) error {
args := s.Called(ctx, id)
return args.Error(0)
}
// GetEntities ...
func (s *MockStore) GetEntities(ctx context.Context, pred *store.SelectionPredicate) ([]*types.Entity, error) {
args := s.Called(ctx, pred)
return args.Get(0).([]*types.Entity), args.Error(1)
}
// GetEntityByName ...
func (s *MockStore) GetEntityByName(ctx context.Context, id string) (*types.Entity, error) {
args := s.Called(ctx, id)
return args.Get(0).(*types.Entity), args.Error(1)
}
// UpdateEntity ...
func (s *MockStore) UpdateEntity(ctx context.Context, e *types.Entity) error {
args := s.Called(ctx, e)
return args.Error(0)
}
// GetEntityWatcher
func (s *MockStore) GetEntityWatcher(ctx context.Context) <-chan store.WatchEventEntity {
args := s.Called(ctx)
return args.Get(0).(<-chan store.WatchEventEntity)
}
1
https://gitee.com/ryancartoon/sensu-go.git
git@gitee.com:ryancartoon/sensu-go.git
ryancartoon
sensu-go
sensu-go
v5.10.1

搜索帮助