soda

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCouldNotFindConnection = errors.New("could not find connection by name")
	ErrNotEnoughArgs          = errors.New("not enough args, please specify direction p.e ox pop migrate up")
	ErrInvalidInstruction     = errors.New("invalid instruction for migrate command")
)

Functions

func Plugins

func Plugins(migrations fs.FS) []core.Plugin

Types

type Command

type Command struct {
	*Logger
	// contains filtered or unexported fields
}

func NewCommand added in v0.12.0

func NewCommand(folder fs.FS) *Command

func (*Command) Flags

func (m *Command) Flags() *pflag.FlagSet

func (Command) HelpText

func (m Command) HelpText() string

HelpText returns the help Text of build function

func (*Command) Name

func (m *Command) Name() string

func (*Command) ParentName

func (m *Command) ParentName() string

func (*Command) ParseFlags

func (m *Command) ParseFlags(args []string)

func (*Command) Reset added in v0.12.1

func (mu *Command) Reset(ctx context.Context, conn *pop.Connection) error

func (*Command) Run

func (m *Command) Run(ctx context.Context, root string, args []string) error

func (*Command) RunBeforeTest

func (mu *Command) RunBeforeTest(ctx context.Context, root string, args []string) error

func (*Command) RunDown

func (mu *Command) RunDown() error

RunDown will run migrations on the current folder, it will look for the migrations folder and attempt to run the migrations using internal pop tooling

func (*Command) RunUp

func (mu *Command) RunUp() error

Run will run migrations on the current folder, it will look for the migrations folder and attempt to run the migrations using internal pop tooling

type Creator

type Creator interface {
	// Receives a migration type string and returns if it
	// applies to it or not.
	Creates(string) bool

	// Creates the migration.
	Create(dir, name string, args []string) error
}

type Creators

type Creators []Creator

func (Creators) CreatorFor

func (c Creators) CreatorFor(name string) Creator

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator allows to identify model as a plugin

func (*Generator) Flags

func (g *Generator) Flags() *pflag.FlagSet

func (Generator) Generate

func (g Generator) Generate(ctx context.Context, root string, args []string) error

Generate generates an empty [name].plush.html file

func (Generator) InvocationName

func (g Generator) InvocationName() string

InvocationName is used to identify the generator when the generate command is called.

func (Generator) Name

func (g Generator) Name() string

Name returns the name of the plugin

func (*Generator) ParseFlags

func (g *Generator) ParseFlags(args []string)

func (*Generator) Receive

func (g *Generator) Receive(pls []core.Plugin)

type Initializer

type Initializer struct{}

func (Initializer) Initialize

func (in Initializer) Initialize(ctx context.Context, options new.Options) error

func (Initializer) Name

func (in Initializer) Name() string

type Logger

type Logger struct{}

func (*Logger) Log

func (l *Logger) Log(lvl logging.Level, s string, args ...interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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