Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
func NewFormatter ¶
func NewFormatter(name string, setters ...FormatterOption) Formatter
type FormatterConstructor ¶
type FormatterConstructor func(config map[string]string) (IFormatter, error)
type FormatterError ¶
type FormatterError struct {
Message string
}
FormatterError custom error for Formatter
func (*FormatterError) Error ¶
func (e *FormatterError) Error() string
type FormatterOption ¶
type FormatterOption func(*Formatter)
func Description ¶
func Description(description string) FormatterOption
func Disabled ¶
func Disabled(disabled bool) FormatterOption
func ID ¶
func ID(id string) FormatterOption
func Name ¶
func Name(name string) FormatterOption
type FormatterRepository ¶
type FormatterRepository struct { Formatters map[string]IFormatter // contains filtered or unexported fields }
func GetFormatterRepository ¶
func GetFormatterRepository() *FormatterRepository
func NewFormatterRepository ¶
func NewFormatterRepository() FormatterRepository
func (*FormatterRepository) GetFormatter ¶
func (apr *FormatterRepository) GetFormatter(name string) (IFormatter, error)
func (*FormatterRepository) HasFormatter ¶
func (apr *FormatterRepository) HasFormatter(name string) bool
func (*FormatterRepository) LoadFormatters ¶
func (apr *FormatterRepository) LoadFormatters(path string) error
func (*FormatterRepository) RegisterFormatter ¶
func (apr *FormatterRepository) RegisterFormatter(formatter IFormatter) error
Click to show internal directories.
Click to hide internal directories.