output_file

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGlazedFileHandler

func CreateGlazedFileHandler(
	cmd cmds.GlazeCommand,
	fileName string,
	parserOptions ...parser.ParserOption,
) gin.HandlerFunc

CreateGlazedFileHandler creates a handler that will run a glazed command and write the output with a Content-Disposition header to the response writer.

If an output format requires writing to a temporary file locally, such as excel, the handler is wrapped in a temporary file handler.

Types

type OutputFileHandler

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

func NewOutputFileHandler

func NewOutputFileHandler(handler handlers.Handler, outputFileName string) *OutputFileHandler

func (*OutputFileHandler) Handle

func (h *OutputFileHandler) Handle(c *gin.Context, w io.Writer) error

Jump to

Keyboard shortcuts

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