Documentation ¶
Index ¶
Constants ¶
View Source
const (
AppName = "zd"
)
Variables ¶
View Source
var ( ApiPath = "/" WsPath = "ws" PthSep = string(os.PathSeparator) ConfigVer = 1.0 LanguageDefault = "en" LanguageEN = "en" LanguageZH = "zh" CachePrefix = "cache_" CachePostfix = "_is_num" EnRes = fmt.Sprintf("res/en/messages.json") ZhRes = fmt.Sprintf("res/zh/messages.json") Localhost = "localhost" LeftWidth = 36 MinWidth = 130 MinHeight = 36 CmdViewHeight = 10 MaxNumb = 100000 MaxNumbForAsync = 100 FormatText = "txt" FormatJson = "json" FormatXml = "xml" FormatSql = "sql" FormatExcel = "xlsx" FormatCsv = "csv" FormatProto = "proto" FormatData = "data" Formats = []string{FormatText, FormatJson, FormatXml, FormatSql, FormatExcel, FormatCsv, FormatProto} ModeParallel = "parallel" ModeRecursive = "recursive" ModeParallelShort = "p" ModeRecursiveShort = "r" Modes = []string{ModeParallel, ModeRecursive, ModeParallelShort, ModeRecursiveShort} DefTypeText = "text" DefTypeArticle = "article" DefTypeImage = "image" DefTypeVoice = "voice" DefTypeVideo = "video" FieldTypeList = "list" FieldTypeTimestamp = "timestamp" FieldTypeUlid = "ulid" FieldTypeArticle = "article" LeftBrackets rune = '(' RightBrackets rune = ')' Backtick rune = '`' DefaultDataServicePort = 8848 DefaultRoot = "./" DefaultNumber = 10 ResDirData = "data" ResDirYaml = "yaml" ResDirUsers = "users" ResKeys = []string{ResDirData, ResDirYaml, ResDirUsers} ResTypeDef = "def" // only used for refer type ResTypeConfig = "config" ResTypeRanges = "ranges" ResTypeInstances = "instances" ResTypeYaml = "yaml" ResTypeExcel = "excel" ResTypeText = "text" ResTypeValue = "value" ResTypes = []string{ResTypeConfig, ResTypeRanges, ResTypeInstances, ResTypeExcel, ResTypeText, ResTypeValue} TmpDir = "tmp/" SqliteDriver = "sqlite3" SqliteFile = "file:" + TmpDir + "cache/.data.db" SqliteTrackTable = "zd_excel" ExcelBorder = `` /* 222-byte string literal not displayed */ ExcelHeader = `{"fill":{"type":"pattern","pattern":1,"color":["E0EBF5"]}}` TablePrefix = "zd_" PageSize = 15 // database type [added by leo 2022/05/10] DBTypeMysql = "mysql" DBTypeSqlServer = "sqlserver" DBTypeOracle = "oracle" Na = "N/A" )
View Source
var ( Success = ResponseCode{0, "Request Successfully"} CommErr = ResponseCode{100, "Common Error"} ParamErr = ResponseCode{200, "Parameter Error"} UnAuthorizedErr = ResponseCode{401, "UnAuthorized"} )
Functions ¶
This section is empty.
Types ¶
type ColumnType ¶
type ColumnType string
const ( // number Bit ColumnType = "bit" Tinyint ColumnType = "tinyint" Smallint ColumnType = "smallint" Mediumint ColumnType = "mediumint" Int ColumnType = "int" Bigint ColumnType = "bigint" Float ColumnType = "float" Double ColumnType = "double" // fixed-point Decimal ColumnType = "decimal" // character string Char ColumnType = "char" Varchar ColumnType = "varchar" Tinytext ColumnType = "tinytext" Text ColumnType = "text" Mediumtext ColumnType = "mediumtext" Longtext ColumnType = "longtext" // binary data Tinyblob ColumnType = "tinyblob" Blob ColumnType = "blob" Mediumblob ColumnType = "mediumblob" Longblob ColumnType = "longblob" Binary ColumnType = "binary" Varbinary ColumnType = "varbinary" // date and time type Date ColumnType = "date" Time ColumnType = "time" Year ColumnType = "year" Datetime ColumnType = "datetime" Timestamp ColumnType = "timestamp" // other type Enum ColumnType = "enum" Set ColumnType = "set" Geometry ColumnType = "geometry" Point ColumnType = "point" Linestring ColumnType = "linestring" Polygon ColumnType = "polygon" Multipoint ColumnType = "multipoint" Multilinestring ColumnType = "multilinestring" Multipolygon ColumnType = "multipolygon" Geometrycollection ColumnType = "geometrycollection" Json ColumnType = "json" )
func (ColumnType) String ¶
func (e ColumnType) String() string
type GeneratedBy ¶
type GeneratedBy string
const ( ByRange GeneratedBy = "range" ByRefer GeneratedBy = "refer" )
func (GeneratedBy) String ¶
func (e GeneratedBy) String() string
type OpenApiDataFormat ¶
type OpenApiDataFormat string
const ( // integer OpenApiDataFormatInt32 OpenApiDataFormat = "int32" OpenApiDataFormatInt64 OpenApiDataFormat = "int64" // float OpenApiDataFormatFloat OpenApiDataFormat = "float" OpenApiDataFormatDouble OpenApiDataFormat = "double" // date OpenApiDataFormatDate OpenApiDataFormat = "date" OpenApiDataFormatDateTime OpenApiDataFormat = "date-time" OpenApiDataFormatByte OpenApiDataFormat = "byte" OpenApiDataFormatBinary OpenApiDataFormat = "binary" OpenApiDataFormatPassword OpenApiDataFormat = "password" )
type OpenApiDataType ¶
type OpenApiDataType string
const ( OpenApiDataTypeInteger OpenApiDataType = "integer" OpenApiDataTypeLong OpenApiDataType = "long" OpenApiDataTypeFloat OpenApiDataType = "float" OpenApiDataTypeDouble OpenApiDataType = "double" OpenApiDataTypeString OpenApiDataType = "string" OpenApiDataTypeByte OpenApiDataType = "byte" OpenApiDataTypeBinary OpenApiDataType = "binary" OpenApiDataTypeBoolean OpenApiDataType = "boolean" OpenApiDataTypeDate OpenApiDataType = "date" OpenApiDataTypeDateTime OpenApiDataType = "dateTime" OpenApiDataTypePassword OpenApiDataType = "password" )
type OpenApiSchemaType ¶
type OpenApiSchemaType string
const ( SchemaTypeString OpenApiSchemaType = "string" // this includes dates and files SchemaTypeNumber OpenApiSchemaType = "number" SchemaTypeFloat OpenApiSchemaType = "integer" SchemaTypeBoolean OpenApiSchemaType = "boolean" SchemaTypeArray OpenApiSchemaType = "array" SchemaTypeObject OpenApiSchemaType = "object" )
type ResponseCode ¶
type ResultStatus ¶
type ResultStatus int
const ( PASS ResultStatus = iota FAIL )
func (ResultStatus) String ¶
func (c ResultStatus) String() string
type VarcharType ¶
type VarcharType string
const ( Empty VarcharType = "" Username VarcharType = "username" Email VarcharType = "email" Url VarcharType = "url" Ip VarcharType = "ip" Mac VarcharType = "mac" CreditCard VarcharType = "creditcard" IdCard VarcharType = "idcard" MobileNumber VarcharType = "mobilenumber" TelNumber VarcharType = "telnumber" Token VarcharType = "token" Uuid VarcharType = "uuid" Ulid VarcharType = "ulid" JsonStr VarcharType = "jsonstr" Md5 VarcharType = "md5" )
func (VarcharType) String ¶
func (e VarcharType) String() string
Click to show internal directories.
Click to hide internal directories.