Unifies the output of the routing layer and the isolated response structure

This commit is contained in:
Granty1
2020-04-08 14:00:08 +08:00
parent 5d222585dd
commit 4277505c6a
24 changed files with 250 additions and 121 deletions
@@ -0,0 +1,11 @@
package response
import "gin-vue-admin/model"
type FilePathResponse struct {
FilePath string `json:"filePath"`
}
type FileResponse struct {
File model.ExaFile `json:"file"`
}
+7
View File
@@ -0,0 +1,7 @@
package response
import "gin-vue-admin/model"
type ExaCustomerResponse struct {
Customer model.ExaCustomer `json:"customer"`
}
@@ -0,0 +1,7 @@
package response
import "gin-vue-admin/model"
type ExaFileResponse struct {
File model.ExaFileUploadAndDownload `json:"file"`
}
+11
View File
@@ -0,0 +1,11 @@
package response
import "gin-vue-admin/model"
type SysAPIResponse struct {
Api model.SysApi `json:"api"`
}
type SysAPIListResponse struct {
Apis []model.SysApi `json:"apis"`
}
+7
View File
@@ -0,0 +1,7 @@
package response
import "gin-vue-admin/model"
type SysAuthorityResponse struct {
Authority model.SysAuthority `json:"authority"`
}
+6
View File
@@ -0,0 +1,6 @@
package response
type SysCaptchaResponse struct {
CaptchaId string `json:"captchaId"`
PicPath string `json:"picPath"`
}
+5
View File
@@ -0,0 +1,5 @@
package response
type PolicyPathResponse struct {
Paths []string `json:"paths"`
}
+15
View File
@@ -0,0 +1,15 @@
package response
import "gin-vue-admin/model"
type SysMenusResponse struct {
Menus []model.SysMenu `json:"menus"`
}
type SysBaseMenusResponse struct {
Menus []model.SysBaseMenu `json:"menus"`
}
type SysBaseMenuResponse struct {
Menu model.SysBaseMenu `json:"menu"`
}
+7
View File
@@ -0,0 +1,7 @@
package response
import "gin-vue-admin/config"
type SysConfigResponse struct {
Config config.Server `json:"config"`
}
+15
View File
@@ -0,0 +1,15 @@
package response
import (
"gin-vue-admin/model"
)
type SysUserResponse struct {
User model.SysUser `json:"user"`
}
type LoginResponse struct {
User model.SysUser `json:"user"`
Token string `json:"token"`
ExpiresAt int64 `json:"expiresAt"`
}