Skip to content

Commit

Permalink
perf: session 新增 account_id
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Feb 16, 2023
1 parent d6e7f5b commit 3630212
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 63 deletions.
1 change: 1 addition & 0 deletions cmd/impl/convert_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func ConvertToSession(sees *pb.Session) model.Session {
OrgID: sees.OrgId,
UserID: sees.UserId,
AssetID: sees.AssetId,
AccountID: sees.AccountId,
Type: model.NORMALType,
}
}
Expand Down
1 change: 1 addition & 0 deletions cmd/impl/convert_pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func ConvertToProtobufAsset(asset model.Asset) *pb.Asset {
func ConvertToProtobufAccount(account model.Account) *pb.Account {
secretType := account.SecretType
return &pb.Account{
Id: account.ID,
Name: account.Name,
Username: account.Username,
Secret: account.Secret,
Expand Down
1 change: 1 addition & 0 deletions pkg/jms-sdk-go/model/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package model
import "fmt"

type BaseAccount struct {
ID string `json:"id"`
Name string `json:"name"`
Username string `json:"username"`
Secret string `json:"secret"`
Expand Down
1 change: 1 addition & 0 deletions pkg/jms-sdk-go/model/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type Session struct {
OrgID string `json:"org_id"`
UserID string `json:"user_id"`
AssetID string `json:"asset_id"`
AccountID string `json:"account_id"`
Type LabelFiled `json:"type"`
}

Expand Down
145 changes: 82 additions & 63 deletions protobuf-go/protobuf/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions protos/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ message User {
}

message Account {
string id =1;
string name = 2;
string username = 4;
string secret = 5;
Expand Down Expand Up @@ -120,6 +121,7 @@ message Session {
string org_id = 9;
string user_id = 10;
string asset_id = 11;
string account_id = 12;
}

enum TaskAction {KillSession = 0;}
Expand Down

0 comments on commit 3630212

Please sign in to comment.