templates

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManifestConfigurations

type ManifestConfigurations struct {
	Template        *templateConfigurations                `json:"template" yaml:"template"`
	Output          *outputConfigurations                  `json:"output" yaml:"output"`
	TemplateFiles   map[string]*templateFileConfigurations `json:"template_files" yaml:"template_files"`
	SupportingFiles []string                               `json:"supporting_files" yaml:"supporting_files"`
	MetaData        map[string]interface{}                 `json:"metadata" yaml:"metadata"`
	WordMaps        *wordMaps                              `json:"word_maps" yaml:"word_maps"`
}

ManifestConfigurations holds the information of manifest file.

func LoadTemplates

func LoadTemplates(templateDirectory string) (map[string]*Template, *ManifestConfigurations, error)

LoadTemplates read the template manifest and load all templates info.

type Template

type Template struct {
	Filename      string
	FileDirectory string
	FilePath      string
	FileContent   string

	Format         string
	IsNeedGenerate bool

	ID string // service, sub_service or types

	OutputFilename   string
	OutputFilePath   string
	OutputFileNaming *fileNamingConfiguration
}

A Template holds the information of template file.

func (*Template) UpdateOutputFilePath

func (t *Template) UpdateOutputFilePath(parentPath string) error

UpdateOutputFilePath updates the absolute path of output file.

func (*Template) UpdateOutputFilename

func (t *Template) UpdateOutputFilename(filename string, namingStyle string)

UpdateOutputFilename updates the output filename according to namingStyle.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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