db

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCommand

func BuildCommand() *cobra.Command

BuildCommand builds a parent command for all database-related subcommands

Types

type Clear

type Clear struct {
	command.ProjectPathCommand
}

Clear command for clearing database tables.

func (*Clear) BuildCobraCommand

func (c *Clear) BuildCobraCommand() *cobra.Command

BuildCobraCommand builds the cobra command for this action

func (*Clear) BuildSurvey

func (c *Clear) BuildSurvey() ([]*survey.Question, error)

BuildSurvey builds a survey for this action

func (*Clear) Execute

func (c *Clear) Execute() error

Execute the command's behavior

func (*Clear) Validate

func (c *Clear) Validate() error

Validate checks if required flags are definded

type Migrate

type Migrate struct {
	command.ProjectPathCommand
}

Migrate command for running auto migrations.

func (*Migrate) BuildCobraCommand

func (c *Migrate) BuildCobraCommand() *cobra.Command

BuildCobraCommand builds the cobra command for this action

func (*Migrate) BuildSurvey

func (c *Migrate) BuildSurvey() ([]*survey.Question, error)

BuildSurvey builds a survey for this action

func (*Migrate) Execute

func (c *Migrate) Execute() error

Execute the command's behavior

func (*Migrate) Validate

func (c *Migrate) Validate() error

Validate checks if required flags are definded

type Seed

type Seed struct {
	command.ProjectPathCommand
	ExportedFunctions []string
	Seeders           []string
}

Seed command for running seeders.

func (*Seed) BuildCobraCommand

func (c *Seed) BuildCobraCommand() *cobra.Command

BuildCobraCommand builds the cobra command for this action

func (*Seed) BuildSurvey

func (c *Seed) BuildSurvey() ([]*survey.Question, error)

BuildSurvey builds a survey for this action

func (*Seed) Execute

func (c *Seed) Execute() error

Execute the command's behavior

func (*Seed) Setup

func (c *Seed) Setup() (int, error)

Setup parse AST to find seeder functions.

func (*Seed) Validate

func (c *Seed) Validate() error

Validate checks if required flags are definded

Jump to

Keyboard shortcuts

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