// Code generated by mockery v2.53.0. DO NOT EDIT. package proto import ( context "context" grpc "google.golang.org/grpc" mock "github.com/stretchr/testify/mock" proto "codeberg.org/crowci/crow/v3/pipeline/rpc/proto" ) // MockCrowAuthClient is an autogenerated mock type for the CrowAuthClient type type MockCrowAuthClient struct { mock.Mock } type MockCrowAuthClient_Expecter struct { mock *mock.Mock } func (_m *MockCrowAuthClient) EXPECT() *MockCrowAuthClient_Expecter { return &MockCrowAuthClient_Expecter{mock: &_m.Mock} } // Auth provides a mock function with given fields: ctx, in, opts func (_m *MockCrowAuthClient) Auth(ctx context.Context, in *proto.AuthRequest, opts ...grpc.CallOption) (*proto.AuthResponse, 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...) if len(ret) == 0 { panic("no return value specified for Auth") } var r0 *proto.AuthResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *proto.AuthRequest, ...grpc.CallOption) (*proto.AuthResponse, error)); ok { return rf(ctx, in, opts...) } if rf, ok := ret.Get(0).(func(context.Context, *proto.AuthRequest, ...grpc.CallOption) *proto.AuthResponse); ok { r0 = rf(ctx, in, opts...) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*proto.AuthResponse) } } if rf, ok := ret.Get(1).(func(context.Context, *proto.AuthRequest, ...grpc.CallOption) error); ok { r1 = rf(ctx, in, opts...) } else { r1 = ret.Error(1) } return r0, r1 } // MockCrowAuthClient_Auth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Auth' type MockCrowAuthClient_Auth_Call struct { *mock.Call } // Auth is a helper method to define mock.On call // - ctx context.Context // - in *proto.AuthRequest // - opts ...grpc.CallOption func (_e *MockCrowAuthClient_Expecter) Auth(ctx interface{}, in interface{}, opts ...interface{}) *MockCrowAuthClient_Auth_Call { return &MockCrowAuthClient_Auth_Call{Call: _e.mock.On("Auth", append([]interface{}{ctx, in}, opts...)...)} } func (_c *MockCrowAuthClient_Auth_Call) Run(run func(ctx context.Context, in *proto.AuthRequest, opts ...grpc.CallOption)) *MockCrowAuthClient_Auth_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].(*proto.AuthRequest), variadicArgs...) }) return _c } func (_c *MockCrowAuthClient_Auth_Call) Return(_a0 *proto.AuthResponse, _a1 error) *MockCrowAuthClient_Auth_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockCrowAuthClient_Auth_Call) RunAndReturn(run func(context.Context, *proto.AuthRequest, ...grpc.CallOption) (*proto.AuthResponse, error)) *MockCrowAuthClient_Auth_Call { _c.Call.Return(run) return _c } // NewMockCrowAuthClient creates a new instance of MockCrowAuthClient. 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 NewMockCrowAuthClient(t interface { mock.TestingT Cleanup(func()) }) *MockCrowAuthClient { mock := &MockCrowAuthClient{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }