Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWithConfig ¶ added in v0.0.2
NewWithConfig creates a logger with configuration options
Types ¶
type Config ¶ added in v0.0.2
type Config struct {
Debug bool
Hooks []Hook
Level zapcore.Level
Encoding string // "json" or "console"
}
Config is the logger configuration
type Hooks ¶ added in v0.0.2
type Hooks []Hook
Hooks is a slice of Hook that implements Hook interface
type MsgText ¶
type MsgText struct {
Content string `json:"content"`
}
MsgText is text message api model
type Option ¶ added in v0.0.2
type Option func(*Config)
Option configures the logger
func WithEncoding ¶ added in v0.0.2
WithEncoding sets the encoding format
type WeworkSender ¶
type WeworkSender struct {
BaseURL string `default:"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key="`
DebugKey string
WarnKey string
ErrorKey string
}
WeworkSender can send notification to wechat work.
func (WeworkSender) SendRobotMsg ¶
func (s WeworkSender) SendRobotMsg(key, content string) error
SendRobotMsg send robot message by wechat work web api
Click to show internal directories.
Click to hide internal directories.