Merge branch 'master' of git.zhangdeman.cn:zhangdeman/consts

This commit is contained in:
白茶清欢 2024-06-08 18:40:35 +08:00
commit feddc6a70f
4 changed files with 199 additions and 0 deletions

52
data_type.go Normal file
View File

@ -0,0 +1,52 @@
// Package consts ...
//
// Description : consts ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-04-08 16:33
package consts
const (
DataTypeInt = "int" // int类型 -> int64
DataTypeUint = "uint" // uint类型 -> uint64
DataTypeFloat = "float" // float类型 -> float64
DataTypeBool = "bool" // bool类型
DataTypeString = "string" // 字符串类型
DataTypeSliceInt = "[]int" // int数组 -> []int64
DataTypeSliceIntWithChar = "[]int_split" // int数组 -> []int64, 按照指定字符切割
DataTypeSliceUint = "[]uint" // uint数组 -> []uint64
DataTypeSliceUintWithChar = "[]uint_split" // uint数组 -> []uint64 指定字符切割
DataTypeSliceFloat = "[]float" // float数组 -> []float64
DataTypeSliceFloatWithChar = "[]float_split" // float数组 -> []float64, 指定字符切割
DataTypeSliceBool = "[]bool" // bool数组 -> []bool
DataTypeSliceBoolWithChar = "[]bool_split" // bool数组 -> []bool, 指定字符切割
DataTypeSliceString = "[]string" // 字符串数组 -> []string
DataTypeSliceStringWithChar = "[]string_split" // 字符串数组 -> []string, 指定字符切割
DataTypeSliceSlice = "[][]any" // 字符串数组 -> [][]any
DataTypeSliceMapAnyAny = "[]map[any]any" // 字符串数组 -> map[any]any, slice对象
DataTypeSliceMapStringAny = "[]map[string]any" // 字符串数组 -> map[string]any, slice对象
DataTypeMapStrInt = "map[string]int" // map -> map[string]int64
DataTypeMapStrUint = "map[string]uint" // map -> map[string]uint64
DataTypeMapStrFloat = "map[string]float" // map -> map[string]float64
DataTypeMapStrBool = "map[string]bool" // map -> map[string]bool
DataTypeMapStrAny = "map[string]any" // map -> map[string]interface{}
DataTypeMapStrStr = "map[string]string" // map -> map[string]string
DataTypeMapAnyAny = "map[any]any" // map -> map[interface{}]interface{}
DataTypeMapStrSlice = "map[string][]any" // map -> map[string][]interface{}
DataTypeAny = "any" // 任意类型 -> interface{}
)
const (
DataStatusNotFound = "NOT_FOUND"
DataStatusIsNil = "IS_NIL"
DataStatusIsZero = "IS_ZERO"
DataStatusIsEmpty = "IS_EMPTY"
DataStatusIsFalse = "IS_FALSE"
)
const (
DataSliceModelReal = "REAL"
DataSliceModelMarshal = "MARSHAL"
DataSliceModelWithSplitChar = "WITH_SPLIT_CHAR"
)

95
license.go Normal file
View File

