github.com/rohankumardubey/aresdb@v0.0.2-0.20190517170215-e54e3ca06b9c/memstore/common/mocks/LiveVectorParty.go (about) 1 // Copyright (c) 2017-2018 Uber Technologies, Inc. 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 common "github.com/uber/aresdb/memstore/common" 17 import io "io" 18 import mock "github.com/stretchr/testify/mock" 19 import unsafe "unsafe" 20 21 // LiveVectorParty is an autogenerated mock type for the LiveVectorParty type 22 type LiveVectorParty struct { 23 mock.Mock 24 } 25 26 // Allocate provides a mock function with given fields: hasCount 27 func (_m *LiveVectorParty) Allocate(hasCount bool) { 28 _m.Called(hasCount) 29 } 30 31 // Equals provides a mock function with given fields: other 32 func (_m *LiveVectorParty) Equals(other common.VectorParty) bool { 33 ret := _m.Called(other) 34 35 var r0 bool 36 if rf, ok := ret.Get(0).(func(common.VectorParty) bool); ok { 37 r0 = rf(other) 38 } else { 39 r0 = ret.Get(0).(bool) 40 } 41 42 return r0 43 } 44 45 // GetBytes provides a mock function with given fields: 46 func (_m *LiveVectorParty) GetBytes() int64 { 47 ret := _m.Called() 48 49 var r0 int64 50 if rf, ok := ret.Get(0).(func() int64); ok { 51 r0 = rf() 52 } else { 53 r0 = ret.Get(0).(int64) 54 } 55 56 return r0 57 } 58 59 // GetDataType provides a mock function with given fields: 60 func (_m *LiveVectorParty) GetDataType() common.DataType { 61 ret := _m.Called() 62 63 var r0 common.DataType 64 if rf, ok := ret.Get(0).(func() common.DataType); ok { 65 r0 = rf() 66 } else { 67 r0 = ret.Get(0).(common.DataType) 68 } 69 70 return r0 71 } 72 73 // GetDataValue provides a mock function with given fields: offset 74 func (_m *LiveVectorParty) GetDataValue(offset int) common.DataValue { 75 ret := _m.Called(offset) 76 77 var r0 common.DataValue 78 if rf, ok := ret.Get(0).(func(int) common.DataValue); ok { 79 r0 = rf(offset) 80 } else { 81 r0 = ret.Get(0).(common.DataValue) 82 } 83 84 return r0 85 } 86 87 // GetDataValueByRow provides a mock function with given fields: row 88 func (_m *LiveVectorParty) GetDataValueByRow(row int) common.DataValue { 89 ret := _m.Called(row) 90 91 var r0 common.DataValue 92 if rf, ok := ret.Get(0).(func(int) common.DataValue); ok { 93 r0 = rf(row) 94 } else { 95 r0 = ret.Get(0).(common.DataValue) 96 } 97 98 return r0 99 } 100 101 // GetLength provides a mock function with given fields: 102 func (_m *LiveVectorParty) GetLength() int { 103 ret := _m.Called() 104 105 var r0 int 106 if rf, ok := ret.Get(0).(func() int); ok { 107 r0 = rf() 108 } else { 109 r0 = ret.Get(0).(int) 110 } 111 112 return r0 113 } 114 115 // GetMinMaxValue provides a mock function with given fields: 116 func (_m *LiveVectorParty) GetMinMaxValue() (uint32, uint32) { 117 ret := _m.Called() 118 119 var r0 uint32 120 if rf, ok := ret.Get(0).(func() uint32); ok { 121 r0 = rf() 122 } else { 123 r0 = ret.Get(0).(uint32) 124 } 125 126 var r1 uint32 127 if rf, ok := ret.Get(1).(func() uint32); ok { 128 r1 = rf() 129 } else { 130 r1 = ret.Get(1).(uint32) 131 } 132 133 return r0, r1 134 } 135 136 // GetNonDefaultValueCount provides a mock function with given fields: 137 func (_m *LiveVectorParty) GetNonDefaultValueCount() int { 138 ret := _m.Called() 139 140 var r0 int 141 if rf, ok := ret.Get(0).(func() int); ok { 142 r0 = rf() 143 } else { 144 r0 = ret.Get(0).(int) 145 } 146 147 return r0 148 } 149 150 // GetValidity provides a mock function with given fields: offset 151 func (_m *LiveVectorParty) GetValidity(offset int) bool { 152 ret := _m.Called(offset) 153 154 var r0 bool 155 if rf, ok := ret.Get(0).(func(int) bool); ok { 156 r0 = rf(offset) 157 } else { 158 r0 = ret.Get(0).(bool) 159 } 160 161 return r0 162 } 163 164 // GetValue provides a mock function with given fields: offset 165 func (_m *LiveVectorParty) GetValue(offset int) (unsafe.Pointer, bool) { 166 ret := _m.Called(offset) 167 168 var r0 unsafe.Pointer 169 if rf, ok := ret.Get(0).(func(int) unsafe.Pointer); ok { 170 r0 = rf(offset) 171 } else { 172 r0 = ret.Get(0).(unsafe.Pointer) 173 } 174 175 var r1 bool 176 if rf, ok := ret.Get(1).(func(int) bool); ok { 177 r1 = rf(offset) 178 } else { 179 r1 = ret.Get(1).(bool) 180 } 181 182 return r0, r1 183 } 184 185 // Read provides a mock function with given fields: reader, serializer 186 func (_m *LiveVectorParty) Read(reader io.Reader, serializer common.VectorPartySerializer) error { 187 ret := _m.Called(reader, serializer) 188 189 var r0 error 190 if rf, ok := ret.Get(0).(func(io.Reader, common.VectorPartySerializer) error); ok { 191 r0 = rf(reader, serializer) 192 } else { 193 r0 = ret.Error(0) 194 } 195 196 return r0 197 } 198 199 // SafeDestruct provides a mock function with given fields: 200 func (_m *LiveVectorParty) SafeDestruct() { 201 _m.Called() 202 } 203 204 // SetBool provides a mock function with given fields: offset, val, valid 205 func (_m *LiveVectorParty) SetBool(offset int, val bool, valid bool) { 206 _m.Called(offset, val, valid) 207 } 208 209 // SetDataValue provides a mock function with given fields: offset, value, countsUpdateMode, counts 210 func (_m *LiveVectorParty) SetDataValue(offset int, value common.DataValue, countsUpdateMode common.ValueCountsUpdateMode, counts ...uint32) { 211 _va := make([]interface{}, len(counts)) 212 for _i := range counts { 213 _va[_i] = counts[_i] 214 } 215 var _ca []interface{} 216 _ca = append(_ca, offset, value, countsUpdateMode) 217 _ca = append(_ca, _va...) 218 _m.Called(_ca...) 219 } 220 221 // SetGoValue provides a mock function with given fields: offset, val, valid 222 func (_m *LiveVectorParty) SetGoValue(offset int, val common.GoDataValue, valid bool) { 223 _m.Called(offset, val, valid) 224 } 225 226 // SetValue provides a mock function with given fields: offset, val, valid 227 func (_m *LiveVectorParty) SetValue(offset int, val unsafe.Pointer, valid bool) { 228 _m.Called(offset, val, valid) 229 } 230 231 // Slice provides a mock function with given fields: startRow, numRows 232 func (_m *LiveVectorParty) Slice(startRow int, numRows int) common.SlicedVector { 233 ret := _m.Called(startRow, numRows) 234 235 var r0 common.SlicedVector 236 if rf, ok := ret.Get(0).(func(int, int) common.SlicedVector); ok { 237 r0 = rf(startRow, numRows) 238 } else { 239 r0 = ret.Get(0).(common.SlicedVector) 240 } 241 242 return r0 243 } 244 245 // Write provides a mock function with given fields: writer 246 func (_m *LiveVectorParty) Write(writer io.Writer) error { 247 ret := _m.Called(writer) 248 249 var r0 error 250 if rf, ok := ret.Get(0).(func(io.Writer) error); ok { 251 r0 = rf(writer) 252 } else { 253 r0 = ret.Error(0) 254 } 255 256 return r0 257 }