Documentation ¶
Index ¶
- Constants
- func NewDefaultNamer(fromFileName, filePrefix, dir string) gowarc.WarcFileNameGenerator
- func NewIdentityNamer(fromFileName, filePrefix, dir string) gowarc.WarcFileNameGenerator
- func NewNedlibNamer(fromFileName, filePrefix, dir string) gowarc.WarcFileNameGenerator
- func WithBufferTmpDir(tmpDir string) func(*WarcWriterOptions)
- func WithCloseOutputFileHook(hook string) func(*WarcWriterOptions)
- func WithCompress(compress bool) func(*WarcWriterOptions)
- func WithCompressionLevel(level int) func(*WarcWriterOptions)
- func WithConcurrentWriters(writers int) func(*WarcWriterOptions)
- func WithDefaultTime(time string) func(*WarcWriterOptions)
- func WithFilePrefix(prefix string) func(*WarcWriterOptions)
- func WithFlush(flush bool) func(*WarcWriterOptions)
- func WithMaxFileSize(size string) func(*WarcWriterOptions)
- func WithOneToOneWriter(oneToOne bool) func(*WarcWriterOptions)
- func WithOpenOutputFileHook(hook string) func(*WarcWriterOptions)
- func WithOutDir(outDir string) func(*WarcWriterOptions)
- func WithSubDirPattern(pattern string) func(*WarcWriterOptions)
- func WithWarcFileNameGenerator(generator string) func(*WarcWriterOptions)
- func WithWarcInfoFunc(f func(recordBuilder gowarc.WarcRecordBuilder) error) func(*WarcWriterOptions)
- func WithWarcVersion(version string) func(*WarcWriterOptions)
- type WarcWriterConfig
- type WarcWriterOptions
Constants ¶
View Source
const DefaultDateFormat = "2006-1-2"
Variables ¶
This section is empty.
Functions ¶
func NewDefaultNamer ¶
func NewDefaultNamer(fromFileName, filePrefix, dir string) gowarc.WarcFileNameGenerator
func NewIdentityNamer ¶
func NewIdentityNamer(fromFileName, filePrefix, dir string) gowarc.WarcFileNameGenerator
func NewNedlibNamer ¶
func NewNedlibNamer(fromFileName, filePrefix, dir string) gowarc.WarcFileNameGenerator
func WithBufferTmpDir ¶
func WithBufferTmpDir(tmpDir string) func(*WarcWriterOptions)
func WithCloseOutputFileHook ¶
func WithCloseOutputFileHook(hook string) func(*WarcWriterOptions)
func WithCompress ¶
func WithCompress(compress bool) func(*WarcWriterOptions)
func WithCompressionLevel ¶
func WithCompressionLevel(level int) func(*WarcWriterOptions)
func WithConcurrentWriters ¶
func WithConcurrentWriters(writers int) func(*WarcWriterOptions)
func WithDefaultTime ¶
func WithDefaultTime(time string) func(*WarcWriterOptions)
func WithFilePrefix ¶
func WithFilePrefix(prefix string) func(*WarcWriterOptions)
func WithFlush ¶
func WithFlush(flush bool) func(*WarcWriterOptions)
func WithMaxFileSize ¶
func WithMaxFileSize(size string) func(*WarcWriterOptions)
func WithOneToOneWriter ¶
func WithOneToOneWriter(oneToOne bool) func(*WarcWriterOptions)
func WithOpenOutputFileHook ¶
func WithOpenOutputFileHook(hook string) func(*WarcWriterOptions)
func WithOutDir ¶
func WithOutDir(outDir string) func(*WarcWriterOptions)
func WithSubDirPattern ¶
func WithSubDirPattern(pattern string) func(*WarcWriterOptions)
func WithWarcFileNameGenerator ¶
func WithWarcFileNameGenerator(generator string) func(*WarcWriterOptions)
func WithWarcInfoFunc ¶
func WithWarcInfoFunc(f func(recordBuilder gowarc.WarcRecordBuilder) error) func(*WarcWriterOptions)
func WithWarcVersion ¶
func WithWarcVersion(version string) func(*WarcWriterOptions)
Types ¶
type WarcWriterConfig ¶
type WarcWriterConfig struct { FilePrefix string DefaultTime time.Time OutDir string TmpDir string Flush bool WarcVersion *gowarc.WarcVersion WarcFileNameGenerator string SubDirPattern string WarcInfoFunc func(recordBuilder gowarc.WarcRecordBuilder) error OneToOneWriter bool WarcFileWriterOptions []gowarc.WarcFileWriterOption // contains filtered or unexported fields }
func New ¶
func New(cmd string, options ...func(*WarcWriterOptions)) (*WarcWriterConfig, error)
func (*WarcWriterConfig) Close ¶
func (w *WarcWriterConfig) Close() error
func (*WarcWriterConfig) GetWarcWriter ¶
func (w *WarcWriterConfig) GetWarcWriter(fromFileName, warcDate string) (*gowarc.WarcFileWriter, error)
type WarcWriterOptions ¶
type WarcWriterOptions struct { WarcVersion string OutDir string DefaultTime string OpenOutputFileHook string CloseOutputFileHook string Compress bool CompressionLevel int ConcurrentWriters int MaxFileSize string FilePrefix string SubDirPattern string WarcFileNameGenerator string Flush bool OneToOneWriter bool WarcInfoFunc func(recordBuilder gowarc.WarcRecordBuilder) error TmpDir string }
Click to show internal directories.
Click to hide internal directories.