Documentation
¶
Index ¶
- func JoinPath(dirPath string, filePath string) string
- func MakeHash(s string) string
- func MakeTimeToString(t time.Time) string
- func ParseTime(t string) (time.Time, error)
- type FileBlockHelper
- func (helper *FileBlockHelper) GetBlockIDForOffset(offset int64) int64
- func (helper *FileBlockHelper) GetBlockStartOffsetForBlockID(blockID int64) int64
- func (helper *FileBlockHelper) GetFirstAndLastBlockIDForRW(offset int64, length int) (int64, int64)
- func (helper *FileBlockHelper) GetInBlockOffsetAndLength(offset int64, length int) (int, int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeTimeToString ¶
Types ¶
type FileBlockHelper ¶
type FileBlockHelper struct {
// contains filtered or unexported fields
}
FileBlockHelper ...
func NewFileBlockHelper ¶
func NewFileBlockHelper(blockSize int) *FileBlockHelper
func (*FileBlockHelper) GetBlockIDForOffset ¶
func (helper *FileBlockHelper) GetBlockIDForOffset(offset int64) int64
GetBlockIDForOffset returns block index
func (*FileBlockHelper) GetBlockStartOffsetForBlockID ¶
func (helper *FileBlockHelper) GetBlockStartOffsetForBlockID(blockID int64) int64
GetBlockStartOffsetForBlockID returns block start offset
func (*FileBlockHelper) GetFirstAndLastBlockIDForRW ¶
func (helper *FileBlockHelper) GetFirstAndLastBlockIDForRW(offset int64, length int) (int64, int64)
GetFirstAndLastBlockIDForRW returns first and last block id for read or write
func (*FileBlockHelper) GetInBlockOffsetAndLength ¶
func (helper *FileBlockHelper) GetInBlockOffsetAndLength(offset int64, length int) (int, int)
GetInBlockOffsetAndLength returns in-block offset and in-block length
Click to show internal directories.
Click to hide internal directories.