Documentation ¶
Index ¶
- type FileMock
- type HubMockServer
- type StorageMockServer
- func (m *StorageMockServer) Close()
- func (m *StorageMockServer) Host() string
- func (m *StorageMockServer) Init(files []FileMock) error
- func (m *StorageMockServer) IsDir(path string) bool
- func (m *StorageMockServer) IsFile(fileName string) bool
- func (m *StorageMockServer) PullURLs(paths []string) ([]*api.SignedURL, error)
- func (m *StorageMockServer) PushURLs(paths []string, force bool) ([]*api.SignedURL, error)
- func (m *StorageMockServer) SetMaxFailures(maxFailures int)
- func (m *StorageMockServer) URL() string
- func (m *StorageMockServer) YankURLs(paths []string) ([]*api.SignedURL, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HubMockServer ¶
type HubMockServer struct { Server *httptest.Server Handler http.Handler StorageServer *StorageMockServer }
func NewHubMockServer ¶
func NewHubMockServer(storageServer *StorageMockServer) *HubMockServer
func (*HubMockServer) Close ¶
func (m *HubMockServer) Close()
func (*HubMockServer) Host ¶
func (m *HubMockServer) Host() string
func (*HubMockServer) Init ¶
func (m *HubMockServer) Init()
func (*HubMockServer) URL ¶
func (m *HubMockServer) URL() string
type StorageMockServer ¶
type StorageMockServer struct { Server *httptest.Server Handler http.Handler StorageDirectory string MaxFailures int RequestCount int }
func NewStorageMockServer ¶
func NewStorageMockServer() (*StorageMockServer, error)
func (*StorageMockServer) Close ¶
func (m *StorageMockServer) Close()
func (*StorageMockServer) Host ¶
func (m *StorageMockServer) Host() string
func (*StorageMockServer) Init ¶
func (m *StorageMockServer) Init(files []FileMock) error
func (*StorageMockServer) IsDir ¶
func (m *StorageMockServer) IsDir(path string) bool
func (*StorageMockServer) IsFile ¶
func (m *StorageMockServer) IsFile(fileName string) bool
func (*StorageMockServer) PullURLs ¶
func (m *StorageMockServer) PullURLs(paths []string) ([]*api.SignedURL, error)
func (*StorageMockServer) SetMaxFailures ¶ added in v0.6.2
func (m *StorageMockServer) SetMaxFailures(maxFailures int)
func (*StorageMockServer) URL ¶
func (m *StorageMockServer) URL() string
Click to show internal directories.
Click to hide internal directories.