MCPcopy Create free account
hub / github.com/ethstorage/es-node / CLIFlags

Function CLIFlags

ethstorage/email/cli.go:25–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25func CLIFlags() []cli.Flag {
26 flag := []cli.Flag{
27 cli.StringFlag{
28 Name: EmailUsernameFlagName,
29 Usage: "Email username for notifications",
30 EnvVar: emailEnv("USERNAME"),
31 },
32 cli.StringFlag{
33 Name: EmailPasswordFlagName,
34 Usage: "Email password for notifications",
35 EnvVar: emailEnv("PASSWORD"),
36 },
37 cli.StringFlag{
38 Name: EmailHostFlagName,
39 Usage: "Email host for notifications",
40 Value: "smtp.gmail.com",
41 EnvVar: emailEnv("HOST"),
42 },
43 cli.Uint64Flag{
44 Name: EmailPortFlagName,
45 Usage: "Email port for notifications",
46 Value: 587,
47 EnvVar: emailEnv("PORT"),
48 },
49 cli.StringSliceFlag{
50 Name: EmailToFlagName,
51 Usage: "Email addresses to send notifications to",
52 EnvVar: emailEnv("TO"),
53 },
54 cli.StringFlag{
55 Name: EmailFromFlagName,
56 Usage: "Email address that will appear as the sender of the notifications",
57 EnvVar: emailEnv("FROM"),
58 },
59 }
60 return flag
61}
62
63func GetEmailConfig(ctx *cli.Context) (*EmailConfig, error) {
64 cfg := &EmailConfig{

Callers 2

initFunction · 0.92
mainFunction · 0.92

Calls 1

emailEnvFunction · 0.85

Tested by

no test coverage detected