constants

package
v0.19.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ByteSpace            = ' '
	ByteColon            = ':'
	ByteSemicolon        = ';'
	ByteSlash            = '/'
	ByteAsterisk         = '*'
	ByteDot              = '.'
	ByteComma            = ','
	ByteHyphen           = '-'
	ByteUnderscore       = '_'
	ByteAt               = '@'
	ByteHash             = '#'
	ByteDollar           = '$'
	BytePercent          = '%'
	BytePlus             = '+'
	ByteMinus            = '-'
	ByteEquals           = '='
	ByteAmpersand        = '&'
	BytePipe             = '|'
	ByteTilde            = '~'
	ByteBacktick         = '`'
	ByteQuestionMark     = '?'
	ByteExclamationMark  = '!'
	ByteLeftParenthesis  = '('
	ByteRightParenthesis = ')'
	ByteLeftBracket      = '['
	ByteRightBracket     = ']'
	ByteLeftBrace        = '{'
	ByteRightBrace       = '}'
	ByteDoubleQuote      = '"'
	ByteSingleQuote      = '\''
	ByteBackslash        = '\\'
	ByteCarriageReturn   = '\r'
	ByteNewline          = '\n'
	ByteTab              = '\t'
)

Byte constants for common characters.

View Source
const (
	EnvKeyPrefix    = "VEF"
	EnvNodeID       = EnvKeyPrefix + "_NODE_ID"       // XID node identifier
	EnvLogLevel     = EnvKeyPrefix + "_LOG_LEVEL"     // Log level (debug|info|warn|error)
	EnvConfigPath   = EnvKeyPrefix + "_CONFIG_PATH"   // Custom config file path
	EnvI18NLanguage = EnvKeyPrefix + "_I18N_LANGUAGE" // Override default language
)

Environment variable keys.

View Source
const (
	HeaderXAppID      = "X-App-ID"
	HeaderXTimestamp  = "X-Timestamp"
	HeaderXNonce      = "X-Nonce"
	HeaderXSignature  = "X-Signature"
	HeaderXMetaPrefix = "X-Meta-"
)

HTTP header keys used by the framework.

View Source
const (
	JSONNull  = "null"
	JSONQuote = '"'
)

JSON constants.

View Source
const (
	OperatorSystem    = "system"
	OperatorCronJob   = "cron_job"
	OperatorAnonymous = "anonymous"
)

System operators for audit tracking.

View Source
const (
	ExprOperator     = "?Operator"
	ExprTableColumns = "?TableColumns"
	ExprColumns      = "?Columns"
	ExprTablePKs     = "?TablePKs"
	ExprPKs          = "?PKs"
	ExprTableName    = "?TableName"
	ExprTableAlias   = "?TableAlias"
)

SQL expression placeholders for query building.

View Source
const (
	ColumnID            = "id"
	ColumnCreatedAt     = "created_at"
	ColumnUpdatedAt     = "updated_at"
	ColumnCreatedBy     = "created_by"
	ColumnUpdatedBy     = "updated_by"
	ColumnCreatedByName = "created_by_name"
	ColumnUpdatedByName = "updated_by_name"
)

Database column names for audit fields.

View Source
const (
	FieldID            = "ID"
	FieldCreatedAt     = "CreatedAt"
	FieldUpdatedAt     = "UpdatedAt"
	FieldCreatedBy     = "CreatedBy"
	FieldUpdatedBy     = "UpdatedBy"
	FieldCreatedByName = "CreatedByName"
	FieldUpdatedByName = "UpdatedByName"
)

Go struct field names corresponding to audit columns.

View Source
const (
	AuthSchemeBearer    = "Bearer"
	QueryKeyAccessToken = "__accessToken"
)

Authentication constants.

View Source
const (
	PrincipalSystem    = OperatorSystem
	PrincipalCronJob   = OperatorCronJob
	PrincipalAnonymous = OperatorAnonymous
)

System internal principals (not allowed to login).

View Source
const (
	Empty                 = ""
	Space                 = " "
	Colon                 = ":"
	ColonSpace            = ": "
	Semicolon             = ";"
	Slash                 = "/"
	DoubleSlash           = "//"
	Asterisk              = "*"
	Dot                   = "."
	Comma                 = ","
	CommaSpace            = ", "
	Hyphen                = "-"
	Underscore            = "_"
	At                    = "@"
	Hash                  = "#"
	Dollar                = "$"
	Percent               = "%"
	Plus                  = "+"
	Minus                 = "-"
	Equals                = "="
	Ampersand             = "&"
	Pipe                  = "|"
	Tilde                 = "~"
	Backtick              = "`"
	QuestionMark          = "?"
	ExclamationMark       = "!"
	LeftParenthesis       = "("
	RightParenthesis      = ")"
	LeftBracket           = "["
	RightBracket          = "]"
	LeftBrace             = "{"
	RightBrace            = "}"
	DoubleQuote           = "\""
	SingleQuote           = "'"
	Backslash             = "\\"
	CarriageReturn        = "\r"
	Newline               = "\n"
	CarriageReturnNewline = "\r\n"
	Tab                   = "\t"
)

String constants for common characters and sequences.

View Source
const (
	TypeInt      = "int"
	TypeString   = "str"
	TypeBool     = "bool"
	TypeDecimal  = "dec"
	TypeDate     = "date"
	TypeDateTime = "datetime"
	TypeTime     = "time"
)

Type tokens for schema field type identification.

View Source
const DefaultI18NLanguage = "zh-CN"

DefaultI18NLanguage is the default language for the i18n system.

View Source
const PlaceholderKeyOperator = "Operator"

Placeholder key for named arguments in database queries.

View Source
const VEFVersion = "v0.19.2"

VEFVersion is the current version of the VEF Framework (semver format).

Variables

View Source
var JSONNullBytes = []byte(JSONNull)

JSONNullBytes is the byte slice representation of JSON null.

Functions

This section is empty.

Types

type DBType added in v0.18.0

type DBType string

DBType represents supported database types.

const (
	Oracle    DBType = "oracle"
	SQLServer DBType = "sqlserver"
	Postgres  DBType = "postgres"
	MySQL     DBType = "mysql"
	SQLite    DBType = "sqlite"
)

Supported database types.

type StorageProvider added in v0.10.1

type StorageProvider string

StorageProvider represents supported storage backend types.

const (
	StorageMinIO      StorageProvider = "minio"
	StorageMemory     StorageProvider = "memory"
	StorageFilesystem StorageProvider = "filesystem"
)

Supported storage providers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL