Skip to content

Commit f806e61

Browse files
committed
perf: update api and deps
1 parent 94f1656 commit f806e61

18 files changed

Lines changed: 3437 additions & 1767 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
prerelease: false
4040
- uses: actions/setup-go@v2
4141
with:
42-
go-version: '1.23.x' # The Go version to download (if necessary) and use.
42+
go-version: 'stable' # The Go version to download (if necessary) and use.
4343
- name: Make Build
4444
id: make_build
4545
env:

cmd/impl/convert_model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
)
88

99
var modelLoginFrom = map[pb.Session_LoginFrom]model.LabelField{
10-
pb.Session_WT: model.LoginFromWT,
11-
pb.Session_ST: model.LoginFromST,
10+
pb.Session_WT: model.LoginFromWeb,
11+
pb.Session_ST: model.LoginFromSSH,
1212
pb.Session_RT: model.LoginFromRT,
1313
pb.Session_DT: model.LoginFromDT,
1414
}

cmd/impl/convert_pb.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ func ConvertToPbLoginFrom(s model.LabelField) pb.Session_LoginFrom {
198198
}
199199

200200
var pbLoginFrom = map[model.LabelField]pb.Session_LoginFrom{
201-
model.LoginFromWT: pb.Session_WT,
202-
model.LoginFromST: pb.Session_ST,
203-
model.LoginFromRT: pb.Session_RT,
204-
model.LoginFromDT: pb.Session_DT,
201+
model.LoginFromWeb: pb.Session_WT,
202+
model.LoginFromSSH: pb.Session_ST,
203+
model.LoginFromRT: pb.Session_RT,
204+
model.LoginFromDT: pb.Session_DT,
205205
}
206206

