Documentation ¶
Index ¶
- func NewBuffer(buf *bytes.Buffer) core.DataSource
- func NewFile(fs afero.Fs, conf FileConfig) core.DataSource
- func NewInline(conf InlineConfig) core.DataSource
- func NewReader(r io.Reader) core.DataSource
- func NewStdin() core.DataSource
- func NewString(s string) core.DataSource
- type FileConfig
- type InlineConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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"`
}
Click to show internal directories.
Click to hide internal directories.