Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mocks.go « mocks « internal - gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e1f0f6d7ee08247b4ade38a0f62249dca9e8a5f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// Code generated by MockGen. DO NOT EDIT.
// Source: internal/interface.go

// Package mocks is a generated GoMock package.
package mocks

import (
	http "net/http"
	reflect "reflect"

	gomock "github.com/golang/mock/gomock"
)

// MockArtifact is a mock of Artifact interface
type MockArtifact struct {
	ctrl     *gomock.Controller
	recorder *MockArtifactMockRecorder
}

// MockArtifactMockRecorder is the mock recorder for MockArtifact
type MockArtifactMockRecorder struct {
	mock *MockArtifact
}

// NewMockArtifact creates a new mock instance
func NewMockArtifact(ctrl *gomock.Controller) *MockArtifact {
	mock := &MockArtifact{ctrl: ctrl}
	mock.recorder = &MockArtifactMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockArtifact) EXPECT() *MockArtifactMockRecorder {
	return m.recorder
}

// TryMakeRequest mocks base method
func (m *MockArtifact) TryMakeRequest(host string, w http.ResponseWriter, r *http.Request, token string, responseHandler func(*http.Response) bool) bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "TryMakeRequest", host, w, r, token, responseHandler)
	ret0, _ := ret[0].(bool)
	return ret0
}

// TryMakeRequest indicates an expected call of TryMakeRequest
func (mr *MockArtifactMockRecorder) TryMakeRequest(host, w, r, token, responseHandler interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryMakeRequest", reflect.TypeOf((*MockArtifact)(nil).TryMakeRequest), host, w, r, token, responseHandler)
}

// MockAuth is a mock of Auth interface
type MockAuth struct {
	ctrl     *gomock.Controller
	recorder *MockAuthMockRecorder
}

// MockAuthMockRecorder is the mock recorder for MockAuth
type MockAuthMockRecorder struct {
	mock *MockAuth
}

// NewMockAuth creates a new mock instance
func NewMockAuth(ctrl *gomock.Controller) *MockAuth {
	mock := &MockAuth{ctrl: ctrl}
	mock.recorder = &MockAuthMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockAuth) EXPECT() *MockAuthMockRecorder {
	return m.recorder
}

// IsAuthSupported mocks base method
func (m *MockAuth) IsAuthSupported() bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IsAuthSupported")
	ret0, _ := ret[0].(bool)
	return ret0
}

// IsAuthSupported indicates an expected call of IsAuthSupported
func (mr *MockAuthMockRecorder) IsAuthSupported() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAuthSupported", reflect.TypeOf((*MockAuth)(nil).IsAuthSupported))
}

// RequireAuth mocks base method
func (m *MockAuth) RequireAuth(w http.ResponseWriter, r *http.Request) bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RequireAuth", w, r)
	ret0, _ := ret[0].(bool)
	return ret0
}

// RequireAuth indicates an expected call of RequireAuth
func (mr *MockAuthMockRecorder) RequireAuth(w, r interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequireAuth", reflect.TypeOf((*MockAuth)(nil).RequireAuth), w, r)
}

// GetTokenIfExists mocks base method
func (m *MockAuth) GetTokenIfExists(w http.ResponseWriter, r *http.Request) (string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetTokenIfExists", w, r)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetTokenIfExists indicates an expected call of GetTokenIfExists
func (mr *MockAuthMockRecorder) GetTokenIfExists(w, r interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTokenIfExists", reflect.TypeOf((*MockAuth)(nil).GetTokenIfExists), w, r)
}

// CheckResponseForInvalidToken mocks base method
func (m *MockAuth) CheckResponseForInvalidToken(w http.ResponseWriter, r *http.Request, resp *http.Response) bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CheckResponseForInvalidToken", w, r, resp)
	ret0, _ := ret[0].(bool)
	return ret0
}

// CheckResponseForInvalidToken indicates an expected call of CheckResponseForInvalidToken
func (mr *MockAuthMockRecorder) CheckResponseForInvalidToken(w, r, resp interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckResponseForInvalidToken", reflect.TypeOf((*MockAuth)(nil).CheckResponseForInvalidToken), w, r, resp)
}