catalog

package
v4.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListTimeBucketKeyNames added in v4.0.1

func ListTimeBucketKeyNames(d *Directory) []string

ListTimeBucketKeyNames returns the list of TimeBucket keys in "{symbol}/{timeframe}/{atrributeGroup}" format.

Types

type Directory

type Directory struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewDirectory

func NewDirectory(rootPath string) (*Directory, error)

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 (subDir *Directory) AddFile(newYear int16) (finfo_p *io.TimeBucketInfo, err error)

func (*Directory) AddTimeBucket

func (dRoot *Directory) AddTimeBucket(tbk *io.TimeBucketKey, f *io.TimeBucketInfo) (err error)

func (*Directory) DirHasDataFiles

func (d *Directory) DirHasDataFiles() bool

func (*Directory) DirHasSubDirs

func (d *Directory) DirHasSubDirs() bool

func (*Directory) GatherCategoriesAndItems

func (d *Directory) GatherCategoriesAndItems() map[string]map[string]int

func (*Directory) GatherCategoriesFromCache

func (d *Directory) GatherCategoriesFromCache() (catList map[string]int8)

func (*Directory) GatherDirectories added in v4.1.2

func (d *Directory) GatherDirectories() []string

func (*Directory) GatherFilePaths added in v4.1.2

func (d *Directory) GatherFilePaths() []string

func (*Directory) GatherTimeBucketInfo

func (d *Directory) GatherTimeBucketInfo() []*io.TimeBucketInfo

func (*Directory) GetCategory

func (d *Directory) GetCategory() string

func (*Directory) GetDataShapes

func (d *Directory) GetDataShapes(key *io.TimeBucketKey) (dsv []io.DataShape, err error)

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 (d *Directory) GetListOfSubDirs() (subDirList []*Directory)

func (*Directory) GetName

func (d *Directory) GetName() string

func (*Directory) GetOwningSubDirectory

func (d *Directory) GetOwningSubDirectory(fullFilePath string) (subDir *Directory, err error)

func (*Directory) GetPath

func (d *Directory) GetPath() string

func (*Directory) GetSubDirWithItemName

func (d *Directory) GetSubDirWithItemName(itemName string) (subDir *Directory)

func (*Directory) GetSubDirectoryAndAddFile

func (d *Directory) GetSubDirectoryAndAddFile(fullFilePath string, year int16) (*io.TimeBucketInfo, error)

func (*Directory) GetTimeBucketInfoSlice

func (d *Directory) GetTimeBucketInfoSlice() (tbinfolist []*io.TimeBucketInfo)

func (*Directory) PathToTimeBucketInfo

func (d *Directory) PathToTimeBucketInfo(path string) (*io.TimeBucketInfo, error)

func (*Directory) RemoveTimeBucket

func (dRoot *Directory) RemoveTimeBucket(tbk *io.TimeBucketKey) (err error)

func (*Directory) String

func (d *Directory) String() string

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

type SubdirectoryDoesNotContainFiles

type SubdirectoryDoesNotContainFiles string

func (SubdirectoryDoesNotContainFiles) Error

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

Jump to

Keyboard shortcuts

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