-
Notifications
You must be signed in to change notification settings - Fork 51
/
mocktokens.go
95 lines (82 loc) · 3.35 KB
/
mocktokens.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
92
93
94
95
// Code generated by MockGen. DO NOT EDIT.
// Source: controller/pkg/tokens/tokens.go
// Package mocktokens is a generated GoMock package.
package mocktokens
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
claimsheader "go.aporeto.io/trireme-lib/controller/pkg/claimsheader"
pkiverifier "go.aporeto.io/trireme-lib/controller/pkg/pkiverifier"
secrets "go.aporeto.io/trireme-lib/controller/pkg/secrets"
tokens "go.aporeto.io/trireme-lib/controller/pkg/tokens"
)
// MockTokenEngine is a mock of TokenEngine interface
// nolint
type MockTokenEngine struct {
ctrl *gomock.Controller
recorder *MockTokenEngineMockRecorder
}
// MockTokenEngineMockRecorder is the mock recorder for MockTokenEngine
// nolint
type MockTokenEngineMockRecorder struct {
mock *MockTokenEngine
}
// NewMockTokenEngine creates a new mock instance
// nolint
func NewMockTokenEngine(ctrl *gomock.Controller) *MockTokenEngine {
mock := &MockTokenEngine{ctrl: ctrl}
mock.recorder = &MockTokenEngineMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
// nolint
func (m *MockTokenEngine) EXPECT() *MockTokenEngineMockRecorder {
return m.recorder
}
// CreateAndSign mocks base method
// nolint
func (m *MockTokenEngine) CreateAndSign(isAck bool, claims *tokens.ConnectionClaims, nonce []byte, claimsHeader *claimsheader.ClaimsHeader, secrets secrets.Secrets) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateAndSign", isAck, claims, nonce, claimsHeader, secrets)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateAndSign indicates an expected call of CreateAndSign
// nolint
func (mr *MockTokenEngineMockRecorder) CreateAndSign(isAck, claims, nonce, claimsHeader, secrets interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAndSign", reflect.TypeOf((*MockTokenEngine)(nil).CreateAndSign), isAck, claims, nonce, claimsHeader, secrets)
}
// Decode mocks base method
// nolint
func (m *MockTokenEngine) Decode(isAck bool, data []byte, previousCert interface{}, secrets secrets.Secrets) (*tokens.ConnectionClaims, []byte, interface{}, *pkiverifier.PKIControllerInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Decode", isAck, data, previousCert, secrets)
ret0, _ := ret[0].(*tokens.ConnectionClaims)
ret1, _ := ret[1].([]byte)
ret2, _ := ret[2].(interface{})
ret3, _ := ret[3].(*pkiverifier.PKIControllerInfo)
ret4, _ := ret[4].(error)
return ret0, ret1, ret2, ret3, ret4
}
// Decode indicates an expected call of Decode
// nolint
func (mr *MockTokenEngineMockRecorder) Decode(isAck, data, previousCert, secrets interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decode", reflect.TypeOf((*MockTokenEngine)(nil).Decode), isAck, data, previousCert, secrets)
}
// Randomize mocks base method
// nolint
func (m *MockTokenEngine) Randomize(arg0, arg1 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Randomize", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Randomize indicates an expected call of Randomize
// nolint
func (mr *MockTokenEngineMockRecorder) Randomize(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Randomize", reflect.TypeOf((*MockTokenEngine)(nil).Randomize), arg0, arg1)
}