datasource

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuffer

func NewBuffer(buf *bytes.Buffer) core.DataSource

func NewFile

func NewFile(fs afero.Fs, conf FileConfig) core.DataSource

func NewInline

func NewInline(conf InlineConfig) core.DataSource

func NewReader

func NewReader(r io.Reader) core.DataSource

NewReader returns dummy core.DataSource that returns it on OpenSource call, wrapping it ioutil.NopCloser if r is not io.Closer. NOTE(skipor): such wrapping hides Seek and other methods that can be used.

func NewStdin

func NewStdin() core.DataSource

func NewString

func NewString(s string) core.DataSource

Types

type FileConfig

type FileConfig struct {
	Path string `config:"path" validate:"required"`
}

type InlineConfig

type InlineConfig struct {
	Data string `validate:"required"`
}

Jump to

Keyboard shortcuts

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