output

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package output provides a set of functions to write the data to the output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Close

type Close func() error

Close is a function that closes the output service

type Container

type Container map[string]Output

Container is a map of outputs

func NewContainer

func NewContainer(env string, cfg config.ValidOutputConfig) Container

NewContainer creates a new OutputContainer

type HTTPDataWrite

type HTTPDataWrite func(ctx context.Context, log logger.Logger, data []string) error

HTTPDataWrite writes the data to the output

type LocalOutput

type LocalOutput struct {
	// Format of the output
	Format config.OutputFormat
	// BasePath of the output
	BasePath string
}

LocalOutput represents the local output service

func NewLocalOutput

NewLocalOutput creates a new LocalOutput

func (LocalOutput) HTTPDataWriteFactory

func (o LocalOutput) HTTPDataWriteFactory(
	ctx context.Context,
	log logger.Logger,
	enabled bool,
	uniqueName string,
	header []string,
) (HTTPDataWrite, Close, error)

HTTPDataWriteFactory returns the HTTPDataWrite function

type Output

type Output interface {
	// HTTPDataWriteFactory returns the HTTPDataWrite function
	HTTPDataWriteFactory(
		ctx context.Context,
		log logger.Logger,
		enabled bool,
		uniqueName string,
		header []string,
	) (HTTPDataWrite, Close, error)
}

Output represents a output to be scanned

Jump to

Keyboard shortcuts

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