mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-10 01:51:11 +09:00
26 lines
492 B
Go
26 lines
492 B
Go
package mock_transport
|
|
|
|
import (
|
|
"github.com/anyproto/any-sync/app"
|
|
"go.uber.org/mock/gomock"
|
|
)
|
|
|
|
func NewTransportComponent(ctrl *gomock.Controller, name string) TransportComponent {
|
|
return TransportComponent{
|
|
CName: name,
|
|
MockTransport: NewMockTransport(ctrl),
|
|
}
|
|
}
|
|
|
|
type TransportComponent struct {
|
|
CName string
|
|
*MockTransport
|
|
}
|
|
|
|
func (t TransportComponent) Init(a *app.App) (err error) {
|
|
return nil
|
|
}
|
|
|
|
func (t TransportComponent) Name() (name string) {
|
|
return t.CName
|
|
}
|