Documentation ¶
Index ¶
- Constants
- Variables
- type CloseInputFileHook
- type CloseOutputFileHook
- func (h CloseOutputFileHook) Output(fileName string, size int64, warcInfoId string) ([]byte, error)
- func (h CloseOutputFileHook) Run(fileName string, size int64, warcInfoId string) error
- func (h CloseOutputFileHook) WithErrorCount(errorCount int64) CloseOutputFileHook
- func (h CloseOutputFileHook) WithHash(hash string) CloseOutputFileHook
- func (h CloseOutputFileHook) WithSrcFileName(srcFileName string) CloseOutputFileHook
- type CommandNotFoundError
- type OpenInputFileHook
- type OpenOutputFileHook
Constants ¶
const ( EnvCommand = "WARC_COMMAND" EnvFileName = "WARC_FILE_NAME" EnvErrorCount = "WARC_ERROR_COUNT" EnvWarcInfoId = "WARC_INFO_ID" EnvFileSize = "WARC_SIZE" EnvHash = "WARC_HASH" EnvSrcFileName = "WARC_SRC_FILE_NAME" EnvHookType = "WARC_HOOK_TYPE" )
Variables ¶
var ErrSkipFile = errors.New("skip file")
Functions ¶
This section is empty.
Types ¶
type CloseInputFileHook ¶
type CloseInputFileHook struct {
// contains filtered or unexported fields
}
func NewCloseInputFileHook ¶
func NewCloseInputFileHook(cmd, hook string) (CloseInputFileHook, error)
NewCloseInputFileHook creates a new CloseInputFileHook
cmd is the current warc subcommand. hook is the command/script to execute. returns a CloseInputFileHook or ErrCommandNotFound if the hook command is not found
func (CloseInputFileHook) Output ¶
func (h CloseInputFileHook) Output(fileName string, errorCount int64) ([]byte, error)
func (CloseInputFileHook) Run ¶
func (h CloseInputFileHook) Run(fileName string, errorCount int64) error
func (CloseInputFileHook) WithHash ¶
func (h CloseInputFileHook) WithHash(hash string) CloseInputFileHook
type CloseOutputFileHook ¶
type CloseOutputFileHook struct {
// contains filtered or unexported fields
}
func NewCloseOutputFileHook ¶
func NewCloseOutputFileHook(cmd, hook string) (CloseOutputFileHook, error)
NewCloseOutputFileHook creates a new CloseOutputFileHook
cmd is the current warc subcommand. hook is the command/script to execute. returns a CloseOutputFileHook or ErrCommandNotFound if the hook command is not found
func (CloseOutputFileHook) Run ¶
func (h CloseOutputFileHook) Run(fileName string, size int64, warcInfoId string) error
func (CloseOutputFileHook) WithErrorCount ¶
func (h CloseOutputFileHook) WithErrorCount(errorCount int64) CloseOutputFileHook
func (CloseOutputFileHook) WithHash ¶
func (h CloseOutputFileHook) WithHash(hash string) CloseOutputFileHook
func (CloseOutputFileHook) WithSrcFileName ¶
func (h CloseOutputFileHook) WithSrcFileName(srcFileName string) CloseOutputFileHook
type CommandNotFoundError ¶
type CommandNotFoundError struct {
// contains filtered or unexported fields
}
func (CommandNotFoundError) Error ¶
func (e CommandNotFoundError) Error() string
type OpenInputFileHook ¶
type OpenInputFileHook struct {
// contains filtered or unexported fields
}
func NewOpenInputFileHook ¶
func NewOpenInputFileHook(cmd, hook string) (OpenInputFileHook, error)
NewOpenInputFileHook creates a new OpenInputFileHook
cmd is the current warc subcommand. hook is the command/script to execute. returns an OpenInputFileHook or ErrCommandNotFound if the hook command is not found
func (OpenInputFileHook) Output ¶
func (h OpenInputFileHook) Output(fileName string) ([]byte, error)
func (OpenInputFileHook) Run ¶
func (h OpenInputFileHook) Run(fileName string) error
type OpenOutputFileHook ¶
type OpenOutputFileHook struct {
// contains filtered or unexported fields
}
func NewOpenOutputFileHook ¶
func NewOpenOutputFileHook(cmd, hook string) (OpenOutputFileHook, error)
NewOpenOutputFileHook creates a new OpenOutputFileHook
cmd is the current warc subcommand. hook is the command/script to execute. returns an OpenOutputFileHook or ErrCommandNotFound if the hook command is not found
func (OpenOutputFileHook) Output ¶
func (h OpenOutputFileHook) Output(fileName string) ([]byte, error)
func (OpenOutputFileHook) Run ¶
func (h OpenOutputFileHook) Run(fileName string) error
func (OpenOutputFileHook) WithSrcFileName ¶
func (h OpenOutputFileHook) WithSrcFileName(srcFileName string) OpenOutputFileHook