utils

package
v0.0.0-...-a39b5b7 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

web weixin client

Index

Constants

View Source
const (
	//EmoticonQuest 颜文字指令关键词
	EmoticonQuest = "颜文字"
	//LoveWordsQuest 情话指令关键词
	LoveWordsQuest = "lovewords"
)

Variables

View Source
var Debug = flag.String("d", "on", "if on debug mode")

Functions

func GenerateID

func GenerateID() string

GenerateID unique Id based on unix nano id

func NewServiceError

func NewServiceError(msg string) error

NewServiceError 自定义错误func

func SimpleHTTPPost

func SimpleHTTPPost(urlstr string, params interface{}) ([]byte, error)

SimpleHTTPPost simple post json func

Types

type ServiceError

type ServiceError struct {
	Msg string
}

ServiceError 自定义错误

func (*ServiceError) Error

func (e *ServiceError) Error() string

type TuringAPIRequest

type TuringAPIRequest struct {
	ReqType int16 `json:"reqType"`

	Perception *turingPerception `json:"perception"`

	UserInfo *turingUserInfo `json:"userInfo"`
}

TuringAPIRequest 图灵api请求结构体

type TuringAPIResponse

type TuringAPIResponse struct {
	Intent *turingAPIIntent `json:"intent"`

	Results []turingAPIResult `json:"results"`
}

TuringAPIResponse 图灵api返回结构体

type Wxweb

type Wxweb struct {
	SyncKey map[string]interface{}

	User        map[string]interface{}
	BaseRequest map[string]interface{}
	// contains filtered or unexported fields
}

func (*Wxweb) Start

func (wxweb *Wxweb) Start()

Jump to

Keyboard shortcuts

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