make

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdBiz

func NewCmdBiz() *cobra.Command

NewCmdBiz returns new initialized instance of 'biz' sub command.

func NewCmdCMD

func NewCmdCMD() *cobra.Command

NewCmdCMD returns new initialized instance of 'cmd' sub command.

func NewCmdController

func NewCmdController() *cobra.Command

NewCmdController returns new initialized instance of 'controller' sub command.

func NewCmdCrud

func NewCmdCrud() *cobra.Command

NewCmdCrud returns new initialized instance of 'crud' sub command.

func NewCmdMake

func NewCmdMake() *cobra.Command

NewCmdMake returns new initialized instance of 'new' sub command.

func NewCmdMiddleware

func NewCmdMiddleware() *cobra.Command

NewCmdMiddleware returns new initialized instance of 'middleware' sub command.

func NewCmdModel

func NewCmdModel() *cobra.Command

NewCmdModel returns new initialized instance of 'model' sub command.

func NewCmdRequest

func NewCmdRequest() *cobra.Command

NewCmdRequest returns new initialized instance of 'request' sub command.

func NewCmdStore

func NewCmdStore() *cobra.Command

NewCmdStore returns new initialized instance of 'store' sub command.

Types

type BizOptions

type BizOptions struct {
	*Options

	RootPackage string
	StorePath   string
	RequestPath string
	ModelPath   string
	ModelName   string
}

BizOptions is an option struct to support 'biz' sub command.

func NewBizOptions

func NewBizOptions() *BizOptions

NewBizOptions returns an initialized BizOptions instance.

func (*BizOptions) Complete

func (o *BizOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*BizOptions) Run

func (o *BizOptions) Run(args []string) error

Run executes a new sub command using the specified options.

func (*BizOptions) Validate

func (o *BizOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepancy in command options.

type CmdOptions

type CmdOptions struct {
	*Options

	// Command template options
	CommandDescription string
}

CmdOptions is an option struct to support 'cmd' sub command.

func NewCmdOptions

func NewCmdOptions() *CmdOptions

NewCmdOptions returns an initialized CmdOptions instance.

func (*CmdOptions) Complete

func (o *CmdOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*CmdOptions) Run

func (o *CmdOptions) Run(args []string) error

Run executes a new sub command using the specified options.

func (*CmdOptions) Validate

func (o *CmdOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepancy in command options.

type ControllerOptions

type ControllerOptions struct {
	*Options

	RootPackage string
	BizPath     string
	StorePath   string
	RequestPath string
	ModelPath   string
	ModelName   string
}

ControllerOptions is an option struct to support 'controller' sub command.

func NewControllerOptions

func NewControllerOptions() *ControllerOptions

NewControllerOptions returns an initialized ControllerOptions instance.

func (*ControllerOptions) Complete

func (o *ControllerOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*ControllerOptions) Run

func (o *ControllerOptions) Run(args []string) error

Run executes a new sub command using the specified options.

func (*ControllerOptions) Validate

func (o *ControllerOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepancy in command options.

type CrudOptions

type CrudOptions struct {
	*Options

	RootPackage string
	BizPath     string
	StorePath   string
	RequestPath string
	ModelPath   string
	ModelName   string
}

CrudOptions is an option struct to support 'crud' sub command.

func NewCrudOptions

func NewCrudOptions() *CrudOptions

NewCrudOptions returns an initialized CrudOptions instance.

func (*CrudOptions) Complete

func (o *CrudOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*CrudOptions) Run

func (o *CrudOptions) Run(args []string) error

Run executes a new sub command using the specified options.

func (*CrudOptions) Validate

func (o *CrudOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepancy in command options.

type MiddlewareOptions

type MiddlewareOptions struct {
	*Options
}

MiddlewareOptions is an option struct to support 'middleware' sub command.

func NewMiddlewareOptions

func NewMiddlewareOptions() *MiddlewareOptions

NewMiddlewareOptions returns an initialized MiddlewareOptions instance.

func (*MiddlewareOptions) Complete

func (o *MiddlewareOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*MiddlewareOptions) Run

func (o *MiddlewareOptions) Run(args []string) error

Run executes a new sub command using the specified options.

func (*MiddlewareOptions) Validate

func (o *MiddlewareOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepancy in command options.

type ModelOptions

type ModelOptions struct {
	*Options
}

ModelOptions is an option struct to support 'model' sub command.

func NewModelOptions

func NewModelOptions() *ModelOptions

NewModelOptions returns an initialized ModelOptions instance.

func (*ModelOptions) Complete

func (o *ModelOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*ModelOptions) Run

func (o *ModelOptions) Run(args []string) error

Run executes a new sub command using the specified options.

func (*ModelOptions) Validate

func (o *ModelOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepancy in command options.

type Options

type Options struct {
	Name               string
	FilePath           string
	Directory          string
	PackageName        string
	StructName         string
	StructNamePlural   string
	VariableName       string
	VariableNameSnake  string
	VariableNamePlural string
	TableName          string
}

func NewOptions

func NewOptions() *Options

NewOptions returns an initialized CmdOptions instance.

func (*Options) MakeOptionsFromPath

func (o *Options) MakeOptionsFromPath(directory string, path string) *Options

type RequestOptions

type RequestOptions struct {
	*Options
}

RequestOptions is an option struct to support 'request' sub command.

func NewRequestOptions

func NewRequestOptions() *RequestOptions

NewRequestOptions returns an initialized RequestOptions instance.

func (*RequestOptions) Complete

func (o *RequestOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*RequestOptions) Run

func (o *RequestOptions) Run(args []string) error

Run executes a new sub command using the specified options.

func (*RequestOptions) Validate

func (o *RequestOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepancy in command options.

type StoreOptions

type StoreOptions struct {
	*Options

	RootPackage string
	ModelPath   string
	ModelName   string
}

StoreOptions is an option struct to support 'store' sub command.

func NewStoreOptions

func NewStoreOptions() *StoreOptions

NewStoreOptions returns an initialized StoreOptions instance.

func (*StoreOptions) Complete

func (o *StoreOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options.

func (*StoreOptions) Run

func (o *StoreOptions) Run(args []string) error

Run executes a new sub command using the specified options.

func (*StoreOptions) Validate

func (o *StoreOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepancy in command options.

Jump to

Keyboard shortcuts

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