mockgen.go 6.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //go:build gomock || generate
  2. package quic
  3. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_send_conn_test.go github.com/Psiphon-Labs/quic-go SendConn"
  4. type SendConn = sendConn
  5. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_sender_test.go github.com/Psiphon-Labs/quic-go Sender"
  6. type Sender = sender
  7. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_stream_internal_test.go github.com/Psiphon-Labs/quic-go StreamI"
  8. type StreamI = streamI
  9. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_crypto_stream_test.go github.com/Psiphon-Labs/quic-go CryptoStream"
  10. type CryptoStream = cryptoStream
  11. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_receive_stream_internal_test.go github.com/Psiphon-Labs/quic-go ReceiveStreamI"
  12. type ReceiveStreamI = receiveStreamI
  13. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_send_stream_internal_test.go github.com/Psiphon-Labs/quic-go SendStreamI"
  14. type SendStreamI = sendStreamI
  15. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_stream_getter_test.go github.com/Psiphon-Labs/quic-go StreamGetter"
  16. type StreamGetter = streamGetter
  17. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_stream_sender_test.go github.com/Psiphon-Labs/quic-go StreamSender"
  18. type StreamSender = streamSender
  19. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_crypto_data_handler_test.go github.com/Psiphon-Labs/quic-go CryptoDataHandler"
  20. type CryptoDataHandler = cryptoDataHandler
  21. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_frame_source_test.go github.com/Psiphon-Labs/quic-go FrameSource"
  22. type FrameSource = frameSource
  23. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_ack_frame_source_test.go github.com/Psiphon-Labs/quic-go AckFrameSource"
  24. type AckFrameSource = ackFrameSource
  25. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_stream_manager_test.go github.com/Psiphon-Labs/quic-go StreamManager"
  26. type StreamManager = streamManager
  27. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_sealing_manager_test.go github.com/Psiphon-Labs/quic-go SealingManager"
  28. type SealingManager = sealingManager
  29. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_unpacker_test.go github.com/Psiphon-Labs/quic-go Unpacker"
  30. type Unpacker = unpacker
  31. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_packer_test.go github.com/Psiphon-Labs/quic-go Packer"
  32. type Packer = packer
  33. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_mtu_discoverer_test.go github.com/Psiphon-Labs/quic-go MTUDiscoverer"
  34. type MTUDiscoverer = mtuDiscoverer
  35. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_conn_runner_test.go github.com/Psiphon-Labs/quic-go ConnRunner"
  36. type ConnRunner = connRunner
  37. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_quic_conn_test.go github.com/Psiphon-Labs/quic-go QUICConn"
  38. type QUICConn = quicConn
  39. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_packet_handler_test.go github.com/Psiphon-Labs/quic-go PacketHandler"
  40. type PacketHandler = packetHandler
  41. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_unknown_packet_handler_test.go github.com/Psiphon-Labs/quic-go UnknownPacketHandler"
  42. type UnknownPacketHandler = unknownPacketHandler
  43. //go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/Psiphon-Labs/quic-go -destination mock_packet_handler_manager_test.go github.com/Psiphon-Labs/quic-go PacketHandlerManager"
  44. type PacketHandlerManager = packetHandlerManager
  45. // Need to use source mode for the batchConn, since reflect mode follows type aliases.
  46. // See https://github.com/golang/mock/issues/244 for details.
  47. //
  48. //go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/Psiphon-Labs/quic-go -source sys_conn_oob.go -destination mock_batch_conn_test.go -mock_names batchConn=MockBatchConn"
  49. //go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/Psiphon-Labs/quic-go -self_package github.com/Psiphon-Labs/quic-go -destination mock_token_store_test.go github.com/Psiphon-Labs/quic-go TokenStore"
  50. //go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/Psiphon-Labs/quic-go -self_package github.com/Psiphon-Labs/quic-go -destination mock_packetconn_test.go net PacketConn"