mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-15 05:33:47 +08:00
tt
This commit is contained in:
14
hotgo-server/app/consts/app_consts.go
Normal file
14
hotgo-server/app/consts/app_consts.go
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
// 应用类型
|
||||
const (
|
||||
AppAdmin = "admin"
|
||||
AppApi = "api"
|
||||
AppDefault = "default"
|
||||
)
|
||||
31
hotgo-server/app/consts/code_consts.go
Normal file
31
hotgo-server/app/consts/code_consts.go
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
// 全局状态码
|
||||
const (
|
||||
CodeNil = -1 // No error code specified.
|
||||
CodeOK = 0 // It is OK.
|
||||
CodeInternalError = 50 // An error occurred internally.
|
||||
CodeValidationFailed = 51 // Data validation failed.
|
||||
CodeDbOperationError = 52 // Database operation error.
|
||||
CodeInvalidParameter = 53 // The given parameter for current operation is invalid.
|
||||
CodeMissingParameter = 54 // Parameter for current operation is missing.
|
||||
CodeInvalidOperation = 55 // The function cannot be used like this.
|
||||
CodeInvalidConfiguration = 56 // The configuration is invalid for current operation.
|
||||
CodeMissingConfiguration = 57 // The configuration is missing for current operation.
|
||||
CodeNotImplemented = 58 // The operation is not implemented yet.
|
||||
CodeNotSupported = 59 // The operation is not supported yet.
|
||||
CodeOperationFailed = 60 // I tried, but I cannot give you what you want.
|
||||
CodeNotAuthorized = 61 // Not Authorized.
|
||||
CodeSecurityReason = 62 // Security Reason.
|
||||
CodeServerBusy = 63 // Server is busy, please try again later.
|
||||
CodeUnknown = 64 // Unknown error.
|
||||
CodeNotFound = 65 // Resource does not exist.
|
||||
CodeInvalidRequest = 66 // Invalid request.
|
||||
CodeBusinessValidationFailed = 300 // Business validation failed.
|
||||
)
|
||||
12
hotgo-server/app/consts/context_consts.go
Normal file
12
hotgo-server/app/consts/context_consts.go
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
// 上下文
|
||||
const (
|
||||
ContextKey = "HotGoContext"
|
||||
)
|
||||
8
hotgo-server/app/consts/debris_consts.go
Normal file
8
hotgo-server/app/consts/debris_consts.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package consts
|
||||
|
||||
// 碎片
|
||||
const (
|
||||
|
||||
// 默认分页
|
||||
DebrisPageSize = 10
|
||||
)
|
||||
14
hotgo-server/app/consts/error_consts.go
Normal file
14
hotgo-server/app/consts/error_consts.go
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
// 错误解释
|
||||
const (
|
||||
ErrorORM = "sql执行异常"
|
||||
ErrorNotData = "数据不存在"
|
||||
ErrorRotaPointer = "指针转换异常"
|
||||
)
|
||||
15
hotgo-server/app/consts/openapi_consts.go
Normal file
15
hotgo-server/app/consts/openapi_consts.go
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
// 开放API
|
||||
const (
|
||||
OpenAPITitle = `HotGo`
|
||||
OpenAPIDescription = `这是一个使用HotGo的简单演示HTTP服务器项目。 `
|
||||
OpenAPIName = `HotGo`
|
||||
OpenAPIURL = `http://hotgo.bufanyun.cn`
|
||||
)
|
||||
14
hotgo-server/app/consts/queue_consts.go
Normal file
14
hotgo-server/app/consts/queue_consts.go
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
// 消息队列
|
||||
const (
|
||||
QueueName = `queue:`
|
||||
QueueLogPath = "queue" // 需要在config中配置queue的log
|
||||
QueueLogTopic = `request-log`
|
||||
)
|
||||
13
hotgo-server/app/consts/redis_consts.go
Normal file
13
hotgo-server/app/consts/redis_consts.go
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
// redis
|
||||
const (
|
||||
RedisJwtToken = "jwtToken:" // JWT-token
|
||||
RedisJwtUserBind = "jwtUserBind:" // JWT-用户身份绑定
|
||||
)
|
||||
14
hotgo-server/app/consts/status_consts.go
Normal file
14
hotgo-server/app/consts/status_consts.go
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
//
|
||||
const (
|
||||
StatusEnabled = "1" // 启用
|
||||
StatusDisable = "2" // 禁用
|
||||
StatusDelete = "3" //已删除
|
||||
)
|
||||
12
hotgo-server/app/consts/version_consts.go
Normal file
12
hotgo-server/app/consts/version_consts.go
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package consts
|
||||
|
||||
// 应用版本
|
||||
const (
|
||||
VersionApp = "1.0.0"
|
||||
)
|
||||
Reference in New Issue
Block a user