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 ¶
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 ¶
func NewResponseWriter( logger *zap.Logger, storageosProvider storageos.Provider, options ...ResponseWriterOption, ) ResponseWriter
NewResponseWriter returns a new ResponseWriter.
type ResponseWriterOption ¶
type ResponseWriterOption func(*responseWriterOptions)
ResponseWriterOption is an option for the ResponseWriter.
func ResponseWriterWithCreateOutDirIfNotExists ¶
func ResponseWriterWithCreateOutDirIfNotExists() ResponseWriterOption
ResponseWriterWithCreateOutDirIfNotExists returns a new ResponseWriterOption that creates the directory if it does not exist.
Click to show internal directories.
Click to hide internal directories.