Documentation ¶
Index ¶
- func AddCustomMutations(modelName, dirName string, fields, fieldTypes []string, nullFields []bool, ...) error
- func AddField(modelName string, fields, fieldTypes []string, nullFields []bool) ([]string, []string, []bool)
- func CreateCustomResolverFiles(modelName, dirName string, resolverFiles, resolverTestFiles []string) error
- func CreateGqlModelFiles(modelName, dirName string, files, testFiles []string) error
- func CreateNewModel() error
- func FieldUtils(modelName string, fields, fieldTypes []string, nullFields []bool, ...) map[string]interface{}
- func PromptGetInput(pc PromptContent) string
- func PromptGetSelect(pc PromptContent) string
- func PromptGetSelectPath(pc PromptContent) string
- func PromptGetYesOrNoInput(pc PromptContent) bool
- func PromptValidate(input string) error
- func WriteCustomResolvers(modelName, dirName string, fields, fieldTypes, resolverFiles []string, ...) error
- func WriteMockData(modelName, dirName string, fields, fieldTypes []string, nullFields []bool, ...) error
- func WriteModelFiles(modelName, dirName string, fields, fieldTypes, files []string, ...) error
- func WriteModelTestFiles(modelName, dirName string, fields, fieldTypes, testFiles []string, ...) error
- func WriteTestCustomResolvers(modelName, dirName string, fields, fieldTypes, resolverTestFiles []string, ...) error
- type PromptContent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCustomMutations ¶ added in v1.1.1
func AddCustomMutations( modelName, dirName string, fields, fieldTypes []string, nullFields []bool, customMutation bool, ) error
AddCustomMutations for creating custom mutation files.
func AddField ¶ added in v1.1.1
func AddField( modelName string, fields, fieldTypes []string, nullFields []bool, ) ([]string, []string, []bool)
AddField for adding extra fields.
func CreateCustomResolverFiles ¶
func CreateCustomResolverFiles(modelName, dirName string, resolverFiles, resolverTestFiles []string) error
CreateCustomResolverFiles will create GraphQl model custom resolver files.
func CreateGqlModelFiles ¶
CreateGqlModelFiles will create GraphQl model files.
func FieldUtils ¶
func FieldUtils(modelName string, fields, fieldTypes []string, nullFields []bool, customMutation bool) map[string]interface{}
FieldUtils will give all details of models.
func PromptGetInput ¶
func PromptGetInput(pc PromptContent) string
PromptGetInput is the promptui function for taking action according to CLI questions.
func PromptGetSelect ¶
func PromptGetSelect(pc PromptContent) string
PromptGetSelect is the promptui function for taking action according to dropdown CLI questions.
func PromptGetSelectPath ¶
func PromptGetSelectPath(pc PromptContent) string
PromptGetSelect is the promptui function for taking action of selecting the path according to CLI questions.
func PromptGetYesOrNoInput ¶
func PromptGetYesOrNoInput(pc PromptContent) bool
PromptGetYesOrNOInput is the promptui function for taking action according to Yes or No CLI questions.
func PromptValidate ¶ added in v1.1.1
PromptValidate is the validation function.
func WriteCustomResolvers ¶
func WriteCustomResolvers( modelName, dirName string, fields, fieldTypes, resolverFiles []string, nullFields []bool, customMutation bool) error
WriteCustomResolvers is the function for write data into custom resolver files.
func WriteMockData ¶
func WriteMockData(modelName, dirName string, fields, fieldTypes []string, nullFields []bool, customMutation bool) error
WriteMockData is the function for write data into mock data files.
func WriteModelFiles ¶
func WriteModelFiles(modelName, dirName string, fields, fieldTypes, files []string, nullFields []bool, customMutation bool) error
WriteModelFiles is the function for write data into model files.
Types ¶
type PromptContent ¶
PromptContent is the type of Prompt.