Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateJWTSecret() string
- func GenerateRandomString(n int) string
- func GetAbsPath(tmpName, defaultName string) string
- func GetAppTelegramApiHash() string
- func GetAppTelegramApiID() string
- func GetBotAdminTelegramWebhookURL() string
- func GetBotManagerID() string
- func GetBotTelegramAPIProxyURL() string
- func GetBotTelegramToken() string
- func GetBotTelegramWebhookURL() string
- func GetCopyrightLicenseCode() string
- func GetCoreApiToken() string
- func GetCoreApiTokenReadOnly() string
- func GetCoreApiUrl() string
- func GetFenxiaoApiUrl() string
- func GetJWTSecret() string
- func GetLogLevel() string
- func GetMQTTBroker() string
- func GetMQTTPassword() string
- func GetMQTTTopic() string
- func GetMQTTUsername() string
- func GetMtprotoProxyPort() string
- func GetMtprotoProxyPortInt() int64
- func GetMtprotoProxySecret() string
- func GetMtprotoProxyServer() string
- func GetNoticeOfFeedRichMsgPushUrl() string
- func GetNoticeOfFeedRichMsgPushUrlPath() string
- func GetPaymentBTCPayKey() string
- func GetPaymentBTCPayName() string
- func GetPaymentBTCPayStoreID() string
- func GetPaymentBTCPayUrl() string
- func GetPaymentBTCPayWebhookSecret() string
- func GetPaymentBoxcoinKey() string
- func GetPaymentBoxcoinName() string
- func GetPaymentBoxcoinUrl() string
- func GetPaymentBoxcoinWebhookKey() string
- func GetPaymentCryptAPIName() string
- func GetPaymentEPUSDTKey() string
- func GetPaymentEPUSDTName() string
- func GetPaymentEPUSDTUrl() string
- func GetPaymentEasyPayDevice() string
- func GetPaymentEasyPayKey() string
- func GetPaymentEasyPayName() string
- func GetPaymentEasyPayPid() string
- func GetPaymentEasyPayUrl() string
- func GetPaymentEasyRequstBodyEncode() string
- func GetPaymentUmiPayKey() string
- func GetPaymentUmiPayName() string
- func GetPaymentUmiPayPid() string
- func GetPaymentUmiPayUrl() string
- func GetPlatformType() string
- func GetRel(basepath, targpath string) string
- func GetServerDbAddress() string
- func GetServerDbHost() string
- func GetServerDbName() string
- func GetServerDbPassword() string
- func GetServerDbPort() string
- func GetServerDbRedisAddress() string
- func GetServerDbRedisDB() int
- func GetServerDbRedisPassword() string
- func GetServerDbRedisSlaveAddress() string
- func GetServerDbRedisSlaveDB() int
- func GetServerDbRedisSlavePassword() string
- func GetServerDbTablePrefix() string
- func GetServerDbType() string
- func GetServerDbUsername() string
- func GetServerGinRunmode() string
- func GetServerPort() string
- func GetServerUrl() string
- func GetSocks5ProxyPassword() string
- func GetSocks5ProxyPort() string
- func GetSocks5ProxyPortInt() int64
- func GetSocks5ProxyServer() string
- func GetSocks5ProxyUsername() string
- func GetTronScanOrgApikey() string
- func GetTrongridApikey() string
- func Getenv(key string) string
- func Getwd() string
- func IsBotManagerID(id int64) bool
- func IsBotManagerIDStr(idStr string) bool
- func IsEnableMtprotoProxy() bool
- func IsEnablePaymentBTCPay() bool
- func IsEnablePaymentBoxcoin() bool
- func IsEnablePaymentCryptAPI() bool
- func IsEnablePaymentEPUSDT() bool
- func IsEnablePaymentEasyPay() bool
- func IsEnablePaymentUmiPay() bool
- func IsEnableSocks5Proxy() bool
- func IsInDocker() bool
- func IsTDlibSimpleMessage() bool
- func PathExist(pathStr string) bool
Constants ¶
const DOCKERENV_FILE string = "/.dockerenv"
Variables ¶
var JWTSecret string
#JWT Secret JWT_SECRET=
Functions ¶
func GenerateJWTSecret ¶
func GenerateJWTSecret() string
func GenerateRandomString ¶
func GetAbsPath ¶
获取绝对路径 tmpName:绝对/相对路径,defaultName:默认路径
func GetBotAdminTelegramWebhookURL ¶
func GetBotAdminTelegramWebhookURL() string
func GetCopyrightLicenseCode ¶
func GetCopyrightLicenseCode() string
func GetCoreApiToken ¶
func GetCoreApiToken() string
# core api 验证token core_api_token CORE_API_TOKEN=
func GetCoreApiTokenReadOnly ¶
func GetCoreApiTokenReadOnly() string
# core api 验证token (只读权限) core_api_token_readonly CORE_API_TOKEN_READONLY=
func GetFenxiaoApiUrl ¶
func GetFenxiaoApiUrl() string
#fenxiao api url https://server.domain FENXIAO_API_URL=
func GetJWTSecret ¶
func GetJWTSecret() string
func GetLogLevel ¶
func GetLogLevel() string
LogLevel panic,fatal,error,warn,warning,info,debug,trace
func GetMQTTBroker ¶
func GetMQTTBroker() string
# MQTT broker MQTT_BROKER= MQTT_USERNAME= MQTT_PASSWORD= MQTT_TOPIC=
func GetMQTTPassword ¶
func GetMQTTPassword() string
func GetMQTTTopic ¶
func GetMQTTTopic() string
func GetMQTTUsername ¶
func GetMQTTUsername() string
func GetMtprotoProxyPort ¶
func GetMtprotoProxyPort() string
func GetMtprotoProxyPortInt ¶
func GetMtprotoProxyPortInt() int64
func GetMtprotoProxySecret ¶
func GetMtprotoProxySecret() string
func GetMtprotoProxyServer ¶
func GetMtprotoProxyServer() string
func GetNoticeOfFeedRichMsgPushUrl ¶
func GetNoticeOfFeedRichMsgPushUrl() string
notice of feedRichMsg push url like https://server.domain
func GetNoticeOfFeedRichMsgPushUrlPath ¶
func GetNoticeOfFeedRichMsgPushUrlPath() string
notice of feedRichMsg push url path like /ws/push/
func GetPaymentBTCPayName ¶
func GetPaymentBTCPayName() string
# #BTCPay 标识 PAYMENT_BTCPAY_API_NAME=BTCPay
func GetPaymentBTCPayStoreID ¶
func GetPaymentBTCPayStoreID() string
# BTCPay StoreID PAYMENT_BTCPAY_API_STOREID =
func GetPaymentBTCPayUrl ¶
func GetPaymentBTCPayUrl() string
#BTCPay 接口地址 PAYMENT_BTCPAY_API_URL=https://mainnet.demo.btcpayserver.org
func GetPaymentBTCPayWebhookSecret ¶
func GetPaymentBTCPayWebhookSecret() string
# BTCPay WebhookSecret PAYMENT_BTCPAY_API_WEBHOOK_SECRET=
func GetPaymentBoxcoinUrl ¶
func GetPaymentBoxcoinUrl() string
#Boxcoin 接口地址 YOUR-DOMAIN/boxcoin/api.php
func GetPaymentCryptAPIName ¶
func GetPaymentCryptAPIName() string
# #CryptAPI 标识 PAYMENT_CRYPTAPI_API_NAME=CryptAPI
func GetPaymentEPUSDTName ¶
func GetPaymentEPUSDTName() string
#支付方式 #EPUSDT 标识 PAYMENT_EPUSDT_API_NAME=USDT
func GetPaymentEPUSDTUrl ¶
func GetPaymentEPUSDTUrl() string
#EPUSDT 接口地址 PAYMENT_EPUSDT_API_URL=http://127.0.0.1:8000
func GetPaymentEasyPayDevice ¶
func GetPaymentEasyPayDevice() string
#易支付 设备类型 PAYMENT_EASYPAY_API_DEVICE=
func GetPaymentEasyPayName ¶
func GetPaymentEasyPayName() string
# #易支付 标识 PAYMENT_EASYPAY_API_NAME=易支付
func GetPaymentEasyRequstBodyEncode ¶
func GetPaymentEasyRequstBodyEncode() string
#易支付 接口请求编码格式 JsonEncode URLValuesEncode PAYMENT_EASYPAY_REQUEST_BODY_ENCODE
func GetPaymentUmiPayName ¶ added in v0.1.23
func GetPaymentUmiPayName() string
func GetPaymentUmiPayUrl ¶ added in v0.1.23
func GetPaymentUmiPayUrl() string
func GetPlatformType ¶
func GetPlatformType() string
#平台类型 tele #PLATFORM_TYPE_TELE PLATFORM_TYPE_TELE=tele
func GetRel ¶
https://www.cnblogs.com/malukang/p/12907945.html GetRel(uploadDir,uploadFilePath) 获取相对路径
func GetServerDbPort ¶
func GetServerDbPort() string
数据库端口,mysql默认为3306 postgres默认端口为5432 SERVER_DB_PORT
func GetServerDbRedisAddress ¶
func GetServerDbRedisAddress() string
server db redis address SERVER_DB_REDIS_ADDRESS 127.0.0.1:6379
func GetServerDbRedisDB ¶
func GetServerDbRedisDB() int
server db redis Redis库 SERVER_DB_REDIS_DB 0 1 2 3
func GetServerDbRedisPassword ¶
func GetServerDbRedisPassword() string
server db redis password SERVER_DB_REDIS_PASSWORD Redis密码
func GetServerDbRedisSlaveAddress ¶ added in v0.1.22
func GetServerDbRedisSlaveAddress() string
server db redis address SERVER_DB_REDIS_ADDRESS 127.0.0.1:6379
func GetServerDbRedisSlaveDB ¶ added in v0.1.22
func GetServerDbRedisSlaveDB() int
server db redis Redis库 SERVER_DB_REDIS_DB 0 1 2 3
func GetServerDbRedisSlavePassword ¶ added in v0.1.22
func GetServerDbRedisSlavePassword() string
server db redis password SERVER_DB_REDIS_PASSWORD Redis密码
func GetServerDbTablePrefix ¶
func GetServerDbTablePrefix() string
#数据库数据表前缀,形式如 数据库域名:端口号 SERVER_DB_TABLE_PREFIX
func GetServerDbType ¶
func GetServerDbType() string
数据库类型, mysql,sqlite,postgres 创建的mysql数据库数据集建议使用utf8mb4 SERVER_DB_TYPE
func GetServerGinRunmode ¶
func GetServerGinRunmode() string
#GIN run mode runmode SERVER_GIN_RUNMODE=release
func GetServerGinRunode() string {
return GetServerGinRunmode()
}
func GetSocks5ProxyPassword ¶
func GetSocks5ProxyPassword() string
func GetSocks5ProxyPort ¶
func GetSocks5ProxyPort() string
func GetSocks5ProxyPortInt ¶
func GetSocks5ProxyPortInt() int64
func GetSocks5ProxyServer ¶
func GetSocks5ProxyServer() string
func GetSocks5ProxyUsername ¶
func GetSocks5ProxyUsername() string
func GetTronScanOrgApikey ¶ added in v0.1.20
func GetTronScanOrgApikey() string
TRON-PRO-API-KEY https://tronscan.org/#/myaccount/apiKeys/
func GetTrongridApikey ¶
func GetTrongridApikey() string
TRONGRID_API_KEY 通过 https://www.trongrid.io 注册获取
func IsBotManagerID ¶
func IsBotManagerIDStr ¶
func IsEnablePaymentBTCPay ¶
func IsEnablePaymentBTCPay() bool
func IsEnablePaymentBoxcoin ¶
func IsEnablePaymentBoxcoin() bool
func IsEnablePaymentCryptAPI ¶
func IsEnablePaymentCryptAPI() bool
func IsEnablePaymentEPUSDT ¶
func IsEnablePaymentEPUSDT() bool
func IsEnablePaymentEasyPay ¶
func IsEnablePaymentEasyPay() bool
func IsEnablePaymentUmiPay ¶ added in v0.1.23
func IsEnablePaymentUmiPay() bool
func IsInDocker ¶
func IsInDocker() bool
func IsTDlibSimpleMessage ¶
func IsTDlibSimpleMessage() bool
Types ¶
This section is empty.