chore(all): remove unexported interfaces
This commit is contained in:
@@ -2,29 +2,9 @@ package portforward
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
)
|
||||
|
||||
type PortAllower interface {
|
||||
SetAllowedPort(ctx context.Context, port uint16, intf string) (err error)
|
||||
RemoveAllowedPort(ctx context.Context, port uint16) (err error)
|
||||
}
|
||||
|
||||
type statusManager interface {
|
||||
GetStatus() (status models.LoopStatus)
|
||||
SetStatus(status models.LoopStatus)
|
||||
ApplyStatus(ctx context.Context, status models.LoopStatus) (
|
||||
outcome string, err error)
|
||||
}
|
||||
|
||||
type StateManager interface {
|
||||
GetSettings() (settings settings.PortForwarding)
|
||||
SetSettings(ctx context.Context,
|
||||
settings settings.PortForwarding) (outcome string)
|
||||
GetPortForwarded() (port uint16)
|
||||
SetPortForwarded(port uint16)
|
||||
GetStartData() (startData StartData)
|
||||
SetStartData(startData StartData)
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
)
|
||||
|
||||
type Loop struct {
|
||||
statusManager statusManager
|
||||
state StateManager
|
||||
statusManager *loopstate.State
|
||||
state *state.State
|
||||
// Objects
|
||||
client *http.Client
|
||||
portAllower PortAllower
|
||||
|
||||
Reference in New Issue
Block a user