mocked_connections_test.go 864 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (C) 2016 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at https://mozilla.org/MPL/2.0/.
  6. package api
  7. import (
  8. "context"
  9. "github.com/syncthing/syncthing/lib/connections"
  10. )
  11. type mockedConnections struct{}
  12. func (m *mockedConnections) ListenerStatus() map[string]connections.ListenerStatusEntry {
  13. return nil
  14. }
  15. func (m *mockedConnections) ConnectionStatus() map[string]connections.ConnectionStatusEntry {
  16. return nil
  17. }
  18. func (m *mockedConnections) NATType() string {
  19. return ""
  20. }
  21. func (m *mockedConnections) Serve(ctx context.Context) error { return nil }
  22. func (m *mockedConnections) ExternalAddresses() []string { return nil }
  23. func (m *mockedConnections) AllAddresses() []string { return nil }