207207
func ConvertToPbTicketInfo(info *model.TicketInfo) *pb.TicketInfo {

cmd/impl/jms_chat.go

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package impl
2+
3+
import (
4+
"context"
5+
6+
"github.com/go-viper/mapstructure/v2"
7+
"github.com/jumpserver/wisp/pkg/logger"
8+
pb "github.com/jumpserver/wisp/protobuf-go/protobuf"
9+
"google.golang.org/protobuf/types/known/structpb"
10+
)
11+
12+
func (j *JMServer) GetAccountChat(ctx context.Context, req *pb.Empty) (*pb.AccountDetailResponse, error) {
13+
var (
14+
status pb.Status
15+
)
16+
accountChatDetail, err := j.apiClient.GetAccountsChat()
17+
if err != nil {
18+
logger.Errorf("GetAccountChat: %v", err)
19+
status.Err = err.Error()
20+
return &pb.AccountDetailResponse{
21+
Status: &status,
22+
}, nil
23+
}
24+
var m map[string]interface{}
25+
err = mapstructure.Decode(accountChatDetail, &m)
26+
if err != nil {
27+
logger.Errorf("mapstructure decode: %v", err)
28+
status.Err = err.Error()
29+
return &pb.AccountDetailResponse{
30+
Status: &status,
31+
}, nil
32+
}
33+
st, err1 := structpb.NewStruct(m)
34+
if err1 != nil {
35+
status.Err = err1.Error()
36+
return &pb.AccountDetailResponse{
37+
Status: &status,
38+
}, nil
39+
}
40+
return &pb.AccountDetailResponse{Status: &status, Payload: st}, nil
41+
}

go.mod

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
module github.com/jumpserver/wisp
22

3-
go 1.23
3+
go 1.24.6
44

55
require (
6-
github.com/Azure/azure-storage-blob-go v0.14.0
7-
github.com/aliyun/aliyun-oss-go-sdk v2.2.8+incompatible
6+
github.com/Azure/azure-storage-blob-go v0.15.0
7+
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
88
github.com/aws/aws-sdk-go v1.44.306
99
github.com/elastic/go-elasticsearch/v6 v6.8.5
1010
github.com/elastic/go-elasticsearch/v8 v8.14.0
11+
github.com/go-viper/mapstructure/v2 v2.4.0
1112
github.com/gorilla/websocket v1.5.3
12-
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.21.12+incompatible
13-
github.com/jumpserver-dev/sdk-go v0.0.0-20250708045559-e0977dde0649
14-
github.com/sirupsen/logrus v1.8.1
15-
github.com/spf13/cobra v1.6.1
16-
github.com/spf13/viper v1.14.0
17-
golang.org/x/crypto v0.27.0
13+
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.25.4+incompatible
14+
github.com/jumpserver-dev/sdk-go v0.0.0-20250925081620-d22b2b8e24d1
15+
github.com/sirupsen/logrus v1.9.3
16+
github.com/spf13/cobra v1.10.1
17+
github.com/spf13/viper v1.21.0
18+
golang.org/x/crypto v0.42.0
1819
google.golang.org/grpc v1.65.0
1920
google.golang.org/protobuf v1.34.2
2021
gopkg.in/natefinch/lumberjack.v2 v2.2.1
@@ -25,40 +26,34 @@ require (
2526
github.com/LeeEirc/httpsig v1.2.1 // indirect
2627
github.com/dlclark/regexp2 v1.11.4 // indirect
2728
github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect
28-
github.com/fsnotify/fsnotify v1.6.0 // indirect
29+
github.com/fsnotify/fsnotify v1.9.0 // indirect
2930
github.com/go-logr/logr v1.4.1 // indirect
3031
github.com/go-logr/stdr v1.2.2 // indirect
3132
github.com/go-ole/go-ole v1.2.6 // indirect
3233
github.com/google/uuid v1.6.0 // indirect
33-
github.com/hashicorp/hcl v1.0.0 // indirect
3434
github.com/inconshreveable/mousetrap v1.1.0 // indirect
3535
github.com/jmespath/go-jmespath v0.4.0 // indirect
3636
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
37-
github.com/magiconair/properties v1.8.6 // indirect
3837
github.com/mattn/go-ieproxy v0.0.1 // indirect
39-
github.com/mitchellh/mapstructure v1.5.0 // indirect
40-
github.com/pelletier/go-toml v1.9.5 // indirect
41-
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
38+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
4239
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
40+
github.com/sagikazarmark/locafero v0.12.0 // indirect
4341
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
4442
github.com/shoenig/go-m1cpu v0.1.6 // indirect
45-
github.com/spf13/afero v1.9.3 // indirect
46-
github.com/spf13/cast v1.5.0 // indirect
47-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
48-
github.com/spf13/pflag v1.0.5 // indirect
49-
github.com/subosito/gotenv v1.4.1 // indirect
43+
github.com/spf13/afero v1.15.0 // indirect
44+
github.com/spf13/cast v1.10.0 // indirect
45+
github.com/spf13/pflag v1.0.10 // indirect
46+
github.com/subosito/gotenv v1.6.0 // indirect
5047
github.com/tklauser/go-sysconf v0.3.12 // indirect
5148
github.com/tklauser/numcpus v0.6.1 // indirect
5249
github.com/yusufpapurcu/wmi v1.2.4 // indirect
5350
go.opentelemetry.io/otel v1.24.0 // indirect
5451
go.opentelemetry.io/otel/metric v1.24.0 // indirect
5552
go.opentelemetry.io/otel/trace v1.24.0 // indirect
56-
golang.org/x/net v0.29.0 // indirect
57-
golang.org/x/sys v0.25.0 // indirect
58-
golang.org/x/text v0.18.0 // indirect
59-
golang.org/x/time v0.6.0 // indirect
53+
go.yaml.in/yaml/v3 v3.0.4 // indirect
54+
golang.org/x/net v0.43.0 // indirect
55+
golang.org/x/sys v0.36.0 // indirect
56+
golang.org/x/text v0.29.0 // indirect
57+
golang.org/x/time v0.12.0 // indirect
6058
google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e // indirect
61-
gopkg.in/ini.v1 v1.67.0 // indirect
62-
gopkg.in/yaml.v2 v2.4.0 // indirect
63-
gopkg.in/yaml.v3 v3.0.1 // indirect
6459
)

0 commit comments

Comments
 (0)