admin

package
v0.2.39 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitCmd = &cli.Command{
	Name:  "init",
	Usage: "Initialize the database",
	Action: func(context *cli.Context) error {
		db, err := database.OpenFromCLI(context)
		if err != nil {
			return err
		}
		return admin.InitHandler(db)
	},
}
View Source
var MigrateCmd = &cli.Command{
	Name:  "migrate",
	Usage: "Migrate data from old singularity mongodb",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:    "mongo-connection-string",
			Usage:   "MongoDB connection string",
			EnvVars: []string{"MONGO_CONNECTION_STRING"},
			Value:   "mongodb://localhost:27017",
		},
	},
}
View Source
var ResetCmd = &cli.Command{
	Name:  "reset",
	Usage: "Reset the database",
	Action: func(context *cli.Context) error {
		db, err := database.OpenFromCLI(context)
		if err != nil {
			return err
		}
		return admin.ResetHandler(db)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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