-
Notifications
You must be signed in to change notification settings - Fork 388
/
cli.go
50 lines (38 loc) · 1.25 KB
/
cli.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package subcmd
import (
"context"
"github.com/moby/buildkit/client"
"github.com/urfave/cli/v2"
"github.com/earthly/earthly/cloud"
"github.com/earthly/earthly/cmd/earthly/flag"
"github.com/earthly/earthly/config"
"github.com/earthly/earthly/conslogging"
"github.com/earthly/earthly/domain"
"github.com/earthly/earthly/logbus"
"github.com/earthly/earthly/logbus/setup"
)
type CLI interface {
App() *cli.App
Version() string
GitSHA() string
Flags() *flag.Global
Console() conslogging.ConsoleLogger
SetConsole(conslogging.ConsoleLogger)
InitFrontend(*cli.Context) error
Cfg() *config.Config
SetCommandName(name string)
SetAnaMetaTarget(domain.Target)
SetAnaMetaIsRemoteBK(bool)
SetAnaMetaBKPlatform(string)
SetAnaMetaUserPlatform(string)
IsUsingSatellite(*cli.Context) bool
OrgName() string
GetBuildkitClient(*cli.Context, *cloud.Client) (client *client.Client, cleanupTLS func(), err error)
GetSatelliteOrg(context.Context, *cloud.Client) (string, string, error)
ConfigureSatellite(*cli.Context, *cloud.Client, string, string) (cleanupTLS func(), err error)
CIHost() string
LogbusSetup() *setup.BusSetup
Logbus() *logbus.Bus
AddDeferredFunc(f func())
CollectBillingInfo(ctx context.Context, cloudClient *cloud.Client, orgName string) error
}