-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathcontext.go
91 lines (77 loc) · 2.52 KB
/
context.go
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
// Code generated by MockGen. DO NOT EDIT.
// Source: context (interfaces: Context)
// Package mock_context is a generated GoMock package.
package mock_context
import (
gomock "github.com/golang/mock/gomock"
reflect "reflect"
time "time"
)
// MockContext is a mock of Context interface
type MockContext struct {
ctrl *gomock.Controller
recorder *MockContextMockRecorder
}
// MockContextMockRecorder is the mock recorder for MockContext
type MockContextMockRecorder struct {
mock *MockContext
}
// NewMockContext creates a new mock instance
func NewMockContext(ctrl *gomock.Controller) *MockContext {
mock := &MockContext{ctrl: ctrl}
mock.recorder = &MockContextMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockContext) EXPECT() *MockContextMockRecorder {
return m.recorder
}
// Deadline mocks base method
func (m *MockContext) Deadline() (time.Time, bool) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Deadline")
ret0, _ := ret[0].(time.Time)
ret1, _ := ret[1].(bool)
return ret0, ret1
}
// Deadline indicates an expected call of Deadline
func (mr *MockContextMockRecorder) Deadline() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deadline", reflect.TypeOf((*MockContext)(nil).Deadline))
}
// Done mocks base method
func (m *MockContext) Done() <-chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Done")
ret0, _ := ret[0].(<-chan struct{})
return ret0
}
// Done indicates an expected call of Done
func (mr *MockContextMockRecorder) Done() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockContext)(nil).Done))
}
// Err mocks base method
func (m *MockContext) Err() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Err")
ret0, _ := ret[0].(error)
return ret0
}
// Err indicates an expected call of Err
func (mr *MockContextMockRecorder) Err() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockContext)(nil).Err))
}
// Value mocks base method
func (m *MockContext) Value(arg0 interface{}) interface{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Value", arg0)
ret0, _ := ret[0].(interface{})
return ret0
}
// Value indicates an expected call of Value
func (mr *MockContextMockRecorder) Value(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockContext)(nil).Value), arg0)
}