chore(all): remove unexported interfaces

This commit is contained in:
Quentin McGaw
2022-06-12 00:57:37 +00:00
parent 89277828ac
commit bda6707685
18 changed files with 37 additions and 113 deletions

View File

@@ -27,7 +27,7 @@ func (p *Provider) GetConnection(selection settings.ServerSelection) (
}
}
func getOpenVPNConnection(extractor extractor,
func getOpenVPNConnection(extractor Extractor,
selection settings.ServerSelection) (
connection models.Connection, err error) {
_, connection, err = extractor.Data(*selection.OpenVPN.ConfFile)

View File

@@ -2,7 +2,7 @@ package custom
import "github.com/qdm12/gluetun/internal/models"
type extractor interface {
type Extractor interface {
Data(filepath string) (lines []string,
connection models.Connection, err error)
}

View File

@@ -2,20 +2,19 @@ package custom
import (
"github.com/qdm12/gluetun/internal/constants/providers"
"github.com/qdm12/gluetun/internal/openvpn/extract"
"github.com/qdm12/gluetun/internal/provider/common"
"github.com/qdm12/gluetun/internal/provider/utils"
)
type Provider struct {
extractor extractor
extractor Extractor
utils.NoPortForwarder
common.Fetcher
}
func New() *Provider {
func New(extractor Extractor) *Provider {
return &Provider{
extractor: extract.New(),
extractor: extractor,
NoPortForwarder: utils.NewNoPortForwarding(providers.Custom),
Fetcher: utils.NewNoFetcher(providers.Custom),
}