log

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Url = "url"
	Err = "err"
)
View Source
const (
	DingBaseUrl = "https://oapi.dingtalk.com/robot/send?access_token="
)

Variables

This section is empty.

Functions

func AssembleURL

func AssembleURL() string

AssembleURL 组装url

func Text

func Text(url string, err error) logrus.Fields

Types

type DingHook

type DingHook struct {
	Webhook *url.URL // 钉钉机器人的 Webhook URL
	// contains filtered or unexported fields
}

func NewDingHook

func NewDingHook(webhook string, client *http.Client) (*DingHook, error)

func (*DingHook) Fire

func (dh *DingHook) Fire(entry *logrus.Entry) error

func (*DingHook) Levels

func (dh *DingHook) Levels() []logrus.Level

type DingResponse

type DingResponse struct {
	ErrCode int64  `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL