github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/network_security_metrics.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 mock "github.com/stretchr/testify/mock" 7 8 peer "github.com/libp2p/go-libp2p/core/peer" 9 ) 10 11 // NetworkSecurityMetrics is an autogenerated mock type for the NetworkSecurityMetrics type 12 type NetworkSecurityMetrics struct { 13 mock.Mock 14 } 15 16 // OnRateLimitedPeer provides a mock function with given fields: pid, role, msgType, topic, reason 17 func (_m *NetworkSecurityMetrics) OnRateLimitedPeer(pid peer.ID, role string, msgType string, topic string, reason string) { 18 _m.Called(pid, role, msgType, topic, reason) 19 } 20 21 // OnUnauthorizedMessage provides a mock function with given fields: role, msgType, topic, offense 22 func (_m *NetworkSecurityMetrics) OnUnauthorizedMessage(role string, msgType string, topic string, offense string) { 23 _m.Called(role, msgType, topic, offense) 24 } 25 26 // OnViolationReportSkipped provides a mock function with given fields: 27 func (_m *NetworkSecurityMetrics) OnViolationReportSkipped() { 28 _m.Called() 29 } 30 31 type mockConstructorTestingTNewNetworkSecurityMetrics interface { 32 mock.TestingT 33 Cleanup(func()) 34 } 35 36 // NewNetworkSecurityMetrics creates a new instance of NetworkSecurityMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 37 func NewNetworkSecurityMetrics(t mockConstructorTestingTNewNetworkSecurityMetrics) *NetworkSecurityMetrics { 38 mock := &NetworkSecurityMetrics{} 39 mock.Mock.Test(t) 40 41 t.Cleanup(func() { mock.AssertExpectations(t) }) 42 43 return mock 44 }