appprotoos

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package appprotoos does OS-specific generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateOption

type GenerateOption func(*generateOptions)

GenerateOption is an option for Generate.

func GenerateWithCreateOutDirIfNotExists

func GenerateWithCreateOutDirIfNotExists() GenerateOption

GenerateWithCreateOutDirIfNotExists returns a new GenerateOption that creates the directory if it does not exist.

func GenerateWithPluginPath

func GenerateWithPluginPath(pluginPath string) GenerateOption

GenerateWithPluginPath returns a new GenerateOption that uses the given path to the plugin.

type Generator

type Generator interface {
	// Generate generates to the os filesystem, switching on the file extension.
	// If there is a .jar extension, this generates a jar. If there is a .zip
	// extension, this generates a zip. If there is no extension, this outputs
	// to the directory.
	Generate(
		ctx context.Context,
		container app.EnvStderrContainer,
		pluginName string,
		pluginOut string,
		requests []*pluginpb.CodeGeneratorRequest,
		options ...GenerateOption,
	) error
}

func NewGenerator

func NewGenerator(
	logger *zap.Logger,
	storageosProvider storageos.Provider,
) Generator

NewGenerator returns a new Generator.

Jump to

Keyboard shortcuts

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