Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommonStruct ¶ added in v0.3.3
type CommonStruct struct { PackageName string `yaml:"package_name"` StructName string `yaml:"struct_name"` Path string `yaml:"path"` Struct csgen.Struct `yaml:"struct"` }
CommonStruct a container for structs that have global application when creating maps
type ConvertFunctionParams ¶
type ConvertFunctionParams struct { ConverterPackage string FunctionName string FunctionNameForSlice string SourcePackage string SourceObjectName string FQSourceObjectName string TargetPackage string TargetObjectName string FQTargetObjectName string Assignments []string Imports []string }
ConvertFunctionParams is a struct that contains the parameters that feed into the template.
type Manifest ¶
type Manifest struct { ProjectRoot string `yaml:"project_root"` GeneratorPath string `yaml:"generator_path"` GeneratorPackage string `yaml:"generator_package"` ObjectMaps []ObjectMap `yaml:"maps"` CommonStructs []CommonStruct `yaml:"common_structs"` }
Manifest strongly typed respresentation of the manifest file.
func LoadManifest ¶
LoadManifest loads the manifest file and returns a slice of ObjectMap structs.
func (*Manifest) GetCommonStruct ¶ added in v0.3.3
func (m *Manifest) GetCommonStruct(name string) *CommonStruct
GetCommonStruct return a common struct by name if it exists and nil otherwise
type MapOverride ¶
type MapOverride struct { SourceName string `yaml:"source_name"` TargetName string `yaml:"target_name"` }
MapOverride struct that represents an explicitly specified object mapping, overriding the defailt name matching
type ObjectMap ¶
type ObjectMap struct { Name string `yaml:"name"` SourcePath string `yaml:"source_path"` SourceObjects []csgen.Struct TargetPath string `yaml:"target_path"` TargetObjects []csgen.Struct Imports []string `yaml:"imports"` MapOverrides []MapOverride `yaml:"map_overrides"` }
ObjectMap is a struct that contains the source and destination paths for a single mapping.
Click to show internal directories.
Click to hide internal directories.