config

package
v0.0.0-...-89505e1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const API_ERR_CODE_ACADEMY_NOT_EXISTS = 40104458
View Source
const API_ERR_CODE_ACCOUNT_BLACK_LIST = 40104474
View Source
const API_ERR_CODE_ACCOUNT_FROZEN = 40104473
View Source
const API_ERR_CODE_ACCOUNT_NOT_ELIGIBLE = 4010456
View Source
const API_ERR_CODE_ACCOUNT_NOT_ELIGIBLE_JOIN_MGM = 4010555
View Source
const API_ERR_CODE_ACCOUNT_PASSWORD_INCORRECT = 40104472
View Source
const API_ERR_CODE_ACCOUNT_UNREGISTER = 40104471
View Source
const API_ERR_CODE_CAMPAIGN_NOT_EXISTS = 40104452
View Source
const API_ERR_CODE_COUPONS_IS_ONLY_FOR_NEW_COMER = 40104454
View Source
const API_ERR_CODE_COUPON_AVAILABILITY_EXHAUSTED = 40104455
View Source
const API_ERR_CODE_COUPON_EXCHANGE_FAIL = 40104450
View Source
const API_ERR_CODE_COUPON_SINGLE_EXCHANGE_LIMIT_EXCEEDED = 40104456
View Source
const API_ERR_CODE_EMAIL_ALREADY_EXISTS = 4010445
View Source
const API_ERR_CODE_EMAIL_UNREGISTER = 4010449
View Source
const API_ERR_CODE_EXPIRED_VERIFY_CODE = 4010312
View Source
const API_ERR_CODE_FAIL_TO_CREATE_USER = 401040
View Source
const API_ERR_CODE_FAIL_TO_CREATE_USER_PROFILE = 401041
View Source
const API_ERR_CODE_FAIL_TO_CREATE_VERIFY_CODE = 40101
View Source
const API_ERR_CODE_FAIL_TO_SEND_SMS = 40102
View Source
const API_ERR_CODE_FAIL_TO_SEND_VERIFY_CODE = 401021
View Source
const API_ERR_CODE_FAIL_TO_UPDATE_ACCOUNT_INFO = 4010412
View Source
const API_ERR_CODE_FAIL_TO_UPDATE_LOCALE = 401042
View Source
const API_ERR_CODE_FAIL_TO_UPDATE_USER_PROFILE = 40104123
View Source
const API_ERR_CODE_FAIL_TO_UPLOAD_ACCOUNT_ID = 4010413
View Source
const API_ERR_CODE_GRANT_TYPE_ERROR = 40011
View Source
const API_ERR_CODE_HEADER_PLATFORM = 400011
View Source
const API_ERR_CODE_HEADER_SOURCE = 400012
View Source
const API_ERR_CODE_HEADER_UUID = 400013
View Source
const API_ERR_CODE_INVALID_VERIFY_CODE = 401031
View Source
const API_ERR_CODE_METHOD_NOT_ALLOWED = 40023
View Source
const API_ERR_CODE_METHOD_NOT_FOUND = 40404
View Source
const API_ERR_CODE_MGM_MOBILE_NO_EXISTS = 4010433
View Source
const API_ERR_CODE_MOBILE_ALREADY_EXISTS = 401044
View Source
const API_ERR_CODE_MOBILE_UNREGISTER = 4010448
View Source
const API_ERR_CODE_MULTI_ERROR = 40002
View Source
const API_ERR_CODE_ORDER_CREATE_FAIL_MGM = 40105566
View Source
const API_ERR_CODE_OUT_OF_COUPON_USAGE_TIME_RANGE = 40104453
View Source
const API_ERR_CODE_PERMISSION_DENIED = 402001

---------------------------------------------

View Source
const API_ERR_CODE_REFERRER_MOBILE_NO_EXISTS = 4010444
View Source
const API_ERR_CODE_REQUEST_PARAMETER = 40001
View Source
const API_ERR_CODE_REQUEST_PARAM_ERROR = 401032
View Source
const API_ERR_CODE_THIS_COUPON_CODE_HAS_BEEN_WRITTEN_OFF_OR_DISABLED = 40104457
View Source
const API_ERR_CODE_TOKEN_NOT_MATCH_PROVIDER = 40010
View Source
const API_ERR_CODE_TOKEN_REVOKED = 40012
View Source
const API_ERR_CODE_UNAUTHENTICATED = 40021
View Source
const API_ERR_CODE_UNAUTHENTICATED_ACTION = 40022
View Source
const API_ERR_CODE_UNAUTHENTICATED_LOGIN = 400211
View Source
const API_ERR_CODE_USER_ALREADY_EXISTS = 4010446
View Source
const API_ERR_CODE_USER_LACK_MOBILE = 401043
View Source
const API_ERR_CODE_USER_UNREGISTER = 4010447
View Source
const API_ERR_CODE_VERIFY_CODE_REQUEST_DUPLICATED = 40103
View Source
const API_RESULT_CODE_INIT = 0
View Source
const API_RESULT_CODE_SUCCESS_RESET_PASSWORD = 101001
View Source
const API_RETURN_CODE_ERROR = 400
View Source
const API_RETURN_CODE_INIT = 200
View Source
const API_RETURN_CODE_NOT_FOUND = 404
View Source
const API_RETURN_CODE_WARNING = 300
View Source
const API_WARNING_CODE_IN_MAINTENANCE = 300503

---------------------------------------------

View Source
const API_WARNING_CODE_NEED_UPDATE = 300504
View Source
const APP_VERSION = "{{version}}"

Variables

View Source
var APP_NAME string
View Source
var (
	UBTConfig *UBT.ClientOptions
)

Functions

func LoadCacheConfig

func LoadCacheConfig(configPath *string, configName *string, configType *string) (err error)

func LoadConfigFile

func LoadConfigFile(configPath *string, configName *string, configType *string) (err error)

func LoadDatabaseConfig

func LoadDatabaseConfig(configPath *string, configName *string, configType *string) (err error)

func LoadEnvConfig

func LoadEnvConfig(configPath *string, configName *string, configType *string) (err error)

func LoadLogConfig

func LoadLogConfig(configPath *string, configName *string, configType *string) (err error)

func LoadVersion

func LoadVersion()

Types

type AppConfig

type AppConfig struct {
	Name        string
	Env         string
	Locale      string
	Timezone    string
	Server      *ServerConfig
	SSH         *SSHConfig
	System      object.HashMap
	SOAServices map[string]interface{}
}
var (
	AppConfigure *AppConfig
)

type CacheConnection

type CacheConnection struct {
	MaxIdle        int
	MaxActive      int
	Expiration     int
	TimeoutConnect int
	TimeoutRead    int
	TimeoutWrite   int
	TimeoutIdle    int
}

type DatabaseConnection

type DatabaseConnection struct {
	Driver        string
	Url           string
	Host          string
	Port          string
	Database      string
	Username      string
	Password      string
	Charset       string
	Prefix        string
	PrefixIndexes string
}

type MemoryConnection

type MemoryConnection struct {
	Connection *CacheConnection
}

type MysqlConnection

type MysqlConnection struct {
	Connection *DatabaseConnection
	Collation  string
	Strict     bool
	Engine     string
	Options    []string
}

type PostgresConnection

type PostgresConnection struct {
	Connection *DatabaseConnection

	Schemas    object.StringMap
	SearchPath string
	SSLMode    string
}
var (
	DatabaseConn *PostgresConnection
)

type RedisConnection

type RedisConnection struct {
	Connection     *CacheConnection
	Protocol       string
	Host           string
	Password       string
	DB             int
	SSLEnabled     bool
	TimeoutConnect int
}
var (
	CacheConn *RedisConnection
)

type SSHConfig

type SSHConfig struct {
	PublicKeyFile  string
	PrivateKeyFile string
}

type ServerConfig

type ServerConfig struct {
	Host string
	Port string
}

Jump to

Keyboard shortcuts

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