// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq

package loki

import (
	"net/http"
	"sync"
)

// httpClientMock is a mock implementation of httpClient.
//
// 	func TestSomethingThatUseshttpClient(t *testing.T) {
//
// 		// make and configure a mocked httpClient
// 		mockedhttpClient := &httpClientMock{
// 			CloseIdleConnectionsFunc: func()  {
// 				panic("mock out the CloseIdleConnections method")
// 			},
// 			DoFunc: func(r *http.Request) (*http.Response, error) {
// 				panic("mock out the Do method")
// 			},
// 		}
//
// 		// use mockedhttpClient in code that requires httpClient
// 		// and then make assertions.
//
// 	}
type httpClientMock struct {
	// CloseIdleConnectionsFunc mocks the CloseIdleConnections method.
	CloseIdleConnectionsFunc func()

	// DoFunc mocks the Do method.
	DoFunc func(r *http.Request) (*http.Response, error)

	// calls tracks calls to the methods.
	calls struct {
		// CloseIdleConnections holds details about calls to the CloseIdleConnections method.
		CloseIdleConnections []struct {
		}
		// Do holds details about calls to the Do method.
		Do []struct {
			// R is the r argument value.
			R *http.Request
		}
	}
	lockCloseIdleConnections sync.RWMutex
	lockDo                   sync.RWMutex
}

// CloseIdleConnections calls CloseIdleConnectionsFunc.
func (mock *httpClientMock) CloseIdleConnections() {
	if mock.CloseIdleConnectionsFunc == nil {
		panic("httpClientMock.CloseIdleConnectionsFunc: method is nil but httpClient.CloseIdleConnections was just called")
	}
	callInfo := struct {
	}{}
	mock.lockCloseIdleConnections.Lock()
	mock.calls.CloseIdleConnections = append(mock.calls.CloseIdleConnections, callInfo)
	mock.lockCloseIdleConnections.Unlock()
	mock.CloseIdleConnectionsFunc()
}

// CloseIdleConnectionsCalls gets all the calls that were made to CloseIdleConnections.
// Check the length with:
//     len(mockedhttpClient.CloseIdleConnectionsCalls())
func (mock *httpClientMock) CloseIdleConnectionsCalls() []struct {
} {
	var calls []struct {
	}
	mock.lockCloseIdleConnections.RLock()
	calls = mock.calls.CloseIdleConnections
	mock.lockCloseIdleConnections.RUnlock()
	return calls
}

// Do calls DoFunc.
func (mock *httpClientMock) Do(r *http.Request) (*http.Response, error) {
	if mock.DoFunc == nil {
		panic("httpClientMock.DoFunc: method is nil but httpClient.Do was just called")
	}
	callInfo := struct {
		R *http.Request
	}{
		R: r,
	}
	mock.lockDo.Lock()
	mock.calls.Do = append(mock.calls.Do, callInfo)
	mock.lockDo.Unlock()
	return mock.DoFunc(r)
}

// DoCalls gets all the calls that were made to Do.
// Check the length with:
//     len(mockedhttpClient.DoCalls())
func (mock *httpClientMock) DoCalls() []struct {
	R *http.Request
} {
	var calls []struct {
		R *http.Request
	}
	mock.lockDo.RLock()
	calls = mock.calls.Do
	mock.lockDo.RUnlock()
	return calls
}
