提交 v1.3.0 beta
This commit is contained in:
@ -7,6 +7,7 @@ type Authorization struct {
|
||||
Remember bool
|
||||
Type string // LoginToken: 登录令牌, AccessToken: 授权令牌, ShareSession: 会话分享, AccessSession: 只允许访问特定的会话
|
||||
User *model.User
|
||||
Roles []string
|
||||
}
|
||||
|
||||
type LoginAccount struct {
|
||||
|
52
server/dto/authorised.go
Normal file
52
server/dto/authorised.go
Normal file
@ -0,0 +1,52 @@
|
||||
package dto
|
||||
|
||||
import "next-terminal/server/common"
|
||||
|
||||
type AuthorisedAsset struct {
|
||||
AssetIds []string `json:"assetIds"`
|
||||
CommandFilterId string `json:"commandFilterId"`
|
||||
StrategyId string `json:"strategyId"`
|
||||
UserId string `json:"userId"`
|
||||
UserGroupId string `json:"userGroupId"`
|
||||
}
|
||||
|
||||
type AuthorisedUser struct {
|
||||
UserIds []string `json:"userIds"`
|
||||
CommandFilterId string `json:"commandFilterId"`
|
||||
StrategyId string `json:"strategyId"`
|
||||
AssetId string `json:"assetId"`
|
||||
}
|
||||
|
||||
type AuthorisedUserGroup struct {
|
||||
UserGroupIds []string `json:"UserGroupIds"`
|
||||
CommandFilterId string `json:"commandFilterId"`
|
||||
StrategyId string `json:"strategyId"`
|
||||
AssetId string `json:"assetId"`
|
||||
}
|
||||
|
||||
type AssetPageForAuthorised struct {
|
||||
Id string `json:"id"`
|
||||
AssetId string `json:"assetId"`
|
||||
AssetName string `json:"assetName"`
|
||||
StrategyId string `json:"strategyId"`
|
||||
StrategyName string `json:"strategyName"`
|
||||
Created common.JsonTime `json:"created"`
|
||||
}
|
||||
|
||||
type UserPageForAuthorised struct {
|
||||
Id string `json:"id"`
|
||||
UserId string `json:"userId"`
|
||||
UserName string `json:"userName"`
|
||||
StrategyId string `json:"strategyId"`
|
||||
StrategyName string `json:"strategyName"`
|
||||
Created common.JsonTime `json:"created"`
|
||||
}
|
||||
|
||||
type UserGroupPageForAuthorised struct {
|
||||
Id string `json:"id"`
|
||||
UserGroupId string `json:"userGroupId"`
|
||||
UserGroupName string `json:"userGroupName"`
|
||||
StrategyId string `json:"strategyId"`
|
||||
StrategyName string `json:"strategyName"`
|
||||
Created common.JsonTime `json:"created"`
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package dto
|
||||
|
||||
type Counter struct {
|
||||
User int64 `json:"user"`
|
||||
Asset int64 `json:"asset"`
|
||||
Credential int64 `json:"credential"`
|
||||
OnlineSession int64 `json:"onlineSession"`
|
||||
TotalUser int64 `json:"totalUser"`
|
||||
OnlineUser int64 `json:"onlineUser"`
|
||||
TotalAsset int64 `json:"totalAsset"`
|
||||
ActiveAsset int64 `json:"activeAsset"`
|
||||
OfflineSession int64 `json:"offlineSession"`
|
||||
FailLoginCount int64 `json:"failLoginCount"`
|
||||
}
|
||||
|
@ -1,7 +1,15 @@
|
||||
package dto
|
||||
|
||||
import "next-terminal/server/common"
|
||||
|
||||
type UserGroup struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Members []string `json:"members"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Members []UserGroupMember `json:"members"`
|
||||
Created common.JsonTime `json:"created"`
|
||||
}
|
||||
|
||||
type UserGroupMember struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
7
server/dto/overview.go
Normal file
7
server/dto/overview.go
Normal file
@ -0,0 +1,7 @@
|
||||
package dto
|
||||
|
||||
type DateCounter struct {
|
||||
Date string `json:"date"`
|
||||
Value uint64 `json:"value"`
|
||||
Type string `json:"type"`
|
||||
}
|
7
server/dto/permission.go
Normal file
7
server/dto/permission.go
Normal file
@ -0,0 +1,7 @@
|
||||
package dto
|
||||
|
||||
type TreeMenu struct {
|
||||
Title string `json:"title"`
|
||||
Key string `json:"key"`
|
||||
Children []TreeMenu `json:"children"`
|
||||
}
|
@ -27,6 +27,5 @@ type Backup struct {
|
||||
Commands []model.Command `json:"commands"`
|
||||
Credentials []model.Credential `json:"credentials"`
|
||||
Assets []map[string]interface{} `json:"assets"`
|
||||
ResourceSharers []model.ResourceSharer `json:"resource_sharers"`
|
||||
Jobs []model.Job `json:"jobs"`
|
||||
}
|
||||
|
15
server/dto/storage_log.go
Normal file
15
server/dto/storage_log.go
Normal file
@ -0,0 +1,15 @@
|
||||
package dto
|
||||
|
||||
import "next-terminal/server/common"
|
||||
|
||||
type StorageLogForPage struct {
|
||||
ID string `json:"id"`
|
||||
AssetId string `json:"assetId"`
|
||||
AssetName string `json:"assetName"`
|
||||
SessionId string `json:"sessionId"`
|
||||
UserId string `json:"userId"`
|
||||
UserName string `json:"userName"`
|
||||
Action string `json:"action"` // 操作类型: 上传、下载、删除、重命名、编辑
|
||||
FileName string `json:"fileName"` // 文件名称
|
||||
Created common.JsonTime `json:"created"` // 操作时间
|
||||
}
|
Reference in New Issue
Block a user