github.com/rohankumardubey/aresdb@v0.0.2-0.20190517170215-e54e3ca06b9c/memstore/mocks/PrimaryKey.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  
    15  // Code generated by mockery v1.0.0. DO NOT EDIT.
    16  package mocks
    17  
    18  import memstore "github.com/uber/aresdb/memstore"
    19  import mock "github.com/stretchr/testify/mock"
    20  
    21  // PrimaryKey is an autogenerated mock type for the PrimaryKey type
    22  type PrimaryKey struct {
    23  	mock.Mock
    24  }
    25  
    26  // AllocatedBytes provides a mock function with given fields:
    27  func (_m *PrimaryKey) AllocatedBytes() uint {
    28  	ret := _m.Called()
    29  
    30  	var r0 uint
    31  	if rf, ok := ret.Get(0).(func() uint); ok {
    32  		r0 = rf()
    33  	} else {
    34  		r0 = ret.Get(0).(uint)
    35  	}
    36  
    37  	return r0
    38  }
    39  
    40  // Capacity provides a mock function with given fields:
    41  func (_m *PrimaryKey) Capacity() uint {
    42  	ret := _m.Called()
    43  
    44  	var r0 uint
    45  	if rf, ok := ret.Get(0).(func() uint); ok {
    46  		r0 = rf()
    47  	} else {
    48  		r0 = ret.Get(0).(uint)
    49  	}
    50  
    51  	return r0
    52  }
    53  
    54  // Delete provides a mock function with given fields: key
    55  func (_m *PrimaryKey) Delete(key memstore.Key) {
    56  	_m.Called(key)
    57  }
    58  
    59  // Destruct provides a mock function with given fields:
    60  func (_m *PrimaryKey) Destruct() {
    61  	_m.Called()
    62  }
    63  
    64  // Find provides a mock function with given fields: key
    65  func (_m *PrimaryKey) Find(key memstore.Key) (memstore.RecordID, bool) {
    66  	ret := _m.Called(key)
    67  
    68  	var r0 memstore.RecordID
    69  	if rf, ok := ret.Get(0).(func(memstore.Key) memstore.RecordID); ok {
    70  		r0 = rf(key)
    71  	} else {
    72  		r0 = ret.Get(0).(memstore.RecordID)
    73  	}
    74  
    75  	var r1 bool
    76  	if rf, ok := ret.Get(1).(func(memstore.Key) bool); ok {
    77  		r1 = rf(key)
    78  	} else {
    79  		r1 = ret.Get(1).(bool)
    80  	}
    81  
    82  	return r0, r1
    83  }
    84  
    85  // FindOrInsert provides a mock function with given fields: key, value, eventTime
    86  func (_m *PrimaryKey) FindOrInsert(key memstore.Key, value memstore.RecordID, eventTime uint32) (bool, memstore.RecordID, error) {
    87  	ret := _m.Called(key, value, eventTime)
    88  
    89  	var r0 bool
    90  	if rf, ok := ret.Get(0).(func(memstore.Key, memstore.RecordID, uint32) bool); ok {
    91  		r0 = rf(key, value, eventTime)
    92  	} else {
    93  		r0 = ret.Get(0).(bool)
    94  	}
    95  
    96  	var r1 memstore.RecordID
    97  	if rf, ok := ret.Get(1).(func(memstore.Key, memstore.RecordID, uint32) memstore.RecordID); ok {
    98  		r1 = rf(key, value, eventTime)
    99  	} else {
   100  		r1 = ret.Get(1).(memstore.RecordID)
   101  	}
   102  
   103  	var r2 error
   104  	if rf, ok := ret.Get(2).(func(memstore.Key, memstore.RecordID, uint32) error); ok {
   105  		r2 = rf(key, value, eventTime)
   106  	} else {
   107  		r2 = ret.Error(2)
   108  	}
   109  
   110  	return r0, r1, r2
   111  }
   112  
   113  // GetEventTimeCutoff provides a mock function with given fields:
   114  func (_m *PrimaryKey) GetEventTimeCutoff() uint32 {
   115  	ret := _m.Called()
   116  
   117  	var r0 uint32
   118  	if rf, ok := ret.Get(0).(func() uint32); ok {
   119  		r0 = rf()
   120  	} else {
   121  		r0 = ret.Get(0).(uint32)
   122  	}
   123  
   124  	return r0
   125  }
   126  
   127  // LockForTransfer provides a mock function with given fields:
   128  func (_m *PrimaryKey) LockForTransfer() memstore.PrimaryKeyData {
   129  	ret := _m.Called()
   130  
   131  	var r0 memstore.PrimaryKeyData
   132  	if rf, ok := ret.Get(0).(func() memstore.PrimaryKeyData); ok {
   133  		r0 = rf()
   134  	} else {
   135  		r0 = ret.Get(0).(memstore.PrimaryKeyData)
   136  	}
   137  
   138  	return r0
   139  }
   140  
   141  // Size provides a mock function with given fields:
   142  func (_m *PrimaryKey) Size() uint {
   143  	ret := _m.Called()
   144  
   145  	var r0 uint
   146  	if rf, ok := ret.Get(0).(func() uint); ok {
   147  		r0 = rf()
   148  	} else {
   149  		r0 = ret.Get(0).(uint)
   150  	}
   151  
   152  	return r0
   153  }
   154  
   155  // UnlockAfterTransfer provides a mock function with given fields:
   156  func (_m *PrimaryKey) UnlockAfterTransfer() {
   157  	_m.Called()
   158  }
   159  
   160  // Update provides a mock function with given fields: key, value
   161  func (_m *PrimaryKey) Update(key memstore.Key, value memstore.RecordID) bool {
   162  	ret := _m.Called(key, value)
   163  
   164  	var r0 bool
   165  	if rf, ok := ret.Get(0).(func(memstore.Key, memstore.RecordID) bool); ok {
   166  		r0 = rf(key, value)
   167  	} else {
   168  		r0 = ret.Get(0).(bool)
   169  	}
   170  
   171  	return r0
   172  }
   173  
   174  // UpdateEventTimeCutoff provides a mock function with given fields: eventTimeCutoff
   175  func (_m *PrimaryKey) UpdateEventTimeCutoff(eventTimeCutoff uint32) {
   176  	_m.Called(eventTimeCutoff)
   177  }