diff --git a/README.md b/README.md index 99532d8..fd777fa 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ go语言开发的[satori](https://satori.chat/zh-CN)协议的sdk客户端 [![](https://img.shields.io/github/license/dezhishen/satori-sdk-go.svg?logo=github)](./LICENSE) -[![](https://img.shields.io/github/stars/dezhishen/satori-sdk-go.svg?logo=github)](https://github.com/dezhishen/satori-sdk-go/stargazers) -[![](https://img.shields.io/github/forks/dezhishen/satori-sdk-go.svg?logo=github)](https://github.com/dezhishen/satori-sdk-go/network/members) -[![](https://img.shields.io/github/contributors/dezhishen/satori-sdk-go.svg?logo=github)](https://github.com/dezhishen/satori-sdk-go/graphs/contributors) +[![](https://img.shields.io/github/stars/dezhishen/satori-sdk-go.svg?logo=github)](https://github.com/satori-protocol-go/satori-sdk-go/stargazers) +[![](https://img.shields.io/github/forks/dezhishen/satori-sdk-go.svg?logo=github)](https://github.com/satori-protocol-go/satori-sdk-go/network/members) +[![](https://img.shields.io/github/contributors/dezhishen/satori-sdk-go.svg?logo=github)](https://github.com/satori-protocol-go/satori-sdk-go/graphs/contributors) -[![](https://img.shields.io/github/commit-activity/m/dezhishen/satori-sdk-go?logo=github)](https://github.com/dezhishen/satori-sdk-go/graphs/commit-activity) -[![](https://img.shields.io/github/last-commit/dezhishen/satori-sdk-go.svg?logo=github)](https://github.com/dezhishen/satori-sdk-go/commits) +[![](https://img.shields.io/github/commit-activity/m/dezhishen/satori-sdk-go?logo=github)](https://github.com/satori-protocol-go/satori-sdk-go/graphs/commit-activity) +[![](https://img.shields.io/github/last-commit/dezhishen/satori-sdk-go.svg?logo=github)](https://github.com/satori-protocol-go/satori-sdk-go/commits) [![wakatime](https://wakatime.com/badge/user/a2c981ca-317d-4b34-8ed9-4264fbfdb775/project/018b2817-27cb-454d-b957-5a4686855dcd.svg)](https://wakatime.com/badge/user/a2c981ca-317d-4b34-8ed9-4264fbfdb775/project/018b2817-27cb-454d-b957-5a4686855dcd) ## 架构图 ![](doc/images/架构图.png) @@ -46,8 +46,8 @@ go语言开发的[satori](https://satori.chat/zh-CN)协议的sdk客户端 - [x] Message - [x] API - [x] Event - - [x] ~~Model~~ 由[dezhishen/satori-model-go](https://github.com/dezhishen/satori-model-go)提供 - - [x] ~~[元素]构建器和解析器~~ 由[dezhishen/satori-model-go](https://github.com/dezhishen/satori-model-go)提供 + - [x] ~~Model~~ 由[dezhishen/satori-model-go](https://github.com/satori-protocol-go/satori-model-go)提供 + - [x] ~~[元素]构建器和解析器~~ 由[dezhishen/satori-model-go](https://github.com/satori-protocol-go/satori-model-go)提供 - [x] Reaction - [x] API - [x] Event diff --git a/examples/main.go b/examples/main.go index b6b42da..5a9a5e2 100644 --- a/examples/main.go +++ b/examples/main.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/dezhishen/satori-sdk-go/pkg/api" - "github.com/dezhishen/satori-sdk-go/pkg/config" - "github.com/dezhishen/satori-sdk-go/pkg/event" + "github.com/satori-protocol-go/satori-sdk-go/pkg/api" + "github.com/satori-protocol-go/satori-sdk-go/pkg/config" + "github.com/satori-protocol-go/satori-sdk-go/pkg/event" ) func main() { diff --git a/go.mod b/go.mod index 4256e24..f8240e5 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ -module github.com/dezhishen/satori-sdk-go +module github.com/satori-protocol-go/satori-sdk-go go 1.20 require ( - github.com/dezhishen/satori-model-go v0.0.4 github.com/gin-gonic/gin v1.9.1 + github.com/satori-protocol-go/satori-model-go v0.0.6 ) require ( diff --git a/go.sum b/go.sum index d057a0d..1ceb079 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,6 @@ github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnht github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/dezhishen/satori-model-go v0.0.4 h1:bN2T/wLo1Pn3itiw8UIcLf1zFdxfQYVBgHxFeO0llCw= -github.com/dezhishen/satori-model-go v0.0.4/go.mod h1:HmE03g6z9clHGKMXLJCwgBRlr4NN6Clsayubx628j84= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -190,6 +188,8 @@ github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9c github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/satori-protocol-go/satori-model-go v0.0.6 h1:Cxe6emS+gxTIU9NxmDUYqqDWcPX+me+zGqxqJn9G8iU= +github.com/satori-protocol-go/satori-model-go v0.0.6/go.mod h1:R+7VkMNjo74rCmvHijpmQywU/Ahc9DcC/0YUCaYYLuE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= diff --git a/pkg/api/api.go b/pkg/api/api.go index e7e208d..675f034 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -1,8 +1,8 @@ package api import ( - "github.com/dezhishen/satori-sdk-go/pkg/client" - "github.com/dezhishen/satori-sdk-go/pkg/config" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-sdk-go/pkg/config" ) type SatoriApi interface { diff --git a/pkg/api/channel.go b/pkg/api/channel.go index 2f160d2..dea4f59 100644 --- a/pkg/api/channel.go +++ b/pkg/api/channel.go @@ -1,8 +1,8 @@ package api import ( - "github.com/dezhishen/satori-model-go/pkg/channel" - "github.com/dezhishen/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-model-go/pkg/channel" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" ) type SatoriChannelApi interface { diff --git a/pkg/api/guild.go b/pkg/api/guild.go index cff2d56..2b188fd 100644 --- a/pkg/api/guild.go +++ b/pkg/api/guild.go @@ -1,8 +1,8 @@ package api import ( - "github.com/dezhishen/satori-model-go/pkg/guild" - "github.com/dezhishen/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-model-go/pkg/guild" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" ) type SatoriGuildApi interface { diff --git a/pkg/api/guildmember.go b/pkg/api/guildmember.go index 93f8c69..99cc298 100644 --- a/pkg/api/guildmember.go +++ b/pkg/api/guildmember.go @@ -1,8 +1,8 @@ package api import ( - "github.com/dezhishen/satori-model-go/pkg/guildmember" - "github.com/dezhishen/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-model-go/pkg/guildmember" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" ) type SatoriGuildMemberApi interface { diff --git a/pkg/api/guildrole.go b/pkg/api/guildrole.go index a838754..577582a 100644 --- a/pkg/api/guildrole.go +++ b/pkg/api/guildrole.go @@ -1,8 +1,8 @@ package api import ( - "github.com/dezhishen/satori-model-go/pkg/guildrole" - "github.com/dezhishen/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-model-go/pkg/guildrole" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" ) type SatoriGuildRoleApi interface { diff --git a/pkg/api/login.go b/pkg/api/login.go index ee3cb2b..01c459d 100644 --- a/pkg/api/login.go +++ b/pkg/api/login.go @@ -1,8 +1,8 @@ package api import ( - "github.com/dezhishen/satori-model-go/pkg/login" - "github.com/dezhishen/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-model-go/pkg/login" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" ) type SatoriLoginApi interface { diff --git a/pkg/api/message.go b/pkg/api/message.go index 803cde5..db19908 100644 --- a/pkg/api/message.go +++ b/pkg/api/message.go @@ -1,8 +1,8 @@ package api import ( - "github.com/dezhishen/satori-model-go/pkg/message" - "github.com/dezhishen/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-model-go/pkg/message" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" ) type SatoriMessageApi interface { diff --git a/pkg/api/reaction.go b/pkg/api/reaction.go index 9342c14..345ce2a 100644 --- a/pkg/api/reaction.go +++ b/pkg/api/reaction.go @@ -1,8 +1,8 @@ package api import ( - "github.com/dezhishen/satori-model-go/pkg/user" - "github.com/dezhishen/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-model-go/pkg/user" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" ) type SatoriReactionApi interface { diff --git a/pkg/api/user.go b/pkg/api/user.go index 4f53a1c..25e952f 100644 --- a/pkg/api/user.go +++ b/pkg/api/user.go @@ -1,8 +1,8 @@ package api import ( - "github.com/dezhishen/satori-model-go/pkg/user" - "github.com/dezhishen/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-model-go/pkg/user" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" ) type SatoriUserApi interface { diff --git a/pkg/client/api.go b/pkg/client/api.go index d02ff08..908f934 100644 --- a/pkg/client/api.go +++ b/pkg/client/api.go @@ -3,7 +3,7 @@ package client import ( "fmt" - "github.com/dezhishen/satori-sdk-go/pkg/config" + "github.com/satori-protocol-go/satori-sdk-go/pkg/config" ) type ApiTemplate interface { diff --git a/pkg/client/api_http.go b/pkg/client/api_http.go index f3b106e..740e084 100644 --- a/pkg/client/api_http.go +++ b/pkg/client/api_http.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/dezhishen/satori-sdk-go/pkg/config" + "github.com/satori-protocol-go/satori-sdk-go/pkg/config" ) type HttpChannel struct { diff --git a/pkg/client/api_ws.go b/pkg/client/api_ws.go index 0e2b82e..093e251 100644 --- a/pkg/client/api_ws.go +++ b/pkg/client/api_ws.go @@ -7,7 +7,7 @@ package client // "strings" // "time" -// "github.com/dezhishen/satori-sdk-go/pkg/config" +// "github.com/satori-protocol-go/satori-sdk-go/pkg/config" // "github.com/gorilla/websocket" // log "github.com/sirupsen/logrus" // ) diff --git a/pkg/client/event.go b/pkg/client/event.go index f6f1464..db36493 100644 --- a/pkg/client/event.go +++ b/pkg/client/event.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/dezhishen/satori-sdk-go/pkg/config" + "github.com/satori-protocol-go/satori-sdk-go/pkg/config" ) type EventTemplate interface { diff --git a/pkg/client/event_webhook.go b/pkg/client/event_webhook.go index 91405f3..aa42f1c 100644 --- a/pkg/client/event_webhook.go +++ b/pkg/client/event_webhook.go @@ -5,8 +5,8 @@ import ( "io" "net/http" - "github.com/dezhishen/satori-sdk-go/pkg/config" "github.com/gin-gonic/gin" + "github.com/satori-protocol-go/satori-sdk-go/pkg/config" ) type WebhookEventChannel struct { diff --git a/pkg/client/event_ws.go b/pkg/client/event_ws.go index 0d9216d..915ea9f 100644 --- a/pkg/client/event_ws.go +++ b/pkg/client/event_ws.go @@ -7,9 +7,9 @@ import ( "sync" "time" - "github.com/dezhishen/satori-sdk-go/pkg/config" - "github.com/dezhishen/satori-sdk-go/pkg/constant" "github.com/gorilla/websocket" + "github.com/satori-protocol-go/satori-sdk-go/pkg/config" + "github.com/satori-protocol-go/satori-sdk-go/pkg/constant" log "github.com/sirupsen/logrus" ) diff --git a/pkg/event/index.go b/pkg/event/index.go index e36777b..0b12b13 100644 --- a/pkg/event/index.go +++ b/pkg/event/index.go @@ -7,10 +7,10 @@ import ( log "github.com/sirupsen/logrus" - "github.com/dezhishen/satori-model-go/pkg/login" - "github.com/dezhishen/satori-sdk-go/pkg/client" - "github.com/dezhishen/satori-sdk-go/pkg/config" - "github.com/dezhishen/satori-sdk-go/pkg/constant" + "github.com/satori-protocol-go/satori-model-go/pkg/login" + "github.com/satori-protocol-go/satori-sdk-go/pkg/client" + "github.com/satori-protocol-go/satori-sdk-go/pkg/config" + "github.com/satori-protocol-go/satori-sdk-go/pkg/constant" "github.com/tidwall/gjson" ) diff --git a/pkg/event/model.go b/pkg/event/model.go index c949a98..eaae10a 100644 --- a/pkg/event/model.go +++ b/pkg/event/model.go @@ -1,13 +1,13 @@ package event import ( - "github.com/dezhishen/satori-model-go/pkg/channel" - "github.com/dezhishen/satori-model-go/pkg/guild" - "github.com/dezhishen/satori-model-go/pkg/guildmember" - "github.com/dezhishen/satori-model-go/pkg/guildrole" - "github.com/dezhishen/satori-model-go/pkg/login" - "github.com/dezhishen/satori-model-go/pkg/message" - "github.com/dezhishen/satori-model-go/pkg/user" + "github.com/satori-protocol-go/satori-model-go/pkg/channel" + "github.com/satori-protocol-go/satori-model-go/pkg/guild" + "github.com/satori-protocol-go/satori-model-go/pkg/guildmember" + "github.com/satori-protocol-go/satori-model-go/pkg/guildrole" + "github.com/satori-protocol-go/satori-model-go/pkg/login" + "github.com/satori-protocol-go/satori-model-go/pkg/message" + "github.com/satori-protocol-go/satori-model-go/pkg/user" ) type SignInfo struct { diff --git a/pkg/resource/guildmember/guildmember.go b/pkg/resource/guildmember/guildmember.go index 07fa748..20b1f73 100644 --- a/pkg/resource/guildmember/guildmember.go +++ b/pkg/resource/guildmember/guildmember.go @@ -1,6 +1,6 @@ package guildmember -import "github.com/dezhishen/satori-model-go/pkg/user" +import "github.com/satori-protocol-go/satori-model-go/pkg/user" type GuildMember struct { User *user.User `json:"user"` diff --git a/pkg/resource/login/login.go b/pkg/resource/login/login.go index 4686bdd..2b36c69 100644 --- a/pkg/resource/login/login.go +++ b/pkg/resource/login/login.go @@ -1,6 +1,6 @@ package login -import "github.com/dezhishen/satori-model-go/pkg/user" +import "github.com/satori-protocol-go/satori-model-go/pkg/user" type LoginStatus int32 diff --git a/pkg/resource/message/message.go b/pkg/resource/message/message.go index cbea1f7..5348055 100644 --- a/pkg/resource/message/message.go +++ b/pkg/resource/message/message.go @@ -1,10 +1,10 @@ package message import ( - "github.com/dezhishen/satori-model-go/pkg/channel" - "github.com/dezhishen/satori-model-go/pkg/guild" - "github.com/dezhishen/satori-model-go/pkg/guildmember" - "github.com/dezhishen/satori-model-go/pkg/user" + "github.com/satori-protocol-go/satori-model-go/pkg/channel" + "github.com/satori-protocol-go/satori-model-go/pkg/guild" + "github.com/satori-protocol-go/satori-model-go/pkg/guildmember" + "github.com/satori-protocol-go/satori-model-go/pkg/user" ) type Message struct {