This commit is contained in:
孟帅
2022-11-24 23:37:34 +08:00
parent 4ffe54b6ac
commit 29bda0dcdd
1487 changed files with 97869 additions and 96539 deletions

View File

@@ -0,0 +1,14 @@
// Package consts
// @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"
)

View File

@@ -0,0 +1,31 @@
// Package consts
// @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.
)

View File

@@ -0,0 +1,15 @@
// Package consts
// @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 (
ConfigTypeString = "string"
ConfigTypeInt = "int"
ConfigTypeBool = "bool"
ConfigTypeArray = "array"
ConfigTypeDate = "date"
)

View File

@@ -0,0 +1,12 @@
// Package consts
// @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
// ContextKey 上下文
const (
ContextKey = "HotGoContext"
)

View File

@@ -0,0 +1,18 @@
// Package consts
// @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 (
CronArgsKey = "args" // 上下文变量名称
CronSplitStr = "," // 变量分割符
CronPolicySame = 1 // 并行策略
CronPolicySingle = 2 // 单例策略
CronPolicyOnce = 3 // 单次策略
CronPolicyTimes = 4 // 多次策略
)

View File

@@ -0,0 +1,13 @@
// Package consts
// @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 (
DemoTips = "演示系统已隐藏"
)

View File

@@ -0,0 +1,14 @@
// Package consts
// @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 = "指针转换异常"
)

View File

@@ -0,0 +1,15 @@
// Package consts
// @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 = `https://github.com/bufanyun/hotgo`
)

View File

@@ -0,0 +1,14 @@
// Package consts
// @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`
)

View File

@@ -0,0 +1,13 @@
// Package consts
// @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-用户身份绑定
)

View File

@@ -0,0 +1,17 @@
// Package consts
// @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 (
StatusALL int = -1 // 全部状态
StatusEnabled int = 1 // 启用
StatusDisable int = 2 // 禁用
StatusDelete int = 3 // 已删除
)
var StatusMap = []int{StatusALL, StatusEnabled, StatusDisable, StatusDelete}

View File

@@ -0,0 +1,12 @@
// Package consts
// @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 (
UploadDriveLocal = "local" // 本地驱动
UploadDriveOss = "oss" // 阿里云oss
)

View File

@@ -0,0 +1,12 @@
// Package consts
// @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
// VersionApp 应用版本
const (
VersionApp = "1.0.0"
)