output_file

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 15 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,
	middlewares_ ...middlewares.Middleware,
) 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