Documentation ¶
Overview ¶
Package writer contains writer utilities for writing into a file
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFileWriterCouldNotSeek = errors.New("package writer - could not seek") ErrFileWriterCouldNotWrite = errors.New("package writer - could not write data into file") ErrFileWriterCouldNotClose = errors.New("package writer - could not close") ErrFileWriterCouldNotSync = errors.New("package writer - could not sync") )
Functions ¶
This section is empty.
Types ¶
type FileWriter ¶
type FileWriter interface { // Write will write or update raw data into file Write(rawData []byte, offset int64, seek int) error // Sync will sync data from in-memory to disk Sync() error // GetId return id of FileWriter GetId() uuid.UUID // Close func provides close writer instance Close() error }
FileWriter interface gives you some options for writing into a file
func NewFileWriter ¶
func NewFileWriter(file file.File) (FileWriter, uuid.UUID)
NewFileWriter func provides new instance of FileWriter interface with unique memory addresses of its objects
Click to show internal directories.
Click to hide internal directories.