mirror of https://github.com/status-im/consul.git
601 lines
22 KiB
Go
601 lines
22 KiB
Go
// Code generated by mockery v2.37.1. DO NOT EDIT.
|
|
|
|
package mockpbresource
|
|
|
|
import (
|
|
context "context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
pbresource "github.com/hashicorp/consul/proto-public/pbresource"
|
|
)
|
|
|
|
// ResourceServiceClient is an autogenerated mock type for the ResourceServiceClient type
|
|
type ResourceServiceClient struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type ResourceServiceClient_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *ResourceServiceClient) EXPECT() *ResourceServiceClient_Expecter {
|
|
return &ResourceServiceClient_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Delete provides a mock function with given fields: ctx, in, opts
|
|
func (_m *ResourceServiceClient) Delete(ctx context.Context, in *pbresource.DeleteRequest, opts ...grpc.CallOption) (*pbresource.DeleteResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *pbresource.DeleteResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.DeleteRequest, ...grpc.CallOption) (*pbresource.DeleteResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.DeleteRequest, ...grpc.CallOption) *pbresource.DeleteResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*pbresource.DeleteResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *pbresource.DeleteRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ResourceServiceClient_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
|
|
type ResourceServiceClient_Delete_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Delete is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *pbresource.DeleteRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *ResourceServiceClient_Expecter) Delete(ctx interface{}, in interface{}, opts ...interface{}) *ResourceServiceClient_Delete_Call {
|
|
return &ResourceServiceClient_Delete_Call{Call: _e.mock.On("Delete",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_Delete_Call) Run(run func(ctx context.Context, in *pbresource.DeleteRequest, opts ...grpc.CallOption)) *ResourceServiceClient_Delete_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*pbresource.DeleteRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_Delete_Call) Return(_a0 *pbresource.DeleteResponse, _a1 error) *ResourceServiceClient_Delete_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_Delete_Call) RunAndReturn(run func(context.Context, *pbresource.DeleteRequest, ...grpc.CallOption) (*pbresource.DeleteResponse, error)) *ResourceServiceClient_Delete_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// List provides a mock function with given fields: ctx, in, opts
|
|
func (_m *ResourceServiceClient) List(ctx context.Context, in *pbresource.ListRequest, opts ...grpc.CallOption) (*pbresource.ListResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *pbresource.ListResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ListRequest, ...grpc.CallOption) (*pbresource.ListResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ListRequest, ...grpc.CallOption) *pbresource.ListResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*pbresource.ListResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *pbresource.ListRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ResourceServiceClient_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
|
|
type ResourceServiceClient_List_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// List is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *pbresource.ListRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *ResourceServiceClient_Expecter) List(ctx interface{}, in interface{}, opts ...interface{}) *ResourceServiceClient_List_Call {
|
|
return &ResourceServiceClient_List_Call{Call: _e.mock.On("List",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_List_Call) Run(run func(ctx context.Context, in *pbresource.ListRequest, opts ...grpc.CallOption)) *ResourceServiceClient_List_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*pbresource.ListRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_List_Call) Return(_a0 *pbresource.ListResponse, _a1 error) *ResourceServiceClient_List_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_List_Call) RunAndReturn(run func(context.Context, *pbresource.ListRequest, ...grpc.CallOption) (*pbresource.ListResponse, error)) *ResourceServiceClient_List_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListByOwner provides a mock function with given fields: ctx, in, opts
|
|
func (_m *ResourceServiceClient) ListByOwner(ctx context.Context, in *pbresource.ListByOwnerRequest, opts ...grpc.CallOption) (*pbresource.ListByOwnerResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *pbresource.ListByOwnerResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ListByOwnerRequest, ...grpc.CallOption) (*pbresource.ListByOwnerResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ListByOwnerRequest, ...grpc.CallOption) *pbresource.ListByOwnerResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*pbresource.ListByOwnerResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *pbresource.ListByOwnerRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ResourceServiceClient_ListByOwner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByOwner'
|
|
type ResourceServiceClient_ListByOwner_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListByOwner is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *pbresource.ListByOwnerRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *ResourceServiceClient_Expecter) ListByOwner(ctx interface{}, in interface{}, opts ...interface{}) *ResourceServiceClient_ListByOwner_Call {
|
|
return &ResourceServiceClient_ListByOwner_Call{Call: _e.mock.On("ListByOwner",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_ListByOwner_Call) Run(run func(ctx context.Context, in *pbresource.ListByOwnerRequest, opts ...grpc.CallOption)) *ResourceServiceClient_ListByOwner_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*pbresource.ListByOwnerRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_ListByOwner_Call) Return(_a0 *pbresource.ListByOwnerResponse, _a1 error) *ResourceServiceClient_ListByOwner_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_ListByOwner_Call) RunAndReturn(run func(context.Context, *pbresource.ListByOwnerRequest, ...grpc.CallOption) (*pbresource.ListByOwnerResponse, error)) *ResourceServiceClient_ListByOwner_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// MutateAndValidate provides a mock function with given fields: ctx, in, opts
|
|
func (_m *ResourceServiceClient) MutateAndValidate(ctx context.Context, in *pbresource.MutateAndValidateRequest, opts ...grpc.CallOption) (*pbresource.MutateAndValidateResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *pbresource.MutateAndValidateResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.MutateAndValidateRequest, ...grpc.CallOption) (*pbresource.MutateAndValidateResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.MutateAndValidateRequest, ...grpc.CallOption) *pbresource.MutateAndValidateResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*pbresource.MutateAndValidateResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *pbresource.MutateAndValidateRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ResourceServiceClient_MutateAndValidate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MutateAndValidate'
|
|
type ResourceServiceClient_MutateAndValidate_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// MutateAndValidate is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *pbresource.MutateAndValidateRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *ResourceServiceClient_Expecter) MutateAndValidate(ctx interface{}, in interface{}, opts ...interface{}) *ResourceServiceClient_MutateAndValidate_Call {
|
|
return &ResourceServiceClient_MutateAndValidate_Call{Call: _e.mock.On("MutateAndValidate",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_MutateAndValidate_Call) Run(run func(ctx context.Context, in *pbresource.MutateAndValidateRequest, opts ...grpc.CallOption)) *ResourceServiceClient_MutateAndValidate_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*pbresource.MutateAndValidateRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_MutateAndValidate_Call) Return(_a0 *pbresource.MutateAndValidateResponse, _a1 error) *ResourceServiceClient_MutateAndValidate_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_MutateAndValidate_Call) RunAndReturn(run func(context.Context, *pbresource.MutateAndValidateRequest, ...grpc.CallOption) (*pbresource.MutateAndValidateResponse, error)) *ResourceServiceClient_MutateAndValidate_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Read provides a mock function with given fields: ctx, in, opts
|
|
func (_m *ResourceServiceClient) Read(ctx context.Context, in *pbresource.ReadRequest, opts ...grpc.CallOption) (*pbresource.ReadResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *pbresource.ReadResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ReadRequest, ...grpc.CallOption) (*pbresource.ReadResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.ReadRequest, ...grpc.CallOption) *pbresource.ReadResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*pbresource.ReadResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *pbresource.ReadRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ResourceServiceClient_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read'
|
|
type ResourceServiceClient_Read_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Read is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *pbresource.ReadRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *ResourceServiceClient_Expecter) Read(ctx interface{}, in interface{}, opts ...interface{}) *ResourceServiceClient_Read_Call {
|
|
return &ResourceServiceClient_Read_Call{Call: _e.mock.On("Read",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_Read_Call) Run(run func(ctx context.Context, in *pbresource.ReadRequest, opts ...grpc.CallOption)) *ResourceServiceClient_Read_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*pbresource.ReadRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_Read_Call) Return(_a0 *pbresource.ReadResponse, _a1 error) *ResourceServiceClient_Read_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_Read_Call) RunAndReturn(run func(context.Context, *pbresource.ReadRequest, ...grpc.CallOption) (*pbresource.ReadResponse, error)) *ResourceServiceClient_Read_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// WatchList provides a mock function with given fields: ctx, in, opts
|
|
func (_m *ResourceServiceClient) WatchList(ctx context.Context, in *pbresource.WatchListRequest, opts ...grpc.CallOption) (pbresource.ResourceService_WatchListClient, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 pbresource.ResourceService_WatchListClient
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WatchListRequest, ...grpc.CallOption) (pbresource.ResourceService_WatchListClient, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WatchListRequest, ...grpc.CallOption) pbresource.ResourceService_WatchListClient); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(pbresource.ResourceService_WatchListClient)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *pbresource.WatchListRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ResourceServiceClient_WatchList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchList'
|
|
type ResourceServiceClient_WatchList_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// WatchList is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *pbresource.WatchListRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *ResourceServiceClient_Expecter) WatchList(ctx interface{}, in interface{}, opts ...interface{}) *ResourceServiceClient_WatchList_Call {
|
|
return &ResourceServiceClient_WatchList_Call{Call: _e.mock.On("WatchList",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_WatchList_Call) Run(run func(ctx context.Context, in *pbresource.WatchListRequest, opts ...grpc.CallOption)) *ResourceServiceClient_WatchList_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*pbresource.WatchListRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_WatchList_Call) Return(_a0 pbresource.ResourceService_WatchListClient, _a1 error) *ResourceServiceClient_WatchList_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_WatchList_Call) RunAndReturn(run func(context.Context, *pbresource.WatchListRequest, ...grpc.CallOption) (pbresource.ResourceService_WatchListClient, error)) *ResourceServiceClient_WatchList_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Write provides a mock function with given fields: ctx, in, opts
|
|
func (_m *ResourceServiceClient) Write(ctx context.Context, in *pbresource.WriteRequest, opts ...grpc.CallOption) (*pbresource.WriteResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *pbresource.WriteResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WriteRequest, ...grpc.CallOption) (*pbresource.WriteResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WriteRequest, ...grpc.CallOption) *pbresource.WriteResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*pbresource.WriteResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *pbresource.WriteRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ResourceServiceClient_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write'
|
|
type ResourceServiceClient_Write_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Write is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *pbresource.WriteRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *ResourceServiceClient_Expecter) Write(ctx interface{}, in interface{}, opts ...interface{}) *ResourceServiceClient_Write_Call {
|
|
return &ResourceServiceClient_Write_Call{Call: _e.mock.On("Write",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_Write_Call) Run(run func(ctx context.Context, in *pbresource.WriteRequest, opts ...grpc.CallOption)) *ResourceServiceClient_Write_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*pbresource.WriteRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_Write_Call) Return(_a0 *pbresource.WriteResponse, _a1 error) *ResourceServiceClient_Write_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_Write_Call) RunAndReturn(run func(context.Context, *pbresource.WriteRequest, ...grpc.CallOption) (*pbresource.WriteResponse, error)) *ResourceServiceClient_Write_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// WriteStatus provides a mock function with given fields: ctx, in, opts
|
|
func (_m *ResourceServiceClient) WriteStatus(ctx context.Context, in *pbresource.WriteStatusRequest, opts ...grpc.CallOption) (*pbresource.WriteStatusResponse, error) {
|
|
_va := make([]interface{}, len(opts))
|
|
for _i := range opts {
|
|
_va[_i] = opts[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, in)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *pbresource.WriteStatusResponse
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WriteStatusRequest, ...grpc.CallOption) (*pbresource.WriteStatusResponse, error)); ok {
|
|
return rf(ctx, in, opts...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *pbresource.WriteStatusRequest, ...grpc.CallOption) *pbresource.WriteStatusResponse); ok {
|
|
r0 = rf(ctx, in, opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*pbresource.WriteStatusResponse)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *pbresource.WriteStatusRequest, ...grpc.CallOption) error); ok {
|
|
r1 = rf(ctx, in, opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ResourceServiceClient_WriteStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteStatus'
|
|
type ResourceServiceClient_WriteStatus_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// WriteStatus is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - in *pbresource.WriteStatusRequest
|
|
// - opts ...grpc.CallOption
|
|
func (_e *ResourceServiceClient_Expecter) WriteStatus(ctx interface{}, in interface{}, opts ...interface{}) *ResourceServiceClient_WriteStatus_Call {
|
|
return &ResourceServiceClient_WriteStatus_Call{Call: _e.mock.On("WriteStatus",
|
|
append([]interface{}{ctx, in}, opts...)...)}
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_WriteStatus_Call) Run(run func(ctx context.Context, in *pbresource.WriteStatusRequest, opts ...grpc.CallOption)) *ResourceServiceClient_WriteStatus_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]grpc.CallOption, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(grpc.CallOption)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*pbresource.WriteStatusRequest), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_WriteStatus_Call) Return(_a0 *pbresource.WriteStatusResponse, _a1 error) *ResourceServiceClient_WriteStatus_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ResourceServiceClient_WriteStatus_Call) RunAndReturn(run func(context.Context, *pbresource.WriteStatusRequest, ...grpc.CallOption) (*pbresource.WriteStatusResponse, error)) *ResourceServiceClient_WriteStatus_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewResourceServiceClient creates a new instance of ResourceServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewResourceServiceClient(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *ResourceServiceClient {
|
|
mock := &ResourceServiceClient{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|