Documentation ¶
Index ¶
- func AcceptJSONResponse(ctx *gin.Context) bool
- func CaptureException(err error)
- func CaptureRequest(r *http.Request)
- func CloseSentry()
- func EchoInfo(msg string)
- func FetchURL(verb string, url string, payload string, headers map[string]string) (int, string, error)
- func FetchURLWithRetry(verb string, url string, payload string, headers map[string]string, ...) (int, string, error)
- func GetBaseURL(endpoint_url string) string
- func GetCurrPath() string
- func GetYYYYMM() string
- func GetYYYYMMDD() string
- func InitSentry(dsn string, is_client bool) error
- func IsValidEmail(email string) bool
- func IsValidURL(url_str string) bool
- func Lookup(text string, lang string) (string, error)
- func ReportEvent(event_id UserDefinedEvent, eventMessage string, payLoad map[string]interface{})
- func SendEmail(to, subject, body string) error
- func SetExtra(key string, value interface{})
- func SetTag(key, value string)
- func SetUser(id string)
- func Translate(text string, lang string) (string, error)
- type LogFile
- type UserDefinedEvent
- type UserDefinedEventMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptJSONResponse ¶
func FetchURLWithRetry ¶
func GetBaseURL ¶
func GetCurrPath ¶
func GetCurrPath() string
func GetYYYYMMDD ¶
func GetYYYYMMDD() string
func IsValidEmail ¶
func IsValidURL ¶
func ReportEvent ¶
func ReportEvent(event_id UserDefinedEvent, eventMessage string, payLoad map[string]interface{})
ReportCustomEvent 上报定制事件
Types ¶
type UserDefinedEvent ¶
type UserDefinedEvent int
const ( // execute host command on local machine EVT_CLIENT_INIT UserDefinedEvent = iota EVT_CLIENT_CLOSE EVT_CLIENT_ASK_CHATGPT EVT_CLIENT_ANSWER_CHATGPT EVT_SERVER_INIT EVT_SERVER_CLOSE EVT_SERVER_PROXY_SUCCESS EVT_SERVER_PROXY_FAILED )
type UserDefinedEventMeta ¶
Click to show internal directories.
Click to hide internal directories.