cmd

package
v0.0.0-...-45c2084 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FlagPostgresDSN = &cli.StringFlag{
		Name:    "pg-dsn",
		Usage:   "postgres database connection string",
		Aliases: []string{"psn"},
		EnvVars: []string{"PG_DSN"},
		Value:   "postgres://localhost:5432/alice?sslmode=disable&timezone=utc",
	}

	FlagSseKey = &cli.StringFlag{
		Name:    "sse-key",
		Usage:   "key for server-side database column encryption",
		EnvVars: []string{"SSE_KEY"},
		Value:   "c72bd6f32260c5c19ac4d5e2617bcc097ca40470c26c5c0bd3c7ff8c0297476e547905043cdf8c90637d72b41086135fccd727bf16bc622b12dff46593ab4ecd",
	}
)
View Source
var (
	FlagServerAddress = &cli.StringFlag{
		Name:    "address",
		Aliases: []string{"a"},
		EnvVars: []string{"ADDRESS"},
		Value:   "0.0.0.0:8080",
	}

	FlagServerCookieDomain = &cli.StringFlag{
		Name:    "cookie-domain",
		EnvVars: []string{"COOKIE_DOMAIN"},
	}

	FlagServerCookieSecure = &cli.BoolFlag{
		Name:    "cookie-secure",
		EnvVars: []string{"COOKIE_SECURE"},
	}

	FlagServerJwtKey = &cli.StringFlag{
		Name:    "jwt-key",
		Value:   "60582546f144e604e4a11c927bcf8bd82a0d7bbd4a31eeaa69ce11d69acd0a4a",
		EnvVars: []string{"JWT_KEY"},
	}

	FlagServerAllowOrigin = &cli.StringSliceFlag{
		Name:    "allow-origin",
		Aliases: []string{"ao"},
		EnvVars: []string{"ALLOW_ORIGIN"},
		Value: cli.NewStringSlice(
			"http://localhost:3000",
			"http://0.0.0.0:3000",
			"http://192.168.1.2:3000",
		),
	}

	FlagServerBackupUrl = &cli.StringFlag{
		Name:  "backup-url",
		Value: "http://localhost:3000/backup.html",
	}

	FlagServerVer666 = &cli.BoolFlag{
		Name:    "ver666",
		EnvVars: []string{"VER666"},
	}

	FlagServerMountCypress = &cli.BoolFlag{
		Name:    "mount-cypress",
		Usage:   "mount cypress endpoints for test cases only",
		EnvVars: []string{"MOUNT_CYPRESS"},
	}

	FlagServerSentryDsn = &cli.StringFlag{
		Name:    "sentry-dsn",
		Usage:   "sentry dsn for error monitoring",
		EnvVars: []string{"SENTRY_DSN"},
	}
)
View Source
var (
	FlagProduction = &cli.BoolFlag{
		Name:    "production",
		EnvVars: []string{"PRODUCTION"},
	}
)

Functions

func BeforeAll

func BeforeAll(actions ...cli.BeforeFunc) cli.BeforeFunc

func BeforeGoose

func BeforeGoose(ctx *cli.Context) error

func BeforeServerProduction

func BeforeServerProduction(ctx *cli.Context) error

func BeforeStore

func BeforeStore(ctx *cli.Context) error

func BeforeStoreProduction

func BeforeStoreProduction(ctx *cli.Context) error

func GooseDOWN

func GooseDOWN(ctx *cli.Context) error

func GooseStatus

func GooseStatus(ctx *cli.Context) error

func GooseUP

func GooseUP(ctx *cli.Context) error

func Server

func Server(ctx *cli.Context) error

Types

type Context

type Context struct {
	*cli.Context
}

func Ctx

func Ctx(ctx *cli.Context) *Context

func (*Context) GetStore

func (c *Context) GetStore() *storage.Storage

func (*Context) SetStore

func (c *Context) SetStore(store *storage.Storage)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL