appprotoos

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 16 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 ResponseWriter added in v1.0.0

type ResponseWriter interface {
	// Close writes all of the responses to disk. No further calls can be
	// made to the ResponseWriter after this call.
	io.Closer

	// AddResponse adds the response to the writer, 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.
	//
	// pluginOut will be unnormalized within this function.
	AddResponse(
		ctx context.Context,
		response *pluginpb.CodeGeneratorResponse,
		pluginOut string,
	) error
}

ResponseWriter writes CodeGeneratorResponses to the OS filesystem.

func NewResponseWriter added in v1.0.0

func NewResponseWriter(
	logger *zap.Logger,
	storageosProvider storageos.Provider,
	options ...ResponseWriterOption,
) ResponseWriter

NewResponseWriter returns a new ResponseWriter.

type ResponseWriterOption added in v1.0.0

type ResponseWriterOption func(*responseWriterOptions)

ResponseWriterOption is an option for the ResponseWriter.

func ResponseWriterWithCreateOutDirIfNotExists added in v1.0.0

func ResponseWriterWithCreateOutDirIfNotExists() ResponseWriterOption

ResponseWriterWithCreateOutDirIfNotExists returns a new ResponseWriterOption that creates the directory if it does not exist.

Jump to

Keyboard shortcuts

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