generator

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	ImportManager *file.ImportManager

	Loggers []logger.Logger
	// contains filtered or unexported fields
}

func New

func New(path, typeName string, ls ...logger.Logger) (*Generator, error)

New creates a new generator that parses the interface named typeName found in path and then generates a wrapper type using the passed loggers.

path can either be a relative path to the package containing the interface, or a Go import path to it.

func (*Generator) Generate

func (g *Generator) Generate(outPath, typeName string) error

Generate generates the code for a wrapper type named typeName, and writes it to outPath.

Directories

Path Synopsis
Package file provides types that represent a repository interface and it's methods, as well as go types.
Package file provides types that represent a repository interface and it's methods, as well as go types.

Jump to

Keyboard shortcuts

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