cmd

package
v0.0.0-...-759a9f7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryMysqlCmdE

func QueryMysqlCmdE(c *CLI, opts QueryOpts) (err error)

QueryMysqlCmdE runs a command

func RunVersionCmdE

func RunVersionCmdE(cmd *cobra.Command, args []string) (err error)

RunVersionCmdE runs the command to generate the cli docs

func SessionMysqlCmdE

func SessionMysqlCmdE(c *CLI, opts SessionOpts) (err error)

SessionMysqlCmdE runs a command

Types

type CLI

type CLI struct {
	DBHost, DBUser, DBPass, DBPort string
	Version                        string
	// contains filtered or unexported fields
}

CLI are the global args

func (*CLI) Execute

func (c *CLI) Execute(ctx context.Context) error

Execute starts the CLI.

func (*CLI) Setup

func (ropts *CLI) Setup() (err error)

Setup initializes connections to MySQL, MongoDB, and METRC

func (*CLI) SetupLogToFile

func (c *CLI) SetupLogToFile(baseFilenameNoExt string) error

SetupLogToFile sets up logging to std out and file simulataneously

func (*CLI) Teardown

func (ropts *CLI) Teardown()

Teardown tears down connections

type QueryOpts

type QueryOpts struct {
	InFile                       string
	ExecuteStatementAtLineNumber int
	CreateNewFile                bool
	DoNotReopenResultFile        bool
}

type SessionOpts

type SessionOpts struct{}

Jump to

Keyboard shortcuts

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