github.com/aergoio/aergo@v1.3.1/p2p/p2pcommon/temptype.go (about)

     1  /*
     2   * @file
     3   * @copyright defined in aergo/LICENSE.txt
     4   */
     5  
     6  package p2pcommon
     7  
     8  // This file describe the command to generate mock objects of imported interfaces
     9  
    10  // in aergo but outside of p2p
    11  //go:generate sh -c "mockgen github.com/aergoio/aergo/types ChainAccessor | sed -e 's/[Pp]ackage mock_types/package p2pmock/g' > ../p2pmock/mock_chainaccessor.go"
    12  
    13  // in aergoio
    14  //go:generate sh -c "mockgen github.com/aergoio/aergo-actor/actor Context | sed -e 's/[Pp]ackage mock_actor/package p2pmock/g' > ../p2pmock/mock_actorcontext.go"
    15  
    16  //go:generate sh -c "mockgen github.com/aergoio/aergo/consensus ConsensusAccessor,AergoRaftAccessor | sed -e 's/^package mock_consensus/package p2pmock/g' > ../p2pmock/mock_consensus.go"
    17  
    18  // golang base
    19  //go:generate sh -c "mockgen io Reader,ReadCloser,Writer,WriteCloser,ReadWriteCloser | sed -e 's/^package mock_io/package p2pmock/g'  > ../p2pmock/mock_io.go"
    20  
    21  // libp2p
    22  //go:generate sh -c "mockgen github.com/libp2p/go-libp2p-core Host | sed -e 's/^package mock_go_libp2p_core/package p2pmock/g' > ../p2pmock/mock_host.go"
    23  
    24  //go:generate sh -c "mockgen github.com/libp2p/go-libp2p-core/network Stream | sed -e 's/^package mock_network/package p2pmock/g' > ../p2pmock/mock_stream.go"