services

package
v0.0.0-...-090899e Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfigFile

func CreateConfigFile() *os.File

CreateConfigFile is the function that creates the config file in the user filesystem if it doesn't exist.

func CreateStructure

func CreateStructure(path string, modules []string, username string, appName string)

CreateStructure is the function used to create the configuration for the current command, create the repository and execute the templates inside.

func ExecuteTemplate

func ExecuteTemplate(config interface{}, outputName string, path string, templateString string) error

ExecuteTemplate takes a config, file string and computes it into a file

func GetEntitiesList

func GetEntitiesList() []string

GetEntitiesList returns a slice of strings with all the entities names found in the models/ dir

func GetTypeOptions

func GetTypeOptions() []string

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

Types

type Config

type Config struct {
	HasRouter bool
	HasDB     bool
	HasDocker bool
	Path      string
	Box       *packr.Box
	Username  string
	AppName   string
}

Config is the structure passed to the templates executors in order for them to access informations such as the username, its choices of modules etc..

Jump to

Keyboard shortcuts

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