unistore

package module
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OneDay is an abstraction of time in a given day
	OneDay = time.Hour * 24
)

Variables

This section is empty.

Functions

func HasStoreBeenModified

func HasStoreBeenModified(store Store, path string, recentThresholdInDays time.Duration) bool

HasStoreBeenModified indicates if the given path in the given store has been modified recently

func IsTimeAfterDays

func IsTimeAfterDays(modTime time.Time, recentThresholdInDays time.Duration) bool

IsTimeAfterDays returns true if the modTime is within recentThresholdInDays. false, otherwise.

func ReadLineByLine

func ReadLineByLine(r io.Reader, fnProcessLine func(line string, linenumber int) error) error

ReadLineByLine reads from a given reader, one line at a time

Types

type Store

type Store interface {
	Validate() error
	ListItems(basePath *string, filter filter.Filter) ([]string, error)
	DoesPathExist(path string) bool
	GetData(path string) ([]byte, error)
	PutData(path string, data []byte) error
	GetModifiedTime(path string) (time.Time, error)
	Delete(path string) error
}

Directories

Path Synopsis
impl
fs

Jump to

Keyboard shortcuts

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