1 Star 0 Fork 0

ryancartoon / sensu-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
resource.go 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
Simon Plourde 提交于 2019-06-11 11:20 . APId Refactoring (#3018)
package mockstore
import (
"context"
corev2 "github.com/sensu/sensu-go/api/core/v2"
"github.com/sensu/sensu-go/backend/store"
)
// CreateResource ...
func (s *MockStore) CreateResource(ctx context.Context, resource corev2.Resource) error {
args := s.Called(ctx, resource)
return args.Error(0)
}
// CreateOrUpdateResource ...
func (s *MockStore) CreateOrUpdateResource(ctx context.Context, resource corev2.Resource) error {
args := s.Called(ctx, resource)
return args.Error(0)
}
// DeleteResource ...
func (s *MockStore) DeleteResource(ctx context.Context, kind, name string) error {
args := s.Called(ctx, kind, name)
return args.Error(0)
}
// GetResource ...
func (s *MockStore) GetResource(ctx context.Context, name string, resource corev2.Resource) error {
args := s.Called(ctx, name, resource)
return args.Error(0)
}
// ListResources ...
func (s *MockStore) ListResources(ctx context.Context, kind string, list interface{}, pred *store.SelectionPredicate) error {
args := s.Called(ctx, kind, list, pred)
return args.Error(0)
}
1
https://gitee.com/ryancartoon/sensu-go.git
git@gitee.com:ryancartoon/sensu-go.git
ryancartoon
sensu-go
sensu-go
v5.10.1

搜索帮助