github.com/mendersoftware/go-lib-micro@v0.0.0-20240304135804-e8e39c59b148/config/mocks/Reader.go (about) 1 // Copyright 2023 Northern.tech AS 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 package mocks 15 16 import ( 17 time "time" 18 19 mock "github.com/stretchr/testify/mock" 20 ) 21 22 // Reader is an autogenerated mock type for the Reader type 23 type Reader struct { 24 mock.Mock 25 } 26 27 // Get provides a mock function with given fields: key 28 func (_m *Reader) Get(key string) interface{} { 29 ret := _m.Called(key) 30 31 var r0 interface{} 32 if rf, ok := ret.Get(0).(func(string) interface{}); ok { 33 r0 = rf(key) 34 } else { 35 if ret.Get(0) != nil { 36 r0 = ret.Get(0).(interface{}) 37 } 38 } 39 40 return r0 41 } 42 43 // GetBool provides a mock function with given fields: key 44 func (_m *Reader) GetBool(key string) bool { 45 ret := _m.Called(key) 46 47 var r0 bool 48 if rf, ok := ret.Get(0).(func(string) bool); ok { 49 r0 = rf(key) 50 } else { 51 r0 = ret.Get(0).(bool) 52 } 53 54 return r0 55 } 56 57 // GetDuration provides a mock function with given fields: key 58 func (_m *Reader) GetDuration(key string) time.Duration { 59 ret := _m.Called(key) 60 61 var r0 time.Duration 62 if rf, ok := ret.Get(0).(func(string) time.Duration); ok { 63 r0 = rf(key) 64 } else { 65 r0 = ret.Get(0).(time.Duration) 66 } 67 68 return r0 69 } 70 71 // GetFloat64 provides a mock function with given fields: key 72 func (_m *Reader) GetFloat64(key string) float64 { 73 ret := _m.Called(key) 74 75 var r0 float64 76 if rf, ok := ret.Get(0).(func(string) float64); ok { 77 r0 = rf(key) 78 } else { 79 r0 = ret.Get(0).(float64) 80 } 81 82 return r0 83 } 84 85 // GetInt provides a mock function with given fields: key 86 func (_m *Reader) GetInt(key string) int { 87 ret := _m.Called(key) 88 89 var r0 int 90 if rf, ok := ret.Get(0).(func(string) int); ok { 91 r0 = rf(key) 92 } else { 93 r0 = ret.Get(0).(int) 94 } 95 96 return r0 97 } 98 99 // GetString provides a mock function with given fields: key 100 func (_m *Reader) GetString(key string) string { 101 ret := _m.Called(key) 102 103 var r0 string 104 if rf, ok := ret.Get(0).(func(string) string); ok { 105 r0 = rf(key) 106 } else { 107 r0 = ret.Get(0).(string) 108 } 109 110 return r0 111 } 112 113 // GetStringMap provides a mock function with given fields: key 114 func (_m *Reader) GetStringMap(key string) map[string]interface{} { 115 ret := _m.Called(key) 116 117 var r0 map[string]interface{} 118 if rf, ok := ret.Get(0).(func(string) map[string]interface{}); ok { 119 r0 = rf(key) 120 } else { 121 if ret.Get(0) != nil { 122 r0 = ret.Get(0).(map[string]interface{}) 123 } 124 } 125 126 return r0 127 } 128 129 // GetStringMapString provides a mock function with given fields: key 130 func (_m *Reader) GetStringMapString(key string) map[string]string { 131 ret := _m.Called(key) 132 133 var r0 map[string]string 134 if rf, ok := ret.Get(0).(func(string) map[string]string); ok { 135 r0 = rf(key) 136 } else { 137 if ret.Get(0) != nil { 138 r0 = ret.Get(0).(map[string]string) 139 } 140 } 141 142 return r0 143 } 144 145 // GetStringSlice provides a mock function with given fields: key 146 func (_m *Reader) GetStringSlice(key string) []string { 147 ret := _m.Called(key) 148 149 var r0 []string 150 if rf, ok := ret.Get(0).(func(string) []string); ok { 151 r0 = rf(key) 152 } else { 153 if ret.Get(0) != nil { 154 r0 = ret.Get(0).([]string) 155 } 156 } 157 158 return r0 159 } 160 161 // GetTime provides a mock function with given fields: key 162 func (_m *Reader) GetTime(key string) time.Time { 163 ret := _m.Called(key) 164 165 var r0 time.Time 166 if rf, ok := ret.Get(0).(func(string) time.Time); ok { 167 r0 = rf(key) 168 } else { 169 r0 = ret.Get(0).(time.Time) 170 } 171 172 return r0 173 } 174 175 // IsSet provides a mock function with given fields: key 176 func (_m *Reader) IsSet(key string) bool { 177 ret := _m.Called(key) 178 179 var r0 bool 180 if rf, ok := ret.Get(0).(func(string) bool); ok { 181 r0 = rf(key) 182 } else { 183 r0 = ret.Get(0).(bool) 184 } 185 186 return r0 187 }