Documentation ¶
Index ¶
- func AddMessage(message *Message)
- func AddProduct(product *Product)
- func AddSSHHost(s *SshHost) error
- func AddSshResult(s *SshResult) error
- func AddUser(user *User)
- func Connect(h *SshHost) (*ssh.Session, error)
- func DelMessage(message *Message)
- func DeleteProduct(product *Product)
- func DeleteSshHost(s *SshHost)
- func GbkToUtf8(str []byte) (b []byte, err error)
- func LogMessage(message *Message)
- func RegisterDatabase()
- type AppMsg
- type Content
- type Message
- type Product
- type QyInfo
- type QyToken
- type QywebchatRet
- type QywechatUser
- type QywechatUserlist
- type Sales
- type SshHost
- type SshResult
- type Stock
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMessage ¶
func AddMessage(message *Message)
func AddProduct ¶
func AddProduct(product *Product)
func AddSSHHost ¶
func AddSshResult ¶
func DelMessage ¶
func DelMessage(message *Message)
func DeleteProduct ¶
func DeleteProduct(product *Product)
func DeleteSshHost ¶
func DeleteSshHost(s *SshHost)
func LogMessage ¶
func LogMessage(message *Message)
func RegisterDatabase ¶
func RegisterDatabase()
Types ¶
type AppMsg ¶
type AppMsg struct { ToUser string `json:"touser,omitempty"` ToParty string `json:"toparty,omitempty"` ToTag string `json:"totag,omitempty"` Toall string `json:"toall,omitempty"` MsgType string `json:"msgtype,omitempty"` Agentid int `json:"agentid,omitempty"` Text *Content `json:"text,omitempty"` Safe int `json:"safe,omitempty"` }
微信提交内容结构体
type Message ¶
type Message struct { Id int `json:"id"` User string `json:"user"` Msg string `json:"msg" orm:"size(500)"` Time time.Time `json:"time"` }
func GetAllMessage ¶
func GetAllMessage() []*Message
func GetAllMessageByUsername ¶
type Product ¶
type Product struct { Id int Name string Type string Platform string Url string Price float32 Time time.Time }
func GetAllProduct ¶
func GetAllProduct() []*Product
type QyToken ¶
type QyToken struct { Errcode int `json:"errcode"` Errmsg string `json:"errmsg"` Access_token string `json:"access_token"` Expries_in int `json:"expires_in"` Agentid int `json:"agentid"` }
企业微信的令牌返回结构体
func GetQyToken ¶
type QywebchatRet ¶
type QywebchatRet struct { Errcode int `json:"errcode"` Errmsg string `json:"errmsg"` InvalidUser string `json:"invaliduser"` }
func SendData ¶
func SendData(msg *AppMsg, token *QyToken) (ret *QywebchatRet)
func SendToUser ¶
func SendToUser(user string, msg string, token *QyToken) (ret *QywebchatRet)
type QywechatUser ¶
type QywechatUserlist ¶
type QywechatUserlist struct {
UserList []*QywechatUser `json:"userlist"`
}
func GetAllWXUser ¶
func GetAllWXUser(token *QyToken) (Qy *QywechatUserlist)
type SshHost ¶
type SshHost struct { Id int Host string `orm:"size(32)"` Port int Username string `orm:"size(32)"` Password string `orm:"size(64)"` }
func GetAllSshHost ¶
func GetAllSshHost() []*SshHost
func GetSshHost ¶
func NewSshHost ¶
type SshResult ¶
type SshResult struct { Id int Host string Success string Type string Content string Result string Time time.Time }
func ExecCommands ¶
func GetAllSshResult ¶
func GetAllSshResult() []*SshResult
Click to show internal directories.
Click to hide internal directories.