github.com/outbrain/consul@v1.4.5/agent/connect/ca/mock_Provider.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package ca 4 5 import mock "github.com/stretchr/testify/mock" 6 import x509 "crypto/x509" 7 8 // MockProvider is an autogenerated mock type for the Provider type 9 type MockProvider struct { 10 mock.Mock 11 } 12 13 // ActiveIntermediate provides a mock function with given fields: 14 func (_m *MockProvider) ActiveIntermediate() (string, error) { 15 ret := _m.Called() 16 17 var r0 string 18 if rf, ok := ret.Get(0).(func() string); ok { 19 r0 = rf() 20 } else { 21 r0 = ret.Get(0).(string) 22 } 23 24 var r1 error 25 if rf, ok := ret.Get(1).(func() error); ok { 26 r1 = rf() 27 } else { 28 r1 = ret.Error(1) 29 } 30 31 return r0, r1 32 } 33 34 // ActiveRoot provides a mock function with given fields: 35 func (_m *MockProvider) ActiveRoot() (string, error) { 36 ret := _m.Called() 37 38 var r0 string 39 if rf, ok := ret.Get(0).(func() string); ok { 40 r0 = rf() 41 } else { 42 r0 = ret.Get(0).(string) 43 } 44 45 var r1 error 46 if rf, ok := ret.Get(1).(func() error); ok { 47 r1 = rf() 48 } else { 49 r1 = ret.Error(1) 50 } 51 52 return r0, r1 53 } 54 55 // Cleanup provides a mock function with given fields: 56 func (_m *MockProvider) Cleanup() error { 57 ret := _m.Called() 58 59 var r0 error 60 if rf, ok := ret.Get(0).(func() error); ok { 61 r0 = rf() 62 } else { 63 r0 = ret.Error(0) 64 } 65 66 return r0 67 } 68 69 // Configure provides a mock function with given fields: clusterId, isRoot, rawConfig 70 func (_m *MockProvider) Configure(clusterId string, isRoot bool, rawConfig map[string]interface{}) error { 71 ret := _m.Called(clusterId, isRoot, rawConfig) 72 73 var r0 error 74 if rf, ok := ret.Get(0).(func(string, bool, map[string]interface{}) error); ok { 75 r0 = rf(clusterId, isRoot, rawConfig) 76 } else { 77 r0 = ret.Error(0) 78 } 79 80 return r0 81 } 82 83 // CrossSignCA provides a mock function with given fields: _a0 84 func (_m *MockProvider) CrossSignCA(_a0 *x509.Certificate) (string, error) { 85 ret := _m.Called(_a0) 86 87 var r0 string 88 if rf, ok := ret.Get(0).(func(*x509.Certificate) string); ok { 89 r0 = rf(_a0) 90 } else { 91 r0 = ret.Get(0).(string) 92 } 93 94 var r1 error 95 if rf, ok := ret.Get(1).(func(*x509.Certificate) error); ok { 96 r1 = rf(_a0) 97 } else { 98 r1 = ret.Error(1) 99 } 100 101 return r0, r1 102 } 103 104 // GenerateIntermediate provides a mock function with given fields: 105 func (_m *MockProvider) GenerateIntermediate() (string, error) { 106 ret := _m.Called() 107 108 var r0 string 109 if rf, ok := ret.Get(0).(func() string); ok { 110 r0 = rf() 111 } else { 112 r0 = ret.Get(0).(string) 113 } 114 115 var r1 error 116 if rf, ok := ret.Get(1).(func() error); ok { 117 r1 = rf() 118 } else { 119 r1 = ret.Error(1) 120 } 121 122 return r0, r1 123 } 124 125 // GenerateIntermediateCSR provides a mock function with given fields: 126 func (_m *MockProvider) GenerateIntermediateCSR() (string, error) { 127 ret := _m.Called() 128 129 var r0 string 130 if rf, ok := ret.Get(0).(func() string); ok { 131 r0 = rf() 132 } else { 133 r0 = ret.Get(0).(string) 134 } 135 136 var r1 error 137 if rf, ok := ret.Get(1).(func() error); ok { 138 r1 = rf() 139 } else { 140 r1 = ret.Error(1) 141 } 142 143 return r0, r1 144 } 145 146 // GenerateRoot provides a mock function with given fields: 147 func (_m *MockProvider) GenerateRoot() error { 148 ret := _m.Called() 149 150 var r0 error 151 if rf, ok := ret.Get(0).(func() error); ok { 152 r0 = rf() 153 } else { 154 r0 = ret.Error(0) 155 } 156 157 return r0 158 } 159 160 // SetIntermediate provides a mock function with given fields: intermediatePEM, rootPEM 161 func (_m *MockProvider) SetIntermediate(intermediatePEM string, rootPEM string) error { 162 ret := _m.Called(intermediatePEM, rootPEM) 163 164 var r0 error 165 if rf, ok := ret.Get(0).(func(string, string) error); ok { 166 r0 = rf(intermediatePEM, rootPEM) 167 } else { 168 r0 = ret.Error(0) 169 } 170 171 return r0 172 } 173 174 // Sign provides a mock function with given fields: _a0 175 func (_m *MockProvider) Sign(_a0 *x509.CertificateRequest) (string, error) { 176 ret := _m.Called(_a0) 177 178 var r0 string 179 if rf, ok := ret.Get(0).(func(*x509.CertificateRequest) string); ok { 180 r0 = rf(_a0) 181 } else { 182 r0 = ret.Get(0).(string) 183 } 184 185 var r1 error 186 if rf, ok := ret.Get(1).(func(*x509.CertificateRequest) error); ok { 187 r1 = rf(_a0) 188 } else { 189 r1 = ret.Error(1) 190 } 191 192 return r0, r1 193 } 194 195 // SignIntermediate provides a mock function with given fields: _a0 196 func (_m *MockProvider) SignIntermediate(_a0 *x509.CertificateRequest) (string, error) { 197 ret := _m.Called(_a0) 198 199 var r0 string 200 if rf, ok := ret.Get(0).(func(*x509.CertificateRequest) string); ok { 201 r0 = rf(_a0) 202 } else { 203 r0 = ret.Get(0).(string) 204 } 205 206 var r1 error 207 if rf, ok := ret.Get(1).(func(*x509.CertificateRequest) error); ok { 208 r1 = rf(_a0) 209 } else { 210 r1 = ret.Error(1) 211 } 212 213 return r0, r1 214 }