cobrax

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package cobrax contains helpers to use with github.com/spf13/cobra.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequireFlagOrCommand = errors.New("require flag or command")
)

Errors.

Functions

func NewGooseMySQLCmd

func NewGooseMySQLCmd(ctx context.Context, goose *goosepkg.Instance, getCfg func() (*GooseMySQLConfig, error)) *cobra.Command

NewGooseMySQLCmd creates new goose command executed by run.

func NewGoosePostgresCmd added in v0.4.0

func NewGoosePostgresCmd(ctx context.Context, goose *goosepkg.Instance, getCfg func() (*GoosePostgresConfig, error)) *cobra.Command

NewGoosePostgresCmd creates new goose command executed by run.

func RequireFlagOrCommand

func RequireFlagOrCommand(_ *cobra.Command, _ []string) error

RequireFlagOrCommand should be used as cobra.Command.RunE for "empty" commands which are just a containers for subcommands.

Types

type GooseMySQLConfig

type GooseMySQLConfig struct {
	MySQL         *mysql.Config
	GooseMySQLDir string
}

GooseMySQLConfig contain configuration for goose command.

type GoosePostgresConfig added in v0.4.0

type GoosePostgresConfig struct {
	Postgres         *def.PostgresConfig
	GoosePostgresDir string
}

GoosePostgresConfig contain configuration for goose command.

Jump to

Keyboard shortcuts

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