writers

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DryRunWriter added in v0.3.0

type DryRunWriter interface {
	// GetWriter creates DryRunWriters writing to the
	// same backend but for different roots (e.g. for
	// resources and docs)
	GetWriter(root string) Writer
	// Flush wraps up dryrun writing and flushes
	// results to the underlying writer (e.g. os.Stdout)
	Flush() bool
}

DryRunWriter is the functional interface for working with dry run writers

func NewDryRunWritersFactory added in v0.3.0

func NewDryRunWritersFactory(w io.Writer) DryRunWriter

NewDryRunWritersFactory creates factory for DryRunWriters writing to the same backend but for different roots (e.g. for resources and docs)

type FSWriter

type FSWriter struct {
	Root string
}

FSWriter is implementation of Writer interface for writing blobs to the file system

func (*FSWriter) Write

func (f *FSWriter) Write(name, path string, docBlob []byte, node *api.Node) error

type Writer

type Writer interface {
	Write(name, path string, resourceContent []byte, node *api.Node) error
}

Writer writes blobs with name to a given path

Jump to

Keyboard shortcuts

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