Files
gluetun/internal/cli/cli.go
Quentin McGaw (desktop) 21f4cf7ab5 Maint: do not mock os functions
- Use filepaths with /tmp for tests instead
- Only mock functions where filepath can't be specified such as user.Lookup
2021-07-23 16:06:19 +00:00

27 lines
567 B
Go

// Package cli defines an interface CLI to run command line operations.
package cli
import (
"context"
"github.com/qdm12/golibs/logging"
"github.com/qdm12/golibs/params"
)
type CLI interface {
ClientKey(args []string) error
HealthCheck(ctx context.Context, env params.Env, logger logging.Logger) error
OpenvpnConfig(logger logging.Logger) error
Update(ctx context.Context, args []string, logger logging.Logger) error
}
type cli struct {
repoServersPath string
}
func New() CLI {
return &cli{
repoServersPath: "./internal/constants/servers.json",
}
}