Browse Source

upgrades

master
LinskRuis.32G 4 years ago
parent
commit
458573c599
  1. 18
      core/cloud/commCloud/api.go
  2. 18
      core/cloud/userCloud/api.go
  3. 2
      go.mod
  4. 4
      go.sum

18
core/cloud/commCloud/api.go

@ -10,15 +10,21 @@ const (
RPCHostCode = 1
)
func NewReq(method string, ipr ...string) (*hbtp.Request, error) {
func NewReq(method string, ipr string) (*hbtp.Request, error) {
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"])
return hbtp.NewDoReq(host, RPCHostCode, method, nil, ipr...)
return hbtp.NewDoRPCReq(host, RPCHostCode, method, ipr, nil)
}
func DoJson(method string, in, out interface{}, hd ...map[string]interface{}) error {
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"])
return hbtp.DoRPCJson(host, RPCHostCode, method, nil, in, out, hd...)
req, err := NewReq(method, "")
if err != nil {
return err
}
return hbtp.DoJson(req, in, out, hd...)
}
func DoString(method string, in interface{}, hd ...hbtp.Mp) (int, []byte, error) {
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"])
return hbtp.DoRPCString(host, RPCHostCode, method, nil, in, hd...)
req, err := NewReq(method, "")
if err != nil {
return 0, nil, err
}
return hbtp.DoString(req, in, hd...)
}

18
core/cloud/userCloud/api.go

@ -10,15 +10,21 @@ const (
RPCHostCode = 2
)
func NewReq(method string, ipr ...string) (*hbtp.Request, error) {
func NewReq(method string, ipr string) (*hbtp.Request, error) {
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"])
return hbtp.NewDoReq(host, RPCHostCode, method, nil, ipr...)
return hbtp.NewDoRPCReq(host, RPCHostCode, method, ipr, nil)
}
func DoJson(method string, in, out interface{}, hd ...map[string]interface{}) error {
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"])
return hbtp.DoRPCJson(host, RPCHostCode, method, nil, in, out, hd...)
req, err := NewReq(method, "")
if err != nil {
return err
}
return hbtp.DoJson(req, in, out, hd...)
}
func DoString(method string, in interface{}, hd ...hbtp.Mp) (int, []byte, error) {
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"])
return hbtp.DoRPCString(host, RPCHostCode, method, nil, in, hd...)
req, err := NewReq(method, "")
if err != nil {
return 0, nil, err
}
return hbtp.DoString(req, in, hd...)
}

2
go.mod

@ -6,7 +6,7 @@ require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/gin-gonic/gin v1.7.1
github.com/go-sql-driver/mysql v1.5.0
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428065711-bd49ee675caf
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428072149-37ef706dc11f
github.com/mgr9525/go-cloud v1.0.6-0.20210425153348-0292a9ccd8f8
github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056
github.com/qiniu/qmgo v0.9.2

4
go.sum

@ -103,6 +103,10 @@ github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428064104-cf9d03801c9
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428064104-cf9d03801c90/go.mod h1:U2OZ06VD1PHu3ZLZ8tuEHooaOZnoke/4ZKAZfL44bUQ=
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428065711-bd49ee675caf h1:thhSwQ/vGaKwfjtfAQkzvIOalS1qdO744fycNGGAMyE=
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428065711-bd49ee675caf/go.mod h1:U2OZ06VD1PHu3ZLZ8tuEHooaOZnoke/4ZKAZfL44bUQ=
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428071134-d17a92cd6e53 h1:OSD3MNKWw1Cg5SDf9cJ4C2ykzkwWfKL4nI2hsWL9qN0=
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428071134-d17a92cd6e53/go.mod h1:U2OZ06VD1PHu3ZLZ8tuEHooaOZnoke/4ZKAZfL44bUQ=
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428072149-37ef706dc11f h1:LeHvOXTRUGaVRpNl0KWCh/dKrLgsqhR/R/gzkOBxW8A=
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210428072149-37ef706dc11f/go.mod h1:U2OZ06VD1PHu3ZLZ8tuEHooaOZnoke/4ZKAZfL44bUQ=
github.com/mgr9525/go-cloud v1.0.6-0.20210425153348-0292a9ccd8f8 h1:0OloknN3axz+XuBpc6OpTtVIlCE2GoUhvS3NP4tc354=
github.com/mgr9525/go-cloud v1.0.6-0.20210425153348-0292a9ccd8f8/go.mod h1:VkCKgivVD2OX75Zwh+AO3zuJyxGCsuo0zdy+UXCYy9I=
github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056 h1:JhXsFUB3mFWwiDc8c//E/6cUazJUX1lIiLgiM0asNjA=

Loading…
Cancel
Save