Documentation
¶
Index ¶
- func AddModelToConfig(newModel modelPrompt.NewModel) error
- func InitCreateCmdConfig(config *CreateCmdConfig)
- func InitInstallCmdConfig(config *InstallCmdConfig) error
- func InitMakeCRUDCmdConfig(config *MakeCmdConfig) error
- func InitMakeFixturesCmdConfig(config *MakeCmdConfig) error
- func InitMakeModelCmdConfig(config *MakeCmdConfig) error
- func InitMakeTestsCmdConfig(config *MakeCmdConfig) error
- func InitModelConfig(config *MakeCmdConfig) error
- func InitUpdateModelConfig(config *MakeCmdConfig) error
- func InitViper() error
- func IsInConfig(modelName string) bool
- func UpdateConfig() error
- func UpdateConfigAfterInstalling(name string)
- type CommandConfigInterface
- type CreateCmdConfig
- type InstallCmdConfig
- type MakeCmdConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddModelToConfig ¶
func AddModelToConfig(newModel modelPrompt.NewModel) error
AddModelToConfig set the new bundle to true in config after install
func InitCreateCmdConfig ¶
func InitCreateCmdConfig(config *CreateCmdConfig)
InitCreateCmdConfig creates the needed config for the create command by prompting user and doing other actions
func InitInstallCmdConfig ¶
func InitInstallCmdConfig(config *InstallCmdConfig) error
InitInstallCmdConfig creates the needed config for the create command by prompting user and doing other actions
func InitMakeCRUDCmdConfig ¶
func InitMakeCRUDCmdConfig(config *MakeCmdConfig) error
InitMakeCRUDCmdConfig inits a config for the make CRUD command
func InitMakeFixturesCmdConfig ¶
func InitMakeFixturesCmdConfig(config *MakeCmdConfig) error
InitMakeFixturesCmdConfig inits a config for the make fixtures command
func InitMakeModelCmdConfig ¶
func InitMakeModelCmdConfig(config *MakeCmdConfig) error
InitMakeModelCmdConfig creates the needed config for the create command by prompting user and doing other actions
func InitMakeTestsCmdConfig ¶
func InitMakeTestsCmdConfig(config *MakeCmdConfig) error
InitMakeTestsCmdConfig inits a config for the make tests command
func InitModelConfig ¶
func InitModelConfig(config *MakeCmdConfig) error
InitMakeCRUDCmdConfig creates the needed config for the make crud command
func InitUpdateModelConfig ¶
func InitUpdateModelConfig(config *MakeCmdConfig) error
InitUpdateModelConfig is the same as initMakeModelConfig but it gather infos from config first
func IsInConfig ¶
IsInConfig returns a boolean telling wether the modelName was found in config or not
func UpdateConfig ¶
func UpdateConfig() error
UpdateConfig reads the project main parts in order to refresh the config store in the .go-gadgeto-config.yml
func UpdateConfigAfterInstalling ¶
func UpdateConfigAfterInstalling(name string)
UpdateConfigAfterInstalling set the new bundle to true in config after install
Types ¶
type CommandConfigInterface ¶
type CommandConfigInterface interface { GetBox() *packr.Box GetProjectPath() string }
CommandConfigInterface is the base for all go-gadgeto commands
type CreateCmdConfig ¶
type CreateCmdConfig struct { AppName string GitUserName string DBMS string UseDocker bool GoPackageFullPath string Args []string Box *packr.Box ProjectPath string AuthModule bool }
CreateCmdConfig is the needed config for the command to work
func (CreateCmdConfig) GetBox ¶
func (cmd CreateCmdConfig) GetBox() *packr.Box
GetBox returns the box in which templates for create command are stored
func (CreateCmdConfig) GetProjectPath ¶
func (cmd CreateCmdConfig) GetProjectPath() string
GetProjectPath returns the path to project in user's computer
type InstallCmdConfig ¶
InstallCmdConfig is the struct for the templates config of install command
func (InstallCmdConfig) GetBox ¶
func (cmd InstallCmdConfig) GetBox() *packr.Box
GetBox returns the box in bundle to install
func (InstallCmdConfig) GetProjectPath ¶
func (cmd InstallCmdConfig) GetProjectPath() string
GetProjectPath returns the path to project in user's computer
type MakeCmdConfig ¶
type MakeCmdConfig struct { GoPackageFullPath string Box *packr.Box Model modelPrompt.NewModel ProjectPath string FixturesModels []string }
MakeCmdConfig is the struct used to configure make command
func (MakeCmdConfig) GetBox ¶
func (cmd MakeCmdConfig) GetBox() *packr.Box
GetBox returns the box in which templates for make command are stored
func (MakeCmdConfig) GetProjectPath ¶
func (cmd MakeCmdConfig) GetProjectPath() string
GetProjectPath returns the path to project in user's computer