provider

package
v0.0.0-...-ddd9f4d Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

type Extractor interface {
	Data(filepath string) (lines []string,
		connection models.Connection, err error)
}

type Provider

type Provider interface {
	GetConnection(selection settings.ServerSelection, ipv6Supported bool) (connection models.Connection, err error)
	OpenVPNConfig(connection models.Connection, settings settings.OpenVPN, ipv6Supported bool) (lines []string)
	Name() string
	FetchServers(ctx context.Context, minServers int) (
		servers []models.Server, err error)
}

Provider contains methods to read and modify the openvpn configuration to connect as a client.

type Providers

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

func NewProviders

func NewProviders(storage Storage, timeNow func() time.Time,
	updaterWarner common.Warner, client *http.Client, unzipper common.Unzipper,
	parallelResolver common.ParallelResolver, ipFetcher common.IPFetcher,
	extractor custom.Extractor,
) *Providers

func (*Providers) Get

func (p *Providers) Get(providerName string) (provider Provider)

type Storage

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

Jump to

Keyboard shortcuts

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