Documentation
¶
Overview ¶
Copyright 2025 The Swarm Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
- type MockCache
- type MockConfig
- type MockFileStorage
- func (m *MockFileStorage) Delete(_ context.Context, _ string) error
- func (m *MockFileStorage) Exists(_ context.Context, _ string) (bool, error)
- func (m *MockFileStorage) List(_ context.Context, _ string, _ bool) ([]string, error)
- func (m *MockFileStorage) Load(_ context.Context, _ string) ([]byte, error)
- func (m *MockFileStorage) Lock(_ context.Context, _ string) error
- func (m *MockFileStorage) Store(_ context.Context, _ string, _ []byte) error
- func (m *MockFileStorage) Unlock(_ context.Context, _ string) error
- type MockP2PForgeCertMgr
- func (m *MockP2PForgeCertMgr) AddressFactory() config.AddrsFactory
- func (m *MockP2PForgeCertMgr) GetCache() *MockCache
- func (m *MockP2PForgeCertMgr) SetOnCertLoaded(cb func())
- func (m *MockP2PForgeCertMgr) Start() error
- func (m *MockP2PForgeCertMgr) Stop()
- func (m *MockP2PForgeCertMgr) TLSConfig() *tls.Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCache ¶
type MockCache struct {
// contains filtered or unexported fields
}
MockCache is a minimal implementation of certmagic.Cache for testing.
func NewMockCache ¶
func NewMockCache() *MockCache
type MockConfig ¶
type MockConfig struct {
// contains filtered or unexported fields
}
MockConfig is a minimal implementation of certmagic.Config for testing.
func NewMockConfig ¶
func NewMockConfig() *MockConfig
func (*MockConfig) TLSConfig ¶
func (m *MockConfig) TLSConfig() *tls.Config
type MockFileStorage ¶
type MockFileStorage struct {
// contains filtered or unexported fields
}
MockFileStorage is a minimal implementation of certmagic.FileStorage for testing.
func NewMockFileStorage ¶
func NewMockFileStorage(path string) *MockFileStorage
func (*MockFileStorage) Delete ¶
func (m *MockFileStorage) Delete(_ context.Context, _ string) error
type MockP2PForgeCertMgr ¶
type MockP2PForgeCertMgr struct {
ProvideHost func(host.Host) error
// contains filtered or unexported fields
}
MockP2PForgeCertMgr is a mock implementation of p2pforge.P2PForgeCertMgr.
func NewMockP2PForgeCertMgr ¶
func NewMockP2PForgeCertMgr(onCertLoaded func()) *MockP2PForgeCertMgr
func (*MockP2PForgeCertMgr) AddressFactory ¶
func (m *MockP2PForgeCertMgr) AddressFactory() config.AddrsFactory
func (*MockP2PForgeCertMgr) GetCache ¶
func (m *MockP2PForgeCertMgr) GetCache() *MockCache
func (*MockP2PForgeCertMgr) SetOnCertLoaded ¶
func (m *MockP2PForgeCertMgr) SetOnCertLoaded(cb func())
func (*MockP2PForgeCertMgr) Start ¶
func (m *MockP2PForgeCertMgr) Start() error
func (*MockP2PForgeCertMgr) Stop ¶
func (m *MockP2PForgeCertMgr) Stop()
func (*MockP2PForgeCertMgr) TLSConfig ¶
func (m *MockP2PForgeCertMgr) TLSConfig() *tls.Config
Click to show internal directories.
Click to hide internal directories.