Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigureRootLogger()
- func EntityTypeName(entityType int) string
- func NewCatalogResource(catalogFilepath *string, hashAlgorithm *string) (cr *catalogResource, err error)
- func NewLogger(context string) log.Logger
- func PathStateName(pathState int) string
- func SetDebugLogging()
- func UpdateTypeName(updateType int) string
- type Catalog
- type ChangeEvent
- type Path
Constants ¶
View Source
const ( UpdateTypeError_ = iota UpdateTypeCreate = iota UpdateTypeUpdate = iota UpdateTypeDelete = iota )
View Source
const ( PathStateError_ = iota PathStateNew = iota PathStateUpdated = iota PathStateUnaffected = iota )
View Source
const ( EntityTypeFile = iota EntityTypePath = iota )
View Source
const ( Sha1Algorithm = "sha1" Sha256Algorithm = "sha256" )
View Source
const (
CurrentSchemaVersion = 2
)
View Source
const (
DbType = "sqlite3"
)
View Source
const (
LogPackageVersion = 1
)
View Source
const (
PathListBatchSize = 3
)
Variables ¶
View Source
var ErrFileChanged = errors.New("mtime for filename does not match")
View Source
var ErrNoHash = errors.New("no hash recorded for the filename")
TODO(dustin): !! We ended-up going the other direction with our errors. Deimplement these?
Functions ¶
func ConfigureRootLogger ¶
func ConfigureRootLogger()
func EntityTypeName ¶
func NewCatalogResource ¶
func PathStateName ¶
func SetDebugLogging ¶
func SetDebugLogging()
func UpdateTypeName ¶
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func NewCatalog ¶
func (*Catalog) BranchCatalog ¶
func (*Catalog) PruneOldFiles ¶
Delete all file records that haven't been touched in this run (because all of the ones that match known files have been updated to a later timestamp than they had).
func (*Catalog) PruneOldPaths ¶
Delete all path records that haven't been touched in this run (because all of the ones that match known files have been updated to a later timestamp than they had).
type ChangeEvent ¶
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
func NewPath ¶
func NewPath(hashAlgorithm *string, reportingChannel chan<- *ChangeEvent) *Path
func (*Path) GenerateFileHash ¶
Click to show internal directories.
Click to hide internal directories.