@ -0,0 +1,95 @@
// Package consts ...
//
// Description : consts ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-04-19 12:19
package consts
const (
LicenseAfl30 = "AFL-3.0"
LicenseAgpl30 = "AGPL-3.0"
LicenseApache10 = "Apache-1.0"
LicenseApache11 = "Apache-1.1"
LicenseApache20 = "Apache-2.0"
LicenseArtistic20 = "Artistic-2.0"
LicenseBsd2Clause = "BSD-2-Clause"
LicenseBsd3Clause = "BSD-3-Clause"
LicenseBsd4Clause = "BSD-4-Clause"
LicenseBsl10 = "BSL-1.0"
LicenseCcBy40 = "CC-BY-4.0"
LicenseCcBySa40 = "CC-BY-SA-4.0"
LicenseCc010 = "CC0-1.0"
LicenseEcl20 = "ECL-2.0"
LicenseEpl10 = "EPL-1.0"
LicenseEpl20 = "EPL-2.0"
LicenseEupl11 = "EUPL-1.1"
LicenseEupl12 = "EUPL-1.2"
LicenseGpl20 = "GPL-2.0"
LicenseGpl30 = "GPL-3.0"
LicenseIsc = "ISC"
LicenseLgpl21 = "LGPL-2.1"
LicenseLgpl30 = "LGPL-3.0"
LicenseLppl13c = "LPPL-1.3c"
LicenseMit = "MIT"
LicenseMpl20 = "MPL-2.0"
LicenseMsPl = "MS-PL"
LicenseMsRl = "MS-RL"
LicenseMulanpsl10 = "MulanPSL-1.0"
LicenseMulanpubl10 = "MulanPubL-1.0"
LicenseMulanpubl20 = "MulanPubL-2.0"
LicenseNcsa = "NCSA"
LicenseOfl11 = "OFL-1.1"
LicenseOsl30 = "OSL-3.0"
LicensePostgresql = "PostgreSQL"
LicenseUpl10 = "UPL-1.0"
LicenseUnlicense = "Unlicense"
LicenseWtfpl = "WTFPL"
LicenseZlib = "Zlib"
)
var (
// LicenseUrlTable 洗衣链接表
LicenseUrlTable = map[string]string{
LicenseAfl30: "https://spdx.org/licenses/AFL-3.0",
LicenseAgpl30: "https://www.gnu.org/licenses/agpl-3.0.txt",
LicenseApache10: "https://www.apache.org/licenses/LICENSE-1.0",
LicenseApache11: "https://www.apache.org/licenses/LICENSE-1.1",
LicenseApache20: "https://www.apache.org/licenses/LICENSE-2.0.txt",
LicenseArtistic20: "https://spdx.org/licenses/Artistic-2.0",
LicenseBsd2Clause: "https://opensource.org/license/BSD-2-Clause",
LicenseBsd3Clause: "https://opensource.org/license/BSD-3-Clause",
LicenseBsd4Clause: "https://directory.fsf.org/wiki/License:BSD-4-Clause",
LicenseBsl10: "https://www.boost.org/LICENSE_1_0.txt",
LicenseCcBy40: "https://creativecommons.org/licenses/by/4.0/legalcode.txt",
LicenseCcBySa40: "https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt",
LicenseCc010: "https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt",
LicenseEcl20: "https://opensource.org/license/ecl-2-0",
LicenseEpl10: "https://www.eclipse.org/org/documents/epl-1.0/EPL-1.0.txt",
LicenseEpl20: "https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt",
LicenseEupl11: "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/eupl1.1.-licence-en_0.pdf",
LicenseEupl12: "https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/eupl_v1.2_en.pdf",
LicenseGpl20: "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html#SEC1",
LicenseGpl30: "https://www.gnu.org/licenses/gpl-3.0.html#license-text",
LicenseIsc: "https://spdx.org/licenses/ISC",
LicenseLgpl21: "https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html",
LicenseLgpl30: "https://www.gnu.org/licenses/lgpl-3.0-standalone.html",
LicenseLppl13c: "https://www.latex-project.org/lppl/lppl-1-3c.txt",
LicenseMit: "https://spdx.org/licenses/MIT",
LicenseMpl20: "https://www.mozilla.org/en-US/MPL/2.0/",
LicenseMsPl: "https://opensource.org/license/ms-pl-html",
LicenseMsRl: "https://opensource.org/license/ms-rl-html",
LicenseMulanpsl10: "http://license.coscl.org.cn/MulanPSL",
LicenseMulanpubl10: "http://license.coscl.org.cn/MulanPubL-1.0",
LicenseMulanpubl20: "http://license.coscl.org.cn/MulanPubL-2.0",
LicenseNcsa: "https://spdx.org/licenses/NCSA",
LicenseOfl11: "https://openfontlicense.org/documents/OFL.txt",
LicenseOsl30: "https://opensource.org/license/osl-3-0-php",
LicensePostgresql: "https://www.postgresql.org/about/licence/",
LicenseUpl10: "https://spdx.org/licenses/UPL-1.0",
LicenseUnlicense: "https://unlicense.org/",
LicenseWtfpl: "https://spdx.org/licenses/WTFPL",
LicenseZlib: "https://www.zlib.net/zlib_license.html",
}
)

16
request.go Normal file
View File

@ -0,0 +1,16 @@
// Package consts ...
//
// Description : consts ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-04-22 11:04
package consts
const (
RequestLocationHeader = "HEADER" // header
RequestLocationCookie = "COOKIE" // cookie
RequestLocationBody = "BODY" // body
RequestLocationQuery = "QUERY" // query
RequestLocationUriPath = "URI_PATH" // uri路由一部分
)

36
swagger.go Normal file
View File

@ -0,0 +1,36 @@
// Package consts ...
//
// Description : consts ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-04-25 16:03
package consts
const (
SwaggerDataTypeInteger = "integer"
SwaggerDataTypeNumber = "number"
SwaggerDataTypeString = "string"
SwaggerDataTypeBoolean = "boolean"
SwaggerDataTypeArray = "array"
SwaggerDataTypeObject = "object"
)
const (
SwaggerDocVersion1 = "1.0"
SwaggerDocVersion2 = "2.0"
SwaggerDocVersion3 = "3.0"
)
const (
SwaggerRefKey = "$ref"
SwaggerRefValPrefix = "#/definitions/"
)
const (
SwaggerTypeKey = "type"
)
const (
SwaggerBaseObjectDefinitionName = "object_map"
)