sources

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupportedFile added in v0.5.0

func IsSupportedFile(name string) bool

Types

type Aggregate

type Aggregate struct {
	// contains filtered or unexported fields
}

func NewAggregate

func NewAggregate(sources ...Source) *Aggregate

func (*Aggregate) Add

func (a *Aggregate) Add(src Source)

func (*Aggregate) Read

func (a *Aggregate) Read(ctx context.Context) Stream

type File

type File struct {
	Name    string
	Content []byte
	Error   error
}

type FileSystem

type FileSystem struct {
	// contains filtered or unexported fields
}

func NewFileSystem

func NewFileSystem(path string, pattern string) (*FileSystem, error)

func (*FileSystem) Read

func (fs *FileSystem) Read(ctx context.Context) Stream

type Git

type Git struct {
	// contains filtered or unexported fields
}

func NewGit

func NewGit(url string, pattern string) (*Git, error)

func (*Git) Read

func (g *Git) Read(ctx context.Context) Stream

type Noop

type Noop struct{}

func NewNoop

func NewNoop() *Noop

func (Noop) Read

func (n Noop) Read(_ context.Context) Stream

type Source

type Source interface {
	Read(ctx context.Context) Stream
}

func New

func New(locations ...string) (Source, error)

type Stream

type Stream struct {
	Files  <-chan File
	Errors <-chan error
}

Jump to

Keyboard shortcuts

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