Skip to content

Commit ee982c9

Browse files
committed
Merge branch 'release/1.0.0-alpha.1'
2 parents 21659cc + c3eec7c commit ee982c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+7225
-150
lines changed

.gitignore

Lines changed: 100 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
/Gopkg.lock
66

77

8-
# Created by https://www.gitignore.io/api/go,vim,linux,emacs,macos,visualstudiocode
9-
# Edit at https://www.gitignore.io/?templates=go,vim,linux,emacs,macos,visualstudiocode
8+
# Created by https://www.toptal.com/developers/gitignore/api/go,vim,linux,emacs,macos,visualstudiocode,intellij+all
9+
# Edit at https://www.toptal.com/developers/gitignore?templates=go,vim,linux,emacs,macos,visualstudiocode,intellij+all
1010

1111
### Emacs ###
1212
# -*- mode: gitignore; -*-
@@ -67,16 +67,108 @@ flycheck_*.el
6767
*.so
6868
*.dylib
6969

70-
# Test binary, build with `go test -c`
70+
# Test binary, built with `go test -c`
7171
*.test
7272

7373
# Output of the go coverage tool, specifically when used with LiteIDE
7474
*.out
7575

76+
# Dependency directories (remove the comment below to include it)
77+
# vendor/
78+
7679
### Go Patch ###
7780
/vendor/
7881
/Godeps/
7982

83+
### Intellij+all ###
84+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
85+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
86+
87+
# User-specific stuff
88+
.idea/**/workspace.xml
89+
.idea/**/tasks.xml
90+
.idea/**/usage.statistics.xml
91+
.idea/**/dictionaries
92+
.idea/**/shelf
93+
94+
# Generated files
95+
.idea/**/contentModel.xml
96+
97+
# Sensitive or high-churn files
98+
.idea/**/dataSources/
99+
.idea/**/dataSources.ids
100+
.idea/**/dataSources.local.xml
101+
.idea/**/sqlDataSources.xml
102+
.idea/**/dynamic.xml
103+
.idea/**/uiDesigner.xml
104+
.idea/**/dbnavigator.xml
105+
106+
# Gradle
107+
.idea/**/gradle.xml
108+
.idea/**/libraries
109+
110+
# Gradle and Maven with auto-import
111+
# When using Gradle or Maven with auto-import, you should exclude module files,
112+
# since they will be recreated, and may cause churn. Uncomment if using
113+
# auto-import.
114+
# .idea/artifacts
115+
# .idea/compiler.xml
116+
# .idea/jarRepositories.xml
117+
# .idea/modules.xml
118+
# .idea/*.iml
119+
# .idea/modules
120+
# *.iml
121+
# *.ipr
122+
123+
# CMake
124+
cmake-build-*/
125+
126+
# Mongo Explorer plugin
127+
.idea/**/mongoSettings.xml
128+
129+
# File-based project format
130+
*.iws
131+
132+
# IntelliJ
133+
out/
134+
135+
# mpeltonen/sbt-idea plugin
136+
.idea_modules/
137+
138+
# JIRA plugin
139+
atlassian-ide-plugin.xml
140+
141+
# Cursive Clojure plugin
142+
.idea/replstate.xml
143+
144+
# Crashlytics plugin (for Android Studio and IntelliJ)
145+
com_crashlytics_export_strings.xml
146+
crashlytics.properties
147+
crashlytics-build.properties
148+
fabric.properties
149+
150+
# Editor-based Rest Client
151+
.idea/httpRequests
152+
153+
# Android studio 3.1+ serialized cache file
154+
.idea/caches/build_file_checksums.ser
155+
156+
### Intellij+all Patch ###
157+
# Ignores the whole .idea folder and all .iml files
158+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
159+
160+
.idea/
161+
162+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
163+
164+
*.iml
165+
modules.xml
166+
.idea/misc.xml
167+
*.ipr
168+
169+
# Sonarlint plugin
170+
.idea/sonarlint
171+
80172
### Linux ###
81173

82174
# temporary files which can be created if a process still has a handle open of a deleted file
@@ -98,7 +190,7 @@ flycheck_*.el
98190
.LSOverride
99191

100192
# Icon must end with two \r
101-
Icon
193+
Icon
102194

103195
# Thumbnails
104196
._*
@@ -122,13 +214,15 @@ Temporary Items
122214
### Vim ###
123215
# Swap
124216
[._]*.s[a-v][a-z]
217+
!*.svg # comment out if you don't need vector files
125218
[._]*.sw[a-p]
126219
[._]s[a-rt-v][a-z]
127220
[._]ss[a-gi-z]
128221
[._]sw[a-p]
129222

130223
# Session
131224
Session.vim
225+
Sessionx.vim
132226

133227
# Temporary
134228
.netrwhist
@@ -143,9 +237,10 @@ tags
143237
!.vscode/tasks.json
144238
!.vscode/launch.json
145239
!.vscode/extensions.json
240+
*.code-workspace
146241

147242
### VisualStudioCode Patch ###
148243
# Ignore all local history of files
149244
.history
150245

151-
# End of https://www.gitignore.io/api/go,vim,linux,emacs,macos,visualstudiocode
246+
# End of https://www.toptal.com/developers/gitignore/api/go,vim,linux,emacs,macos,visualstudiocode,intellij+all

.golangci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
run:
2+
timeout: 2m
3+
4+
linters:
5+
enable:
6+
# enabled by default
7+
# https://golangci-lint.run/usage/linters/
8+
- govet
9+
- errcheck
10+
- staticcheck
11+
- unused
12+
- gosimple
13+
- structcheck
14+
- varcheck
15+
- ineffassign
16+
- deadcode
17+
- typecheck
18+
# project additions
19+
# keep this list alphabetically sorted
20+
- bodyclose
21+
- goconst
22+
# - gofmt -- goimports contains this
23+
- goimports
24+
- gosec
25+
- misspell
26+
- nakedret
27+
- nolintlint
28+
- prealloc
29+
- unconvert
30+
31+
linters-settings:
32+
gofmt:
33+
simplify: true
34+
goimports:
35+
local-prefixes: github.com/xen0n/go-workwx
36+
misspell:
37+
locale: US
38+
nakedret:
39+
max-func-lines: 1

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
language: go
22
go:
3-
- "1.12.x"
43
- "1.13.x"
4+
- "1.14.x"
5+
- "1.15.x"
56
go_import_path: github.com/xen0n/go-workwx
67
branches:
78
# https://bors.tech/documentation/getting-started/
@@ -13,12 +14,13 @@ branches:
1314
- 'develop'
1415
- 'master'
1516
cache:
16-
- $GOPATH/pkg/dep
17+
- $HOME/.cache/go-build
18+
- $GOPATH/pkg/mod
1719
before_install:
1820
- export GO111MODULE=on
19-
- go get -u -v honnef.co/go/tools/cmd/staticcheck
21+
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.33.0
22+
- ./ci/run-lint.sh
2023
install:
2124
- go install -v ./...
2225
script:
23-
- ./ci/run-lint.sh
2426
- go test -v ./...

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ in at least 2 of Qiniu's internal systems.
3636

3737
## Features
3838

39+
* 支持最近 3 个 Go 版本
3940
* 包名短
4041
* 支持覆盖 API `Host`,用于自己拦一层网关、临时调试等等奇葩需求
4142
* 支持使用自定义 `http.Client`
@@ -61,7 +62,8 @@ in at least 2 of Qiniu's internal systems.
6162
* [x] 通讯录管理 (**部分支持**,见下)
6263
* [ ] 外部联系人管理
6364
* [ ] 应用管理
64-
* [x] 消息发送 (除接收消息、修改群聊会话外全部支持)
65+
* [x] 消息发送 (除修改群聊会话外全部支持)
66+
* [x] 消息接收 (**接口尚不稳定,极有可能做出不兼容改动,先不要用**)
6567
* [x] 素材管理 (**支持上传**, 见下)
6668

6769
<details>
@@ -108,8 +110,29 @@ in at least 2 of Qiniu's internal systems.
108110
<summary>外部联系人管理 API</summary>
109111

110112
* [ ] 离职成员的外部联系人再分配
111-
* [ ] 成员对外信息
112-
* [ ] 获取外部联系人详情
113+
* [x] 成员对外信息
114+
* [x] 客户管理
115+
- [x] 获取客户列表
116+
- [x] 获取客户详情
117+
- [x] 修改客户备注信息
118+
* [x] 客户标签管理
119+
- [x] 管理企业标签
120+
- [x] 编辑客户企业标签
121+
* [x] 变更回调通知
122+
- [x] 添加企业客户事件
123+
- [x] 编辑企业客户事件
124+
- [x] 外部联系人免验证添加成员事件
125+
- [x] 删除企业客户事件
126+
- [x] 删除跟进成员事件
127+
- [x] 客户接替失败事件
128+
- [x] 客户群变更事件
129+
130+
</details>
131+
132+
<details>
133+
<summary>身份验证 API</summary>
134+
135+
* [x] 获取访问用户身份
113136

114137
</details>
115138

@@ -129,7 +152,7 @@ in at least 2 of Qiniu's internal systems.
129152
<summary>消息发送 API</summary>
130153

131154
* [x] 发送应用消息
132-
* [ ] 接收消息
155+
* [x] 接收消息
133156
* [x] 发送消息到群聊会话
134157
- [x] 创建群聊会话
135158
- [ ] 修改群聊会话

accesstoken.go

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)