generator

package
v0.0.0-...-2d8c99f Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

DO NOT EDIT THIS FILE. File generated by constructor. https://github.com/bannzai/constructor

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor struct {
	TemplateReader
	SourceCodeReader
	FileWriter
}

func NewConstructorGenerator

func NewConstructorGenerator(
	fileWriter FileWriter,
) Constructor

NewConstructorGenerator insitanciate Constructor

func (Constructor) Generate

func (generator Constructor) Generate(sourcePath, destinationPath, templatePath string, typeName string, ignoreFieldNames []string, packageName string)

type FileWriter

type FileWriter interface {
	Write(destinationPath structure.Path, content string)
}

type FileWriterImpl

type FileWriterImpl struct{}

func (FileWriterImpl) Write

func (FileWriterImpl) Write(destinationPath structure.Path, content string)

type SourceCodeReader

type SourceCodeReader interface {
	Read(filePath structure.Path, ignoreFieldNames []string) structure.Code
	ReadWithType(filePath structure.Path, generatedTypeName string, ignoreFieldNames []string) (code structure.Code)
}

type Template

type Template struct{}

func (Template) Setup

func (impl Template) Setup()

type TemplateReader

type TemplateReader interface {
	Read(filePath structure.Path) *template.Template
}

Jump to

Keyboard shortcuts

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