2021-02-06 16:26:23 +00:00
|
|
|
// Package cli defines an interface CLI to run command line operations.
|
2020-06-02 23:03:18 +00:00
|
|
|
package cli
|
2020-02-08 21:50:17 +00:00
|
|
|
|
|
|
|
|
import (
|
2020-09-05 12:57:16 -04:00
|
|
|
"context"
|
2020-06-13 10:43:47 -04:00
|
|
|
|
2021-05-12 22:57:15 +00:00
|
|
|
"github.com/qdm12/golibs/logging"
|
2021-01-02 01:57:00 +00:00
|
|
|
"github.com/qdm12/golibs/os"
|
2021-07-22 20:45:17 +00:00
|
|
|
"github.com/qdm12/golibs/params"
|
2020-02-08 21:50:17 +00:00
|
|
|
)
|
|
|
|
|
|
2020-12-29 18:24:03 +00:00
|
|
|
type CLI interface {
|
|
|
|
|
ClientKey(args []string, openFile os.OpenFileFunc) error
|
2021-07-22 20:45:17 +00:00
|
|
|
HealthCheck(ctx context.Context, env params.Env, os os.OS, logger logging.Logger) error
|
2021-05-12 22:57:15 +00:00
|
|
|
OpenvpnConfig(os os.OS, logger logging.Logger) error
|
|
|
|
|
Update(ctx context.Context, args []string, os os.OS, logger logging.Logger) error
|
2020-06-13 10:43:47 -04:00
|
|
|
}
|
|
|
|
|
|
2020-12-29 18:24:03 +00:00
|
|
|
type cli struct{}
|
2020-09-12 14:04:54 -04:00
|
|
|
|
2020-12-29 18:24:03 +00:00
|
|
|
func New() CLI {
|
|
|
|
|
return &cli{}
|
2020-08-28 08:17:04 -04:00
|
|
|
}
|