config

package
v0.0.0-...-e7a43b6 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2018 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Args struct {
		TypesFile string `positional-arg-name:"types_file"`
	} `positional-args:"yes" required:"yes"`

	Verbose []bool `short:"v" long:"verbose" description:"Verbose output"`
	//TypesFile   string `short:"t" long:"types" description:"File with struct types to consider for generating the skeletom code" required:"yes"`
	Output      string `short:"o" long:"output" description:"Folder where building output structure of generated files"`
	ProjectURL  string `short:"u" long:"url" description:"Url of this project. If not specified 'github.com/myproject' is used"`
	APIVersion  string `short:"a" long:"apiversion" description:"Version of the REST api"`
	Settings    string `short:"c" long:"config" description:"Settings file path"`
	UserPlugins string `short:"p" long:"plugins" description:"Path to the folder with .so plugin files"`

	// Options loaded from settings file
	Version        string `yaml:"version"`
	TemplatesPath  string `yaml:"templates"`
	BuiltinPlugins string `yaml:"plugins"`
}

Options type holding possible cli params

var Config Options

Config holds received configuration from command line

func (*Options) ReplaceInTemplate

func (c *Options) ReplaceInTemplate(templateContent string) string

ReplaceInTemplate replaces config values in template

func (*Options) ValidateAndInitialize

func (c *Options) ValidateAndInitialize() error

ValidateAndInitialize check received params and initialize default ones

Jump to

Keyboard shortcuts

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