Documentation ¶
Index ¶
- func ListTimeBucketKeyNames(d *Directory) []string
- type Directory
- func (d *Directory) AddFile(newYear int16) (fInfoPtr *io.TimeBucketInfo, err error)
- func (d *Directory) AddTimeBucket(tbk *io.TimeBucketKey, f *io.TimeBucketInfo) (err error)
- func (d *Directory) DirHasDataFiles() bool
- func (d *Directory) DirHasSubDirs() bool
- func (d *Directory) GatherCategoriesAndItems() (map[string]map[string]int, error)
- func (d *Directory) GatherCategoriesFromCache() (catSet map[string]struct{}, err error)
- func (d *Directory) GatherDirectories() ([]string, error)
- func (d *Directory) GatherFilePaths() ([]string, error)
- func (d *Directory) GatherTimeBucketInfo() ([]*io.TimeBucketInfo, error)
- func (d *Directory) GetCategory() string
- func (d *Directory) GetDataShapes(key *io.TimeBucketKey) (dsv []io.DataShape, err error)
- func (d *Directory) GetLatestTimeBucketInfoFromFullFilePath(fullFilePath string) (fi *io.TimeBucketInfo, err error)
- func (d *Directory) GetLatestTimeBucketInfoFromKey(key *io.TimeBucketKey) (fi *io.TimeBucketInfo, err error)
- func (d *Directory) GetLatestYearFile() (latestFile *io.TimeBucketInfo, err error)
- func (d *Directory) GetListOfSubDirs() (subDirList []*Directory)
- func (d *Directory) GetName() string
- func (d *Directory) GetOwningSubDirectory(fullFilePath string) (subDir *Directory, err error)
- func (d *Directory) GetPath() string
- func (d *Directory) GetSubDirWithItemName(itemName string) (subDir *Directory)
- func (d *Directory) GetSubDirectoryAndAddFile(fullFilePath string, year int16) (*io.TimeBucketInfo, error)
- func (d *Directory) GetTimeBucketInfoSlice() (tbinfolist []*io.TimeBucketInfo)
- func (d *Directory) PathToTimeBucketInfo(path2 string) (*io.TimeBucketInfo, error)
- func (d *Directory) RemoveTimeBucket(tbk *io.TimeBucketKey) (err error)
- func (d *Directory) String() string
- type ErrCategoryFileNotFound
- type FileAlreadyExists
- type NotFoundError
- type PathNotContainedInExistingCategory
- type SubdirectoryDoesNotContainFiles
- type UnableToCreateFile
- type UnableToLocateSubDir
- type UnableToWriteHeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListTimeBucketKeyNames ¶ added in v4.0.1
ListTimeBucketKeyNames returns the list of TimeBucket keys in "{symbol}/{timeframe}/{atrributeGroup}" format.
Types ¶
type Directory ¶
func NewDirectory ¶
NewDirectory scans files under the rootPath and return a new Directory struct. - returns ErrCategoryFileNotFound when "category_name" file is not found under each subdirectory, - returns an error in other unexpected cases.
func (*Directory) AddFile ¶
func (d *Directory) AddFile(newYear int16) (fInfoPtr *io.TimeBucketInfo, err error)
func (*Directory) AddTimeBucket ¶
func (d *Directory) AddTimeBucket(tbk *io.TimeBucketKey, f *io.TimeBucketInfo) (err error)
AddTimeBucket adds a (possibly) new data item to a rootpath. Takes an existing catalog directory and adds the new data item to that data directory. This is used only for a root category directory.
func (*Directory) DirHasDataFiles ¶
func (*Directory) DirHasSubDirs ¶
func (*Directory) GatherCategoriesAndItems ¶
func (*Directory) GatherCategoriesFromCache ¶
func (*Directory) GatherDirectories ¶ added in v4.1.2
func (*Directory) GatherFilePaths ¶ added in v4.1.2
func (*Directory) GatherTimeBucketInfo ¶
func (d *Directory) GatherTimeBucketInfo() ([]*io.TimeBucketInfo, error)
func (*Directory) GetCategory ¶
func (*Directory) GetDataShapes ¶
func (*Directory) GetLatestTimeBucketInfoFromFullFilePath ¶
func (d *Directory) GetLatestTimeBucketInfoFromFullFilePath(fullFilePath string) (fi *io.TimeBucketInfo, err error)
func (*Directory) GetLatestTimeBucketInfoFromKey ¶
func (d *Directory) GetLatestTimeBucketInfoFromKey(key *io.TimeBucketKey) (fi *io.TimeBucketInfo, err error)
func (*Directory) GetLatestYearFile ¶ added in v4.1.2
func (d *Directory) GetLatestYearFile() (latestFile *io.TimeBucketInfo, err error)
func (*Directory) GetListOfSubDirs ¶
func (*Directory) GetOwningSubDirectory ¶
func (*Directory) GetSubDirWithItemName ¶
func (*Directory) GetSubDirectoryAndAddFile ¶
func (*Directory) GetTimeBucketInfoSlice ¶
func (d *Directory) GetTimeBucketInfoSlice() (tbinfolist []*io.TimeBucketInfo)
func (*Directory) PathToTimeBucketInfo ¶
func (d *Directory) PathToTimeBucketInfo(path2 string) (*io.TimeBucketInfo, error)
func (*Directory) RemoveTimeBucket ¶
func (d *Directory) RemoveTimeBucket(tbk *io.TimeBucketKey) (err error)
RemoveTimeBucket deletes the item at the last level specified in the dataItemKey Also removes empty directories at the higher levels after the delete. This is used for a root catalog directory.
type ErrCategoryFileNotFound ¶ added in v4.1.1
type ErrCategoryFileNotFound struct {
// contains filtered or unexported fields
}
ErrCategoryFileNotFound is used when "category_name" file under each data directory is not found.
func (ErrCategoryFileNotFound) Error ¶ added in v4.1.1
func (e ErrCategoryFileNotFound) Error() string
type FileAlreadyExists ¶
type FileAlreadyExists string
func (FileAlreadyExists) Error ¶
func (msg FileAlreadyExists) Error() string
type NotFoundError ¶
type NotFoundError string
func (NotFoundError) Error ¶
func (msg NotFoundError) Error() string
type PathNotContainedInExistingCategory ¶
type PathNotContainedInExistingCategory string
func (PathNotContainedInExistingCategory) Error ¶
func (msg PathNotContainedInExistingCategory) Error() string
type SubdirectoryDoesNotContainFiles ¶
type SubdirectoryDoesNotContainFiles string
func (SubdirectoryDoesNotContainFiles) Error ¶
func (msg SubdirectoryDoesNotContainFiles) Error() string
type UnableToCreateFile ¶
type UnableToCreateFile string
func (UnableToCreateFile) Error ¶
func (msg UnableToCreateFile) Error() string
type UnableToLocateSubDir ¶
type UnableToLocateSubDir string
func (UnableToLocateSubDir) Error ¶
func (msg UnableToLocateSubDir) Error() string
type UnableToWriteHeader ¶
type UnableToWriteHeader string
func (UnableToWriteHeader) Error ¶
func (msg UnableToWriteHeader) Error() string