Documentation
¶
Index ¶
- Variables
- func NewCmdFresh() *cobra.Command
- func NewCmdMigrate(db *gorm.DB, production bool) *cobra.Command
- func NewCmdRefresh() *cobra.Command
- func NewCmdReset() *cobra.Command
- func NewCmdRollback() *cobra.Command
- func NewCmdUp() *cobra.Command
- type FreshOptions
- type Options
- type RefreshOptions
- type ResetOptions
- type RollbackOptions
- type UpOptions
Constants ¶
This section is empty.
Variables ¶
var (
ErrInProduction = errors.New("application in production, use --force or -f to confirm")
)
Functions ¶
func NewCmdFresh ¶
NewCmdFresh returns new initialized instance of 'fresh' sub command.
func NewCmdMigrate ¶
NewCmdMigrate returns new initialized instance of 'migrate' sub command.
func NewCmdRefresh ¶
NewCmdRefresh returns new initialized instance of 'refresh' sub command.
func NewCmdReset ¶
NewCmdReset returns new initialized instance of 'reset' sub command.
func NewCmdRollback ¶
NewCmdRollback returns new initialized instance of 'rollback' sub command.
Types ¶
type FreshOptions ¶
type FreshOptions struct { // Options *Options }
FreshOptions is an option struct to support 'fresh' sub command.
func NewFreshOptions ¶
func NewFreshOptions() *FreshOptions
NewFreshOptions returns an initialized FreshOptions instance.
func (*FreshOptions) Complete ¶
func (o *FreshOptions) Complete(cmd *cobra.Command, args []string) error
Complete completes all the required options.
func (*FreshOptions) Run ¶
func (o *FreshOptions) Run(args []string) error
Run executes a new sub command using the specified options.
type RefreshOptions ¶
type RefreshOptions struct { // Options *Options }
RefreshOptions is an option struct to support 'refresh' sub command.
func NewRefreshOptions ¶
func NewRefreshOptions() *RefreshOptions
NewRefreshOptions returns an initialized RefreshOptions instance.
func (*RefreshOptions) Complete ¶
func (o *RefreshOptions) Complete(cmd *cobra.Command, args []string) error
Complete completes all the required options.
func (*RefreshOptions) Run ¶
func (o *RefreshOptions) Run(args []string) error
Run executes a new sub command using the specified options.
type ResetOptions ¶
type ResetOptions struct { // Options *Options }
ResetOptions is an option struct to support 'reset' sub command.
func NewResetOptions ¶
func NewResetOptions() *ResetOptions
NewResetOptions returns an initialized ResetOptions instance.
func (*ResetOptions) Complete ¶
func (o *ResetOptions) Complete(cmd *cobra.Command, args []string) error
Complete completes all the required options.
func (*ResetOptions) Run ¶
func (o *ResetOptions) Run(args []string) error
Run executes a new sub command using the specified options.
type RollbackOptions ¶
type RollbackOptions struct { // Options *Options }
RollbackOptions is an option struct to support 'rollback' sub command.
func NewRollbackOptions ¶
func NewRollbackOptions() *RollbackOptions
NewRollbackOptions returns an initialized RollbackOptions instance.
func (*RollbackOptions) Complete ¶
func (o *RollbackOptions) Complete(cmd *cobra.Command, args []string) error
Complete completes all the required options.
func (*RollbackOptions) Run ¶
func (o *RollbackOptions) Run(args []string) error
Run executes a new sub command using the specified options.
type UpOptions ¶
type UpOptions struct { // Options *Options }
UpOptions is an option struct to support 'up' sub command.
func NewUpOptions ¶
func NewUpOptions() *UpOptions
NewUpOptions returns an initialized UpOptions instance.