config

package
v0.0.0-...-573af51 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 InitViper

func InitViper() error

InitViper init acces to viper config in workdir

func IsInConfig

func IsInConfig(modelName string) bool

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

type InstallCmdConfig struct {
	GoPackageFullPath string
	Box               *packr.Box
	ProjectPath       string
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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