server

package
v0.0.0-...-54ebfb4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	ErrCode     int    `json:"errcode"`
	ErrMsg      string `json:"errmsg"`
	AccessToken string `json:"access_token"`
}

func GetAccessToken

func GetAccessToken(corpId string, corpSecret string) (AccessToken, error)

获取 access_token

type CodeUserInfo

type CodeUserInfo struct {
	ErrCode  int    `json:"errcode"`
	ErrMsg   string `json:"errmsg"`
	Userid   string `json:"userid"`
	DeviceId string `json:"deviceId"`
	IsSys    bool   `json:"is_sys"`
	SysLevel int    `json:"sys_level"`
}

func GetBaseByCode

func GetBaseByCode(access_token string, code string) (CodeUserInfo, error)

通过CODE换取用户身份

type DingOpenResult

type DingOpenResult struct {
	Ding_open_errcode int    `json:"ding_open_errcode"`
	Error_msg         string `json:" error_msg"`
	Success           bool   `json:" success"`
	Task_id           int    `json:"  task_id"`
}

func Asyncsend

func Asyncsend(access_token string, method string, msgtype string, agent_id string, user_id_list string, dept_id_list string, to_all_user string, msgcontent string, code string) (DingOpenResult, error)

type ErrCodeMsg

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

type JsApiToken

type JsApiToken struct {
	ErrCode   int    `json:"errcode"`
	ErrMsg    string `json:"errmsg"`
	Ticket    string `json:"ticket"`
	ExpiresIn int    `json:"expires_in"`
}

func GetJsApiToken

func GetJsApiToken(access_token string) (JsApiToken, error)

获取 js token

type UserInfo

type UserInfo struct {
	ErrCode   int    `json:"errcode"`
	ErrMsg    string `json:"errmsg"`
	Userid    string `json:"userid"`
	Name      string `json:"name"`
	Tel       string `json:"tel"`
	WorkPlace string `json:"workPlace"`
	Remark    string `json:"remark"`
	Mobile    string `json:"mobile"`
	Email     string `json:"email"`
	Active    bool   `json:"active"`
	IsAdmin   bool   `json:"isAdmin"`
	IsBoss    bool   `json:"isBoss"`
	DingId    string `json:"dingId"`
	Unionid   string `json:"unionid"`
	Position  string `json:"position"`
	Avatar    string `json:"avatar"`
	Jobnumber string `json:"jobnumber"`
}

func GetUserByUserid

func GetUserByUserid(access_token string, userid string) (UserInfo, error)

获取成员详情

Jump to

Keyboard shortcuts

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