servergen

package
v0.0.0-...-908e76c Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

type Printer struct {
	// contains filtered or unexported fields
}

func (*Printer) EnableMock

func (p *Printer) EnableMock(enable bool)

EnableMock enables mock generation. If enable is true, "//go:generate mockgen" is inserted into the generated code.

func (*Printer) PrintService

func (p *Printer) PrintService(out io.Writer, svc *v1.Service) error

type Walk

type Walk struct {
	// contains filtered or unexported fields
}

Walk is a server generator. It generates a server from protogen result.

func NewWalk

func NewWalk(inputDirectory string, rootDirectory string, enableMock bool) (*Walk, error)

NewWalk creates a new Walk.

inputDirectory is a directory where the input files are placed. The input files contain protojson encoded v1.Package.

rootDirectory is a root directory where the generated files are placed.

enableMock enables mock generation. see servergen.Printer.EnableMock.

func (*Walk) Walk

func (w *Walk) Walk() error

Directories

Path Synopsis
generated
ke/v1alpha
Code generated by server-gen.
Code generated by server-gen.
ke/v1alpha/mock
Package mockv1alpha is a generated GoMock package.
Package mockv1alpha is a generated GoMock package.

Jump to

Keyboard shortcuts

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