modelPrompt

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTypeOptions

func GetTypeOptions() []string

GetTypeOptions returns a list of strings for user prompt of data types when creating new models

func PromptUserForModelFields

func PromptUserForModelFields(model *NewModel) error

PromptUserForModelFields prompts user in the CLI to choose model fields wanted

Types

type ModelField

type ModelField struct {
	Type      string
	Name      string
	IsSlice   bool
	SliceType string
}

ModelField represents a single field from a model

type NewModel

type NewModel struct {
	Name           string
	NamePascalCase string
	NameLowerCase  string
	HasDate        bool
	HasCustomTypes bool
	Fields         []ModelField
}

NewModel represents the full model that user wants to create

Jump to

Keyboard shortcuts

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