Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Formats - Valid formats Formats = map[string]Format{ // contains filtered or unexported fields } )
Functions ¶
func SupportedFormats ¶
func SupportedFormats() []string
SupportedFormats - List of supported formats
Types ¶
type ColonNewline ¶
type ColonNewline struct{}
ColonNewline - The colon/newline delimited format
func (ColonNewline) GetName ¶
func (cn ColonNewline) GetName() string
GetName - Return the format's name
func (ColonNewline) GetPattern ¶
func (cn ColonNewline) GetPattern() *regexp.Regexp
GetPattern - Return the format's name
type Entry ¶
type Entry struct {
Email string `json:"email"`
User string `json:"user"`
Domain string `json:"domain"`
Password string `json:"password"`
}
Entry - A single entry
type Format ¶
type Format interface {
GetName() string
GetPattern() *regexp.Regexp
Normalize(line string) (string, string, string, string, error)
}
Format - Pair of line pattern and normalizer func
type Normalize ¶
type Normalize struct {
Format Format
Targets []string
Output *os.File
Recursive bool
SkipPrefix string
SkipSuffix string
Errors []error
// contains filtered or unexported fields
}
Normalize - Normalizer job
func GetNormalizer ¶
func GetNormalizer(format Format, target string, output string, recursive bool, skipPrefix, skipSuffix string) (*Normalize, error)
GetNormalizer - Start the normalizer
type SemicolonNewline ¶
type SemicolonNewline struct{}
SemicolonNewline - The colon/newline delimited format
func (SemicolonNewline) GetName ¶
func (cn SemicolonNewline) GetName() string
GetName - Return the format's name
func (SemicolonNewline) GetPattern ¶
func (cn SemicolonNewline) GetPattern() *regexp.Regexp
GetPattern - Return the format's name
type WhitespaceNewline ¶
type WhitespaceNewline struct{}
WhitespaceNewline - The colon/newline delimited format
func (WhitespaceNewline) GetName ¶
func (cn WhitespaceNewline) GetName() string
GetName - Return the format's name
func (WhitespaceNewline) GetPattern ¶
func (cn WhitespaceNewline) GetPattern() *regexp.Regexp
GetPattern - Return the format's name
Click to show internal directories.
Click to hide internal directories.