common

package
v0.0.0-...-7b4befc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package common is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotEnoughServers    = errors.New("not enough servers found")
	ErrHTTPStatusCodeNotOK = errors.New("HTTP status code not OK")
)

Functions

This section is empty.

Types

type Fetcher

type Fetcher interface {
	FetchServers(ctx context.Context, minServers int) (servers []models.Server, err error)
}

type IPFetcher

type IPFetcher interface {
	FetchInfo(ctx context.Context, ip netip.Addr) (result models.PublicIP, err error)
}

type MockParallelResolver

type MockParallelResolver struct {
	// contains filtered or unexported fields
}

MockParallelResolver is a mock of ParallelResolver interface.

func NewMockParallelResolver

func NewMockParallelResolver(ctrl *gomock.Controller) *MockParallelResolver

NewMockParallelResolver creates a new mock instance.

func (*MockParallelResolver) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockParallelResolver) Resolve

Resolve mocks base method.

type MockParallelResolverMockRecorder

type MockParallelResolverMockRecorder struct {
	// contains filtered or unexported fields
}

MockParallelResolverMockRecorder is the mock recorder for MockParallelResolver.

func (*MockParallelResolverMockRecorder) Resolve

func (mr *MockParallelResolverMockRecorder) Resolve(arg0, arg1 interface{}) *gomock.Call

Resolve indicates an expected call of Resolve.

type MockStorage

type MockStorage struct {
	// contains filtered or unexported fields
}

MockStorage is a mock of Storage interface.

func NewMockStorage

func NewMockStorage(ctrl *gomock.Controller) *MockStorage

NewMockStorage creates a new mock instance.

func (*MockStorage) EXPECT

func (m *MockStorage) EXPECT() *MockStorageMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStorage) FilterServers

func (m *MockStorage) FilterServers(arg0 string, arg1 settings.ServerSelection) ([]models.Server, error)

FilterServers mocks base method.

func (*MockStorage) GetServerByName

func (m *MockStorage) GetServerByName(arg0, arg1 string) (models.Server, bool)

GetServerByName mocks base method.

type MockStorageMockRecorder

type MockStorageMockRecorder struct {
	// contains filtered or unexported fields
}

MockStorageMockRecorder is the mock recorder for MockStorage.

func (*MockStorageMockRecorder) FilterServers

func (mr *MockStorageMockRecorder) FilterServers(arg0, arg1 interface{}) *gomock.Call

FilterServers indicates an expected call of FilterServers.

func (*MockStorageMockRecorder) GetServerByName

func (mr *MockStorageMockRecorder) GetServerByName(arg0, arg1 interface{}) *gomock.Call

GetServerByName indicates an expected call of GetServerByName.

type MockUnzipper

type MockUnzipper struct {
	// contains filtered or unexported fields
}

MockUnzipper is a mock of Unzipper interface.

func NewMockUnzipper

func NewMockUnzipper(ctrl *gomock.Controller) *MockUnzipper

NewMockUnzipper creates a new mock instance.

func (*MockUnzipper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUnzipper) FetchAndExtract

func (m *MockUnzipper) FetchAndExtract(arg0 context.Context, arg1 string) (map[string][]byte, error)

FetchAndExtract mocks base method.

type MockUnzipperMockRecorder

type MockUnzipperMockRecorder struct {
	// contains filtered or unexported fields
}

MockUnzipperMockRecorder is the mock recorder for MockUnzipper.

func (*MockUnzipperMockRecorder) FetchAndExtract

func (mr *MockUnzipperMockRecorder) FetchAndExtract(arg0, arg1 interface{}) *gomock.Call

FetchAndExtract indicates an expected call of FetchAndExtract.

type MockWarner

type MockWarner struct {
	// contains filtered or unexported fields
}

MockWarner is a mock of Warner interface.

func NewMockWarner

func NewMockWarner(ctrl *gomock.Controller) *MockWarner

NewMockWarner creates a new mock instance.

func (*MockWarner) EXPECT

func (m *MockWarner) EXPECT() *MockWarnerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockWarner) Warn

func (m *MockWarner) Warn(arg0 string)

Warn mocks base method.

type MockWarnerMockRecorder

type MockWarnerMockRecorder struct {
	// contains filtered or unexported fields
}

MockWarnerMockRecorder is the mock recorder for MockWarner.

func (*MockWarnerMockRecorder) Warn

func (mr *MockWarnerMockRecorder) Warn(arg0 interface{}) *gomock.Call

Warn indicates an expected call of Warn.

type ParallelResolver

type ParallelResolver interface {
	Resolve(ctx context.Context, settings resolver.ParallelSettings) (
		hostToIPs map[string][]netip.Addr, warnings []string, err error)
}

type Storage

type Storage interface {
	FilterServers(provider string, selection settings.ServerSelection) (
		servers []models.Server, err error)
	GetServerByName(provider, name string) (server models.Server, ok bool)
}

type Unzipper

type Unzipper interface {
	FetchAndExtract(ctx context.Context, url string) (
		contents map[string][]byte, err error)
}

type Warner

type Warner interface {
	Warn(s string)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL