filelist

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name        string
	StoragePath string
	Contents    *ach.File

	CreatedAt   time.Time
	Size        int64
	RecordCount int64
}

type Files

type Files struct {
	SourceID   string
	SourceType string
	Files      []File
}

type ListOpts added in v0.5.0

type ListOpts struct {
	StartDate, EndDate time.Time
}

func DefaultListOptions added in v0.5.0

func DefaultListOptions(when time.Time) ListOpts

func ReadListOptions added in v0.5.0

func ReadListOptions(r *http.Request) (ListOpts, error)

func (ListOpts) Inside added in v0.5.0

func (opts ListOpts) Inside(when time.Time) bool

type Lister

type Lister interface {
	SourceID() string

	GetFile(path string) (*File, error)
	GetFiles(opts ListOpts) (Files, error)
}

type Listers

type Listers []Lister

func NewListers

func NewListers(ss service.Sources) (Listers, error)

func (Listers) GetFile

func (ls Listers) GetFile(sourceID, path string) (*File, error)

func (Listers) GetFiles

func (ls Listers) GetFiles(opts ListOpts) (map[string]Files, error)

Jump to

Keyboard shortcuts

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