Documentation ¶
Index ¶
- Constants
- Variables
- func CreateIndexJSON(indexFields []InFileIndexField, rs *gjson.Result) (string, error)
- func InitializeWithHeaderUsingFp(f *os.File) error
- type AppendFile
- type InFileIndex
- type InFileIndexField
- type PackFile
- func (p *PackFile) Close() error
- func (p *PackFile) Read(queries []string, data *gjson.Result) (string, error)
- func (p *PackFile) ReadMedia(recordID string) ([]byte, *gjson.Result, error)
- func (p *PackFile) ReadMediaByQuery(inFileIndexQueries []string) (map[string][]byte, map[string]gjson.Result, error)
- func (p *PackFile) Remove(queries []string) (recordsDeletedCnt int, err error)
- func (p *PackFile) RemoveMedia(recordID string) error
- func (p *PackFile) Reorg() error
- func (p *PackFile) Update(queries []string, rs *gjson.Result) (gjson.Result, error)
- func (p *PackFile) UpdateMedia(recordID string, mediaData []byte, rs *gjson.Result) (err error)
- func (p *PackFile) UpsertMedia(recordID string, mediaData []byte, rs *gjson.Result) (string, error)
- func (p *PackFile) Write(rs *gjson.Result) (err error)
- func (p *PackFile) WriteMedia(mediaData []byte, rs *gjson.Result) (recordID string, err error)
- type SimpleFile
Constants ¶
View Source
const ( // IndexKeyValSeperator - IndexKeyValSeperator = "=" // FileType - represents key for type of file. Used whenever we need to set file type field in json FileType = "fileType" )
Variables ¶
View Source
var ErrNoDataFound = errors.New("No data found")
ErrNoDataFound - ErrNoDataFound
Functions ¶
func CreateIndexJSON ¶
func CreateIndexJSON(indexFields []InFileIndexField, rs *gjson.Result) (string, error)
Types ¶
type AppendFile ¶
type AppendFile struct { FilePath string Fp *os.File IsLazyEnable bool // contains filtered or unexported fields }
func NewAppendFile ¶
func NewAppendFile(filePath string, securityProvider securityprovider.SecurityProvider) (*AppendFile, error)
func (*AppendFile) Close ¶
func (af *AppendFile) Close() error
type InFileIndex ¶
type InFileIndex struct { FileType string `json:"fileType"` IndexFields []InFileIndexField `json:"indexFields"` }
type InFileIndexField ¶
type PackFile ¶
type PackFile struct { FilePath string InfileIndexRows *gjson.Result Fp *os.File SecurityProvider securityprovider.SecurityProvider // contains filtered or unexported fields }
func NewPackFile ¶
func NewPackFile(filePath string, infileIndexSchemaMap map[string]InFileIndex, securityProvider securityprovider.SecurityProvider) (*PackFile, error)
func (*PackFile) ReadMediaByQuery ¶
func (*PackFile) RemoveMedia ¶
func (*PackFile) UpdateMedia ¶
func (*PackFile) UpsertMedia ¶
type SimpleFile ¶
type SimpleFile struct { FilePath string Fp *os.File IsLazyEnable bool // contains filtered or unexported fields }
func NewSimpleFile ¶
func NewSimpleFile(filePath string, securityProvider securityprovider.SecurityProvider) (*SimpleFile, error)
func (*SimpleFile) Close ¶
func (s *SimpleFile) Close() error
func (*SimpleFile) Remove ¶
func (s *SimpleFile) Remove() error
Click to show internal directories.
Click to hide internal directories.