Documentation ¶
Index ¶
- Variables
- func AddLogHook(hook *LogHook)
- func DecodeString(s string) (string, error)
- func EncodeString(s string) (string, error)
- func GetColoredFormatter() *prefixed.TextFormatter
- func GetJsonLogger() *logrus.Logger
- func GetLogFields(m map[string]interface{}) map[string]interface{}
- func GetLogLevels(subset string) []logrus.Level
- func GetLogger() *logrus.Logger
- func GetPosition(frameSkip int) (string, string, int)
- func Run(cnf *Config)
- func StartTwitter()
- type Config
- type ConfigOrigin
- type ConfigPath
- type ConfigPathfinder
- type ConfigTag
- type ConfigTagMap
- type DecodeFailed
- type Error
- type LogHook
- type MaxPayloadSizeError
- type Origin
- type Path
- type RegexMatchFailed
- type Twitter
- func (t *Twitter) FindPath() *Path
- func (t *Twitter) GetCue() string
- func (t *Twitter) GetMaxPayloadSize() int
- func (t *Twitter) GetName() string
- func (t *Twitter) GetPrefix() string
- func (t *Twitter) GetSuffix() string
- func (t *Twitter) SetCue(s string) error
- func (t *Twitter) SetPrefix(s string) error
- func (t *Twitter) SetSuffix(s string) error
- func (t *Twitter) Start()
Constants ¶
This section is empty.
Variables ¶
View Source
var AllLevels = logrus.AllLevels
View Source
var DebugLevel = logrus.DebugLevel
View Source
var ErrorLevel = logrus.ErrorLevel
View Source
var FatalLevel = logrus.FatalLevel
View Source
var Handle func(p Path)
View Source
var InfoLevel = logrus.InfoLevel
View Source
var Logger *logrus.Logger
View Source
var PanicLevel = logrus.PanicLevel
View Source
var WarnLevel = logrus.WarnLevel
Functions ¶
func AddLogHook ¶
func AddLogHook(hook *LogHook)
func DecodeString ¶
func EncodeString ¶
func GetColoredFormatter ¶
func GetColoredFormatter() *prefixed.TextFormatter
func GetJsonLogger ¶
func GetLogFields ¶
func GetLogLevels ¶
func StartTwitter ¶
func StartTwitter()
Types ¶
type Config ¶
type Config struct {
Pathfinder ConfigPathfinder `yaml:"pathfinder"`
}
func ReadConfig ¶
type ConfigOrigin ¶
type ConfigOrigin struct {
Enable bool `yaml:"bool"`
}
type ConfigPath ¶
type ConfigPathfinder ¶
type ConfigPathfinder struct { Path ConfigPath `yaml:"path"` TagMap ConfigTagMap `yaml:"tagmap"` Origins map[string]ConfigOrigin `yaml:"origins"` }
type ConfigTagMap ¶
type DecodeFailed ¶
type DecodeFailed struct { }
func (DecodeFailed) DecodeFailed ¶
func (e DecodeFailed) DecodeFailed() bool
func (DecodeFailed) Error ¶
func (e DecodeFailed) Error() string
func (DecodeFailed) MaxPayloadSize ¶
func (e DecodeFailed) MaxPayloadSize() bool
func (DecodeFailed) RegexMatchFailed ¶
func (e DecodeFailed) RegexMatchFailed() bool
func (DecodeFailed) Timeout ¶
func (e DecodeFailed) Timeout() bool
type Error ¶
type Error interface { error Timeout() bool MaxPayloadSize() bool RegexMatchFailed() bool DecodeFailed() bool }
func NewDecodeFailed ¶
func NewDecodeFailed() Error
func NewMaxPayloadSizeError ¶
func NewRegexMatchFailed ¶
func NewRegexMatchFailed() Error
type LogHook ¶
WriterHook is a hook that writes logs of specified LogLevels to specified Writer
type MaxPayloadSizeError ¶
type MaxPayloadSizeError struct {
// contains filtered or unexported fields
}
func (MaxPayloadSizeError) DecodeFailed ¶
func (e MaxPayloadSizeError) DecodeFailed() bool
func (MaxPayloadSizeError) Error ¶
func (e MaxPayloadSizeError) Error() string
func (MaxPayloadSizeError) MaxPayloadSize ¶
func (e MaxPayloadSizeError) MaxPayloadSize() bool
func (MaxPayloadSizeError) RegexMatchFailed ¶
func (e MaxPayloadSizeError) RegexMatchFailed() bool
func (MaxPayloadSizeError) Timeout ¶
func (e MaxPayloadSizeError) Timeout() bool
type Path ¶
type Path struct { Origin string OriginPrefix string OriginSuffix string Time *time.Time FullText string MatchText string DecodedEntities []ConfigTag Metadata map[string]string }
func HandleArbitrary ¶
func HandleTagged ¶
type RegexMatchFailed ¶
type RegexMatchFailed struct { }
func (RegexMatchFailed) DecodeFailed ¶
func (e RegexMatchFailed) DecodeFailed() bool
func (RegexMatchFailed) Error ¶
func (e RegexMatchFailed) Error() string
func (RegexMatchFailed) MaxPayloadSize ¶
func (e RegexMatchFailed) MaxPayloadSize() bool
func (RegexMatchFailed) RegexMatchFailed ¶
func (e RegexMatchFailed) RegexMatchFailed() bool
func (RegexMatchFailed) Timeout ¶
func (e RegexMatchFailed) Timeout() bool
type Twitter ¶
type Twitter struct { ConsumerKey string `env:"TWITTER_CONSUMER_KEY,required"` ConsumerSecret string `env:"TWITTER_CONSUMER_SECRET,required"` AccessToken string `env:"TWITTER_ACCESS_TOKEN,required"` AccessSecret string `env:"TWITTER_ACCESS_SECRET,required"` // contains filtered or unexported fields }
func NewTwitter ¶
func (*Twitter) GetMaxPayloadSize ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.