-
Notifications
You must be signed in to change notification settings - Fork 43
/
pki.go
180 lines (154 loc) · 5.93 KB
/
pki.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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/baetyl/baetyl-cloud/plugin (interfaces: PKI)
// Package plugin is a generated GoMock package.
package plugin
import (
x509 "crypto/x509"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// MockPKI is a mock of PKI interface
type MockPKI struct {
ctrl *gomock.Controller
recorder *MockPKIMockRecorder
}
// MockPKIMockRecorder is the mock recorder for MockPKI
type MockPKIMockRecorder struct {
mock *MockPKI
}
// NewMockPKI creates a new mock instance
func NewMockPKI(ctrl *gomock.Controller) *MockPKI {
mock := &MockPKI{ctrl: ctrl}
mock.recorder = &MockPKIMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPKI) EXPECT() *MockPKIMockRecorder {
return m.recorder
}
// Close mocks base method
func (m *MockPKI) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close
func (mr *MockPKIMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPKI)(nil).Close))
}
// CreateClientCert mocks base method
func (m *MockPKI) CreateClientCert(arg0 []byte, arg1 string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateClientCert", arg0, arg1)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateClientCert indicates an expected call of CreateClientCert
func (mr *MockPKIMockRecorder) CreateClientCert(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClientCert", reflect.TypeOf((*MockPKI)(nil).CreateClientCert), arg0, arg1)
}
// CreateRootCert mocks base method
func (m *MockPKI) CreateRootCert(arg0 *x509.CertificateRequest, arg1 string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateRootCert", arg0, arg1)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateRootCert indicates an expected call of CreateRootCert
func (mr *MockPKIMockRecorder) CreateRootCert(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRootCert", reflect.TypeOf((*MockPKI)(nil).CreateRootCert), arg0, arg1)
}
// CreateServerCert mocks base method
func (m *MockPKI) CreateServerCert(arg0 []byte, arg1 string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateServerCert", arg0, arg1)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateServerCert indicates an expected call of CreateServerCert
func (mr *MockPKIMockRecorder) CreateServerCert(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateServerCert", reflect.TypeOf((*MockPKI)(nil).CreateServerCert), arg0, arg1)
}
// DeleteClientCert mocks base method
func (m *MockPKI) DeleteClientCert(arg0 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteClientCert", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteClientCert indicates an expected call of DeleteClientCert
func (mr *MockPKIMockRecorder) DeleteClientCert(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClientCert", reflect.TypeOf((*MockPKI)(nil).DeleteClientCert), arg0)
}
// DeleteRootCert mocks base method
func (m *MockPKI) DeleteRootCert(arg0 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteRootCert", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteRootCert indicates an expected call of DeleteRootCert
func (mr *MockPKIMockRecorder) DeleteRootCert(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRootCert", reflect.TypeOf((*MockPKI)(nil).DeleteRootCert), arg0)
}
// DeleteServerCert mocks base method
func (m *MockPKI) DeleteServerCert(arg0 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteServerCert", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteServerCert indicates an expected call of DeleteServerCert
func (mr *MockPKIMockRecorder) DeleteServerCert(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteServerCert", reflect.TypeOf((*MockPKI)(nil).DeleteServerCert), arg0)
}
// GetClientCert mocks base method
func (m *MockPKI) GetClientCert(arg0 string) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetClientCert", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetClientCert indicates an expected call of GetClientCert
func (mr *MockPKIMockRecorder) GetClientCert(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClientCert", reflect.TypeOf((*MockPKI)(nil).GetClientCert), arg0)
}
// GetRootCert mocks base method
func (m *MockPKI) GetRootCert(arg0 string) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRootCert", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetRootCert indicates an expected call of GetRootCert
func (mr *MockPKIMockRecorder) GetRootCert(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRootCert", reflect.TypeOf((*MockPKI)(nil).GetRootCert), arg0)
}
// GetServerCert mocks base method
func (m *MockPKI) GetServerCert(arg0 string) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetServerCert", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetServerCert indicates an expected call of GetServerCert
func (mr *MockPKIMockRecorder) GetServerCert(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerCert", reflect.TypeOf((*MockPKI)(nil).GetServerCert), arg0)
}