Documentation
¶
Index ¶
- Constants
- Variables
- func Clean()
- func Get[T any]() (t T)
- func Init() (err error)
- func Register[T any]()
- func Save(out io.Writer) error
- func SetConfigFile(file string)
- func Tempdir() string
- type AppInfo
- type Audit
- type Auth
- type Cache
- type Cassandra
- type CircuitBreaker
- type CircularBuffer
- type Clickhouse
- type Config
- type Consistency
- type ConsumeFromWhere
- type Consumer
- type DBType
- type Database
- type Debug
- type DerefAliases
- type Elasticsearch
- type Etcd
- type Feishu
- type FeishuAppType
- type Grpc
- type HTTPBodyLogMode
- type HTTPBodyLogger
- type Influxdb
- type Kafka
- type Ldap
- type Logger
- type Memcached
- type Middleware
- type Minio
- type Mode
- type Mongo
- type Mqtt
- type MySQL
- type Nats
- type OTEL
- type OTLPCompression
- type OTLPProtocol
- type Postgres
- type Producer
- type ReadConcern
- type ReconnectPolicy
- type Redis
- type RethinkDB
- type RetryPolicy
- type RocketMQ
- type S3
- type SASL
- type SQLServer
- type Scope
- type Scylla
- type Server
- type Sqlite
- type Timeout
- type TracesSampler
- type WriteConcern
Constants ¶
const ( APP_NAME = "APP_NAME" //nolint:staticcheck APP_VERSION = "APP_VERSION" //nolint:staticcheck APP_DESCRIPTION = "APP_DESCRIPTION" //nolint:staticcheck APP_AUTHOR = "APP_AUTHOR" //nolint:staticcheck APP_EMAIL = "APP_EMAIL" //nolint:staticcheck APP_HOMEPAGE = "APP_HOMEPAGE" //nolint:staticcheck APP_LICENSE = "APP_LICENSE" //nolint:staticcheck APP_BUILD_TIME = "APP_BUILD_TIME" //nolint:staticcheck APP_GIT_COMMIT = "APP_GIT_COMMIT" //nolint:staticcheck APP_GIT_BRANCH = "APP_GIT_BRANCH" //nolint:staticcheck APP_GO_VERSION = "APP_GO_VERSION" //nolint:staticcheck )
const ( AUDIT_ENABLED = "AUDIT_ENABLED" //nolint:staticcheck AUDIT_ASYNC_WRITE = "AUDIT_ASYNC_WRITE" //nolint:staticcheck AUDIT_BATCH_SIZE = "AUDIT_BATCH_SIZE" //nolint:staticcheck AUDIT_FLUSH_INTERVAL = "AUDIT_FLUSH_INTERVAL" //nolint:staticcheck AUDIT_EXCLUDE_OPERATIONS = "AUDIT_EXCLUDE_OPERATIONS" //nolint:staticcheck AUDIT_EXCLUDE_TABLES = "AUDIT_EXCLUDE_TABLES" //nolint:staticcheck AUDIT_RECORD_REQUEST_BODY = "AUDIT_RECORD_REQUEST_BODY" //nolint:staticcheck AUDIT_RECORD_RESPONSE_BODY = "AUDIT_RECORD_RESPONSE_BODY" //nolint:staticcheck AUDIT_RECORD_OLD_VALUES = "AUDIT_RECORD_OLD_VALUES" //nolint:staticcheck AUDIT_RECORD_NEW_VALUES = "AUDIT_RECORD_NEW_VALUES" //nolint:staticcheck AUDIT_EXCLUDE_FIELDS = "AUDIT_EXCLUDE_FIELDS" //nolint:staticcheck AUDIT_INCLUDE_FIELDS = "AUDIT_INCLUDE_FIELDS" //nolint:staticcheck AUDIT_MAX_FIELD_LENGTH = "AUDIT_MAX_FIELD_LENGTH" //nolint:staticcheck AUDIT_RECORD_QUERY_PARAMS = "AUDIT_RECORD_QUERY_PARAMS" //nolint:staticcheck AUDIT_RECORD_USER_AGENT = "AUDIT_RECORD_USER_AGENT" //nolint:staticcheck )
const ( AUTH_NONE_EXPIRE_TOKEN = "AUTH_NONE_EXPIRE_TOKEN" //nolint:staticcheck,gosec AUTH_NONE_EXPIRE_USERNAME = "AUTH_NONE_EXPIRE_USERNAME" //nolint:staticcheck AUTH_NONE_EXPIRE_PASSWORD = "AUTH_NONE_EXPIRE_PASSORD" //nolint:staticcheck,gosec AUTH_BASE_AUTH_USERNAME = "AUTH_BASE_AUTH_USERNAME" //nolint:staticcheck AUTH_BASE_AUTH_PASSWORD = "AUTH_BASE_AUTH_PASSWORD" //nolint:staticcheck,gosec AUTH_ACCESS_TOKEN_EXPIRE_DURATION = "AUTH_ACCESS_TOKEN_EXPIRE_DURATION" //nolint:staticcheck,gosec AUTH_REFRESH_TOKEN_EXPIRE_DURATION = "AUTH_REFRESH_TOKEN_EXPIRE_DURATION" //nolint:staticcheck,gosec AUTH_RBAC_ENABLED = "AUTH_RBAC_ENABLED" //nolint:staticcheck )
const ( CACHE_SHARDS = "CACHE_SHARDS" //nolint:staticcheck CACHE_LIFE_WINDOW = "CACHE_LIFE_WINDOW" //nolint:staticcheck CACHE_CLEAN_WINDOW = "CACHE_CLEAN_WINDOW" //nolint:staticcheck CACHE_EXPIRATION = "CACHE_EXPIRATION" //nolint:staticcheck CACHE_CAPACITY = "CACHE_CAPACITY" //nolint:staticcheck )
const ( CASSANDRA_HOSTS = "CASSANDRA_HOSTS" //nolint:staticcheck CASSANDRA_PORT = "CASSANDRA_PORT" //nolint:staticcheck CASSANDRA_KEYSPACE = "CASSANDRA_KEYSPACE" //nolint:staticcheck CASSANDRA_USERNAME = "CASSANDRA_USERNAME" //nolint:staticcheck CASSANDRA_PASSWORD = "CASSANDRA_PASSWORD" //nolint:staticcheck CASSANDRA_CONSISTENCY = "CASSANDRA_CONSISTENCY" //nolint:staticcheck CASSANDRA_TIMEOUT = "CASSANDRA_TIMEOUT" //nolint:staticcheck CASSANDRA_CONNECT_TIMEOUT = "CASSANDRA_CONNECT_TIMEOUT" //nolint:staticcheck CASSANDRA_NUM_CONNS = "CASSANDRA_NUM_CONNS" //nolint:staticcheck CASSANDRA_PAGE_SIZE = "CASSANDRA_PAGE_SIZE" //nolint:staticcheck CASSANDRA_RETRY_POLICY = "CASSANDRA_RETRY_POLICY" //nolint:staticcheck CASSANDRA_RECONNECT_INTERVAL = "CASSANDRA_RECONNECT_INTERVAL" //nolint:staticcheck CASSANDRA_MAX_RETRY_COUNT = "CASSANDRA_MAX_RETRY_COUNT" //nolint:staticcheck CASSANDRA_TLS_ENABLED = "CASSANDRA_TLS_ENABLED" //nolint:staticcheck CASSANDRA_CERT_FILE = "CASSANDRA_CERT_FILE" //nolint:staticcheck CASSANDRA_KEY_FILE = "CASSANDRA_KEY_FILE" //nolint:staticcheck CASSANDRA_CA_FILE = "CASSANDRA_CA_FILE" //nolint:staticcheck CASSANDRA_INSECURE_SKIP_VERIFY = "CASSANDRA_INSECURE_SKIP_VERIFY" //nolint:staticcheck CASSANDRA_ENABLED = "CASSANDRA_ENABLED" //nolint:staticcheck )
const ( CLICKHOUSE_HOST = "CLICKHOUSE_HOST" //nolint:staticcheck CLICKHOUSE_PORT = "CLICKHOUSE_PORT" //nolint:staticcheck CLICKHOUSE_DATABASE = "CLICKHOUSE_DATABASE" //nolint:staticcheck CLICKHOUSE_USERNAME = "CLICKHOUSE_USERNAME" //nolint:staticcheck CLICKHOUSE_PASSWORD = "CLICKHOUSE_PASSWORD" //nolint:staticcheck CLICKHOUSE_DIAL_TIMEOUT = "CLICKHOUSE_DIAL_TIMEOUT" //nolint:staticcheck CLICKHOUSE_READ_TIMEOUT = "CLICKHOUSE_READ_TIMEOUT" //nolint:staticcheck CLICKHOUSE_WRITE_TIMEOUT = "CLICKHOUSE_WRITE_TIMEOUT" //nolint:staticcheck CLICKHOUSE_COMPRESS = "CLICKHOUSE_COMPRESS" //nolint:staticcheck CLICKHOUSE_DEBUG = "CLICKHOUSE_DEBUG" //nolint:staticcheck CLICKHOUSE_ENABLED = "CLICKHOUSE_ENABLED" //nolint:staticcheck )
const ( DATABASE_TYPE = "DATABASE_TYPE" //nolint:staticcheck DATABASE_AUTO_MIGRATE = "DATABASE_AUTO_MIGRATE" //nolint:staticcheck DATABASE_SLOW_QUERY_THRESHOLD = "DATABASE_SLOW_QUERY_THRESHOLD" //nolint:staticcheck DATABASE_MAX_IDLE_CONNS = "DATABASE_MAX_IDLE_CONNS" //nolint:staticcheck DATABASE_MAX_OPEN_CONNS = "DATABASE_MAX_OPEN_CONNS" //nolint:staticcheck DATABASE_CONN_MAX_LIFETIME = "DATABASE_CONN_MAX_LIFETIME" //nolint:staticcheck DATABASE_CONN_MAX_IDLE_TIME = "DATABASE_CONN_MAX_IDLE_TIME" //nolint:staticcheck )
const ( DEBUG_STATSVIZ_ENABLED = "DEBUG_STATSVIZ_ENABLED" //nolint:staticcheck DEBUG_STATSVIZ_LISTEN = "DEBUG_STATSVIZ_LISTEN" //nolint:staticcheck DEBUG_STATSVIZ_PORT = "DEBUG_STATSVIZ_PORT" //nolint:staticcheck DEBUG_PPROF_ENABLED = "DEBUG_PPROF_ENABLED" //nolint:staticcheck DEBUG_PPROF_LISTEN = "DEBUG_PPROF_LISTEN" //nolint:staticcheck DEBUG_PPROF_PORT = "DEBUG_PPROF_PORT" //nolint:staticcheck DEBUG_GOPS_ENABLED = "DEBUG_GOPS_ENABLED" //nolint:staticcheck DEBUG_GOPS_LISTEN = "DEBUG_GOPS_LISTEN" //nolint:staticcheck DEBUG_GOPS_PORT = "DEBUG_GOPS_PORT" //nolint:staticcheck )
const ( ELASTICSEARCH_ADDRS = "ELASTICSEARCH_ADDRS" //nolint:staticcheck ELASTICSEARCH_USERNAME = "ELASTICSEARCH_USERNAME" //nolint:staticcheck ELASTICSEARCH_PASSWORD = "ELASTICSEARCH_PASSWORD" //nolint:staticcheck ELASTICSEARCH_CLOUD_ID = "ELASTICSEARCH_CLOUD_ID" //nolint:staticcheck ELASTICSEARCH_API_KEY = "ELASTICSEARCH_API_KEY" //nolint:staticcheck ELASTICSEARCH_MAX_RETRIES = "ELASTICSEARCH_MAX_RETRIES" //nolint:staticcheck ELASTICSEARCH_RETRY_ON_STATUS = "ELASTICSEARCH_RETRY_ON_STATUS" //nolint:staticcheck ELASTICSEARCH_DISABLE_RETRIES = "ELASTICSEARCH_DISABLE_RETRIES" //nolint:staticcheck ELASTICSEARCH_RETRY_BACKOFF = "ELASTICSEARCH_RETRY_BACKOFF" //nolint:staticcheck ELASTICSEARCH_RETRY_BACKOFF_MIN = "ELASTICSEARCH_RETRY_BACKOFF_MIN" //nolint:staticcheck ELASTICSEARCH_RETRY_BACKOFF_MAX = "ELASTICSEARCH_RETRY_BACKOFF_MAX" //nolint:staticcheck ELASTICSEARCH_COMPRESS = "ELASTICSEARCH_COMPRESS" //nolint:staticcheck ELASTICSEARCH_DISCOVERY_INTERVAL = "ELASTICSEARCH_DISCOVERY_INTERVAL" //nolint:staticcheck ELASTICSEARCH_METRICS_ENABLED = "ELASTICSEARCH_METRICS_ENABLED" //nolint:staticcheck ELASTICSEARCH_DEBUG_LOGGER_ENABLED = "ELASTICSEARCH_DEBUG_LOGGER_ENABLED" //nolint:staticcheck ELASTICSEARCH_CONNECTION_POOL_SIZE = "ELASTICSEARCH_CONNECTION_POOL_SIZE" //nolint:staticcheck ELASTICSEARCH_RESPONSE_HEADER_TIMEOUT = "ELASTICSEARCH_RESPONSE_HEADER_TIMEOUT" //nolint:staticcheck ELASTICSEARCH_REQUEST_TIMEOUT = "ELASTICSEARCH_REQUEST_TIMEOUT" //nolint:staticcheck ELASTICSEARCH_DIAL_TIMEOUT = "ELASTICSEARCH_DIAL_TIMEOUT" //nolint:staticcheck ELASTICSEARCH_KEEP_ALIVE_INTERVAL = "ELASTICSEARCH_KEEP_ALIVE_INTERVAL" //nolint:staticcheck ELASTICSEARCH_TLS_ENABLED = "ELASTICSEARCH_TLS_ENABLED" //nolint:staticcheck ELASTICSEARCH_CERT_FILE = "ELASTICSEARCH_CERT_FILE" //nolint:staticcheck ELASTICSEARCH_KEY_FILE = "ELASTICSEARCH_KEY_FILE" //nolint:staticcheck ELASTICSEARCH_CA_FILE = "ELASTICSEARCH_CA_FILE" //nolint:staticcheck ELASTICSEARCH_INSECURE_SKIP_VERIFY = "ELASTICSEARCH_INSECURE_SKIP_VERIFY" //nolint:staticcheck ELASTICSEARCH_ENABLED = "ELASTICSEARCH_ENABLED" //nolint:staticcheck )
const ( ETCD_ENDPOINTS = "ETCD_ENDPOINTS" //nolint:staticcheck ETCD_DIAL_TIMEOUT = "ETCD_DIAL_TIMEOUT" //nolint:staticcheck ETCD_USERNAME = "ETCD_USERNAME" //nolint:staticcheck ETCD_PASSWORD = "ETCD_PASSWORD" //nolint:staticcheck ETCD_AUTO_SYNC = "ETCD_AUTO_SYNC" //nolint:staticcheck ETCD_AUTO_SYNC_INTERVAL = "ETCD_AUTO_SYNC_INTERVAL" //nolint:staticcheck ETCD_KEEPALIVE_TIME = "ETCD_KEEPALIVE_TIME" //nolint:staticcheck ETCD_KEEPALIVE_TIMEOUT = "ETCD_KEEPALIVE_TIMEOUT" //nolint:staticcheck ETCD_MAX_CALL_SEND_MSG_SIZE = "ETCD_MAX_CALL_SEND_MSG_SIZE" //nolint:staticcheck ETCD_MAX_CALL_RECV_MSG_SIZE = "ETCD_MAX_CALL_RECV_MSG_SIZE" //nolint:staticcheck ETCD_PERMIT_WITHOUT_STREAM = "ETCD_PERMIT_WITHOUT_STREAM" //nolint:staticcheck ETCD_REJECT_OLD_CLUSTER = "ETCD_REJECT_OLD_CLUSTER" //nolint:staticcheck ETCD_TLS_ENABLED = "ETCD_TLS_ENABLED" //nolint:staticcheck ETCD_CERT_FILE = "ETCD_CERT_FILE" //nolint:staticcheck ETCD_KEY_FILE = "ETCD_KEY_FILE" //nolint:staticcheck ETCD_CA_FILE = "ETCD_CA_FILE" //nolint:staticcheck ETCD_INSECURE_SKIP_VERIFY = "ETCD_INSECURE_SKIP_VERIFY" //nolint:staticcheck ETCD_ENABLED = "ETCD_ENABLED" //nolint:staticcheck )
const ( FEISHU_APP_ID = "FEISHU_APP_ID" //nolint:staticcheck FEISHU_APP_SECRET = "FEISHU_APP_SECRET" //nolint:staticcheck,gosec FEISHU_APP_TYPE = "FEISHU_APP_TYPE" //nolint:staticcheck FEISHU_DISABLE_TOKEN_CACHE = "FEISHU_DISABLE_TOKEN_CACHE" //nolint:staticcheck,gosec FEISHU_REQUEST_TIMEOUT = "FEISHU_REQUEST_TIMEOUT" //nolint:staticcheck FEISHU_TLS_ENABLED = "FEISHU_TLS_ENABLED" //nolint:staticcheck FEISHU_CERT_FILE = "FEISHU_CERT_FILE" //nolint:staticcheck FEISHU_KEY_FILE = "FEISHU_KEY_FILE" //nolint:staticcheck FEISHU_CA_FILE = "FEISHU_CA_FILE" //nolint:staticcheck FEISHU_INSECURE_SKIP_VERIFY = "FEISHU_INSECURE_SKIP_VERIFY" //nolint:staticcheck FEISHU_ENABLED = "FEISHU_ENABLED" //nolint:staticcheck )
const ( GRPC_LISTEN = "GRPC_LISTEN" //nolint:staticcheck GRPC_PORT = "GRPC_PORT" //nolint:staticcheck GRPC_MAX_RECV_MSG_SIZE = "GRPC_MAX_RECV_MSG_SIZE" //nolint:staticcheck GRPC_MAX_SEND_MSG_SIZE = "GRPC_MAX_SEND_MSG_SIZE" //nolint:staticcheck GRPC_INITIAL_WINDOW_SIZE = "GRPC_INITIAL_WINDOW_SIZE" //nolint:staticcheck GRPC_INITIAL_CONN_WINDOW_SIZE = "GRPC_INITIAL_CONN_WINDOW_SIZE" //nolint:staticcheck GRPC_KEEPALIVE_TIME = "GRPC_KEEPALIVE_TIME" //nolint:staticcheck GRPC_KEEPALIVE_TIMEOUT = "GRPC_KEEPALIVE_TIMEOUT" //nolint:staticcheck GRPC_MAX_CONNECTION_IDLE = "GRPC_MAX_CONNECTION_IDLE" //nolint:staticcheck GRPC_MAX_CONNECTION_AGE = "GRPC_MAX_CONNECTION_AGE" //nolint:staticcheck GRPC_MAX_CONNECTION_AGE_GRACE = "GRPC_MAX_CONNECTION_AGE_GRACE" //nolint:staticcheck GRPC_TLS_ENABLED = "GRPC_TLS_ENABLED" //nolint:staticcheck GRPC_CERT_FILE = "GRPC_CERT_FILE" //nolint:staticcheck GRPC_KEY_FILE = "GRPC_KEY_FILE" //nolint:staticcheck GRPC_CA_FILE = "GRPC_CA_FILE" //nolint:staticcheck GRPC_REFLECTION_ENABLED = "GRPC_REFLECTION_ENABLED" //nolint:staticcheck GRPC_HEALTH_CHECK_ENABLED = "GRPC_HEALTH_CHECK_ENABLED" //nolint:staticcheck GRPC_ENABLED = "GRPC_ENABLED" //nolint:staticcheck )
const ( INFLUXDB_HOST = "INFLUXDB_HOST" //nolint:staticcheck INFLUXDB_PORT = "INFLUXDB_PORT" //nolint:staticcheck INFLUXDB_TOKEN = "INFLUXDB_TOKEN" //nolint:staticcheck,gosec INFLUXDB_ORG = "INFLUXDB_ORG" //nolint:staticcheck INFLUXDB_BUCKET = "INFLUXDB_BUCKET" //nolint:staticcheck INFLUXDB_BATCH_SIZE = "INFLUXDB_BATCH_SIZE" //nolint:staticcheck INFLUXDB_FLUSH_INTERVAL = "INFLUXDB_FLUSH_INTERVAL" //nolint:staticcheck INFLUXDB_RETRY_INTERVAL = "INFLUXDB_RETRY_INTERVAL" //nolint:staticcheck INFLUXDB_MAX_RETRIES = "INFLUXDB_MAX_RETRIES" //nolint:staticcheck INFLUXDB_RETRY_BUFFER_LIMIT = "INFLUXDB_RETRY_BUFFER_LIMIT" //nolint:staticcheck INFLUXDB_MAX_RETRY_INTERVAL = "INFLUXDB_MAX_RETRY_INTERVAL" //nolint:staticcheck INFLUXDB_MAX_RETRY_TIME = "INFLUXDB_MAX_RETRY_TIME" //nolint:staticcheck INFLUXDB_EXPONENTIAL_BASE = "INFLUXDB_EXPONENTIAL_BASE" //nolint:staticcheck INFLUXDB_PRECISION = "INFLUXDB_PRECISION" //nolint:staticcheck INFLUXDB_USE_GZIP = "INFLUXDB_USE_GZIP" //nolint:staticcheck INFLUXDB_TLS_ENABLED = "INFLUXDB_TLS_ENABLED" //nolint:staticcheck INFLUXDB_CERT_FILE = "INFLUXDB_CERT_FILE" //nolint:staticcheck INFLUXDB_KEY_FILE = "INFLUXDB_KEY_FILE" //nolint:staticcheck INFLUXDB_CA_FILE = "INFLUXDB_CA_FILE" //nolint:staticcheck INFLUXDB_INSECURE_SKIP_VERIFY = "INFLUXDB_INSECURE_SKIP_VERIFY" //nolint:staticcheck //nolint:staticcheck INFLUXDB_DEFAULT_TAGS = "INFLUXDB_DEFAULT_TAGS" // format:key1=value1,key2=value2 INFLUXDB_APP_NAME = "INFLUXDB_APP_NAME" //nolint:staticcheck INFLUXDB_ENABLED = "INFLUXDB_ENABLED" //nolint:staticcheck )
const ( KAFKA_BROKERS = "KAFKA_BROKERS" //nolint:staticcheck KAFKA_CLIENT_ID = "KAFKA_CLIENT_ID" //nolint:staticcheck KAFKA_VERSION = "KAFKA_VERSION" //nolint:staticcheck KAFKA_SASL_ENABLED = "KAFKA_SASL_ENABLED" //nolint:staticcheck KAFKA_SASL_MECHANISM = "KAFKA_SASL_MECHANISM" //nolint:staticcheck KAFKA_SASL_USERNAME = "KAFKA_SASL_USERNAME" //nolint:staticcheck KAFKA_SASL_PASSWORD = "KAFKA_SASL_PASSWORD" //nolint:staticcheck,gosec KAFKA_TLS_ENABLED = "KAFKA_TLS_ENABLED" //nolint:staticcheck KAFKA_CERT_FILE = "KAFKA_CERT_FILE" //nolint:staticcheck KAFKA_KEY_FILE = "KAFKA_KEY_FILE" //nolint:staticcheck KAFKA_CA_FILE = "KAFKA_CA_FILE" //nolint:staticcheck KAFKA_INSECURE_SKIP_VERIFY = "KAFKA_INSECURE_SKIP_VERIFY" //nolint:staticcheck KAFKA_PRODUCER_REQUIRED_ACKS = "KAFKA_PRODUCER_REQUIRED_ACKS" //nolint:staticcheck KAFKA_PRODUCER_RETRIES = "KAFKA_PRODUCER_RETRIES" //nolint:staticcheck KAFKA_PRODUCER_COMPRESSION = "KAFKA_PRODUCER_COMPRESSION" //nolint:staticcheck KAFKA_PRODUCER_MAX_MESSAGE_BYTES = "KAFKA_PRODUCER_MAX_MESSAGE_BYTES" //nolint:staticcheck KAFKA_CONSUMER_GROUP = "KAFKA_CONSUMER_GROUP" //nolint:staticcheck KAFKA_CONSUMER_REBALANCE_STRATEGY = "KAFKA_CONSUMER_REBALANCE_STRATEGY" //nolint:staticcheck KAFKA_CONSUMER_OFFSET = "KAFKA_CONSUMER_OFFSET" //nolint:staticcheck KAFKA_TIMEOUT_DIAL = "KAFKA_TIMEOUT_DIAL" //nolint:staticcheck KAFKA_TIMEOUT_READ = "KAFKA_TIMEOUT_READ" //nolint:staticcheck KAFKA_TIMEOUT_WRITE = "KAFKA_TIMEOUT_WRITE" //nolint:staticcheck KAFKA_ENABLED = "KAFKA_ENABLED" //nolint:staticcheck )
const ( LDAP_HOST = "LDAP_HOST" //nolint:staticcheck LDAP_PORT = "LDAP_PORT" //nolint:staticcheck LDAP_BASE_DN = "LDAP_BASE_DN" //nolint:staticcheck LDAP_BIND_DN = "LDAP_BIND_DN" //nolint:staticcheck LDAP_BIND_PASSWORD = "LDAP_BIND_PASSWORD" //nolint:staticcheck,gosec LDAP_ATTRIBUTES = "LDAP_ATTRIBUTES" //nolint:staticcheck LDAP_FILTER = "LDAP_FILTER" //nolint:staticcheck LDAP_GROUP_FILTER = "LDAP_GROUP_FILTER" //nolint:staticcheck LDAP_USER_FILTER = "LDAP_USER_FILTER" //nolint:staticcheck LDAP_GROUP_DN = "LDAP_GROUP_DN" //nolint:staticcheck LDAP_USER_DN = "LDAP_USER_DN" //nolint:staticcheck LDAP_GROUP_ATTRIBUTE = "LDAP_GROUP_ATTRIBUTE" //nolint:staticcheck LDAP_USER_ATTRIBUTE = "LDAP_USER_ATTRIBUTE" //nolint:staticcheck LDAP_SCOPE = "LDAP_SCOPE" //nolint:staticcheck LDAP_REQUEST_TIMEOUT = "LDAP_REQUEST_TIMEOUT" //nolint:staticcheck LDAP_CONN_TIMEOUT = "LDAP_CONN_TIMEOUT" //nolint:staticcheck LDAP_REFERRALS = "LDAP_REFERRALS" //nolint:staticcheck LDAP_DEREF = "LDAP_DEREF" //nolint:staticcheck LDAP_PAGE_SIZE = "LDAP_PAGE_SIZE" //nolint:staticcheck LDAP_HEARTBEAT = "LDAP_HEARTBEAT" //nolint:staticcheck LDAP_TLS_ENABLED = "LDAP_TLS_ENABLED" //nolint:staticcheck LDAP_CERT_FILE = "LDAP_CERT_FILE" //nolint:staticcheck LDAP_KEY_FILE = "LDAP_KEY_FILE" //nolint:staticcheck LDAP_CA_FILE = "LDAP_CA_FILE" //nolint:staticcheck LDAP_INSECURE_SKIP_VERIFY = "LDAP_INSECURE_SKIP_VERIFY" //nolint:staticcheck LDAP_ENABLED = "LDAP_ENABLED" //nolint:staticcheck )
const ( LOGGER_DIR = "LOGGER_DIR" //nolint:staticcheck LOGGER_PREFIX = "LOGGER_PREFIX" //nolint:staticcheck LOGGER_FILE = "LOGGER_FILE" //nolint:staticcheck LOGGER_CONSOLE = "LOGGER_CONSOLE" //nolint:staticcheck LOGGER_LEVEL = "LOGGER_LEVEL" //nolint:staticcheck LOGGER_FORMAT = "LOGGER_FORMAT" //nolint:staticcheck LOGGER_ENCODER = "LOGGER_ENCODER" //nolint:staticcheck LOGGER_ERROR_STACK_DISABLED = "LOGGER_ERROR_STACK_DISABLED" //nolint:staticcheck LOGGER_MAX_AGE = "LOGGER_MAX_AGE" //nolint:staticcheck LOGGER_MAX_SIZE = "LOGGER_MAX_SIZE" //nolint:staticcheck LOGGER_MAX_BACKUPS = "LOGGER_MAX_BACKUPS" //nolint:staticcheck LOGGER_HTTP_BODY_ENABLED = "LOGGER_HTTP_BODY_ENABLED" //nolint:staticcheck LOGGER_HTTP_BODY_LOG_REQUEST = "LOGGER_HTTP_BODY_LOG_REQUEST" //nolint:staticcheck LOGGER_HTTP_BODY_LOG_RESPONSE = "LOGGER_HTTP_BODY_LOG_RESPONSE" //nolint:staticcheck LOGGER_HTTP_BODY_MAX_BODY_SIZE = "LOGGER_HTTP_BODY_MAX_BODY_SIZE" //nolint:staticcheck LOGGER_HTTP_BODY_SKIP_ROUTES = "LOGGER_HTTP_BODY_SKIP_ROUTES" //nolint:staticcheck )
const ( MEMCACHED_SERVERS = "MEMCACHED_SERVERS" //nolint:staticcheck MEMCACHED_MAX_IDLE_CONNS = "MEMCACHED_MAX_IDLE_CONNS" //nolint:staticcheck MEMCACHED_TIMEOUT = "MEMCACHED_TIMEOUT" //nolint:staticcheck MEMCACHED_MAX_CACHE_SIZE = "MEMCACHED_MAX_CACHE_SIZE" //nolint:staticcheck MEMCACHED_ENABLED = "MEMCACHED_ENABLED" //nolint:staticcheck )
const ( MIDDLEWARE_JWT_AUTH_ENABLED = "MIDDLEWARE_JWT_AUTH_ENABLED" //nolint:staticcheck MIDDLEWARE_AUTHZ_ENABLED = "MIDDLEWARE_AUTHZ_ENABLED" //nolint:staticcheck MIDDLEWARE_IAM_SESSION_ENABLED = "MIDDLEWARE_IAM_SESSION_ENABLED" //nolint:staticcheck )
const ( MINIO_ENDPOINT = "MINIO_ENDPOINT" //nolint:staticcheck MINIO_ACCESS_KEY = "MINIO_ACCESS_KEY" //nolint:staticcheck MINIO_SECRET_KEY = "MINIO_SECRET_KEY" //nolint:staticcheck MINIO_BUCKET = "MINIO_BUCKET" //nolint:staticcheck MINIO_LOCATION = "MINIO_LOCATION" //nolint:staticcheck MINIO_SECURE = "MINIO_SECURE" //nolint:staticcheck MINIO_REGION = "MINIO_REGION" //nolint:staticcheck MINIO_TIMEOUT = "MINIO_TIMEOUT" //nolint:staticcheck MINIO_PART_SIZE = "MINIO_PART_SIZE" //nolint:staticcheck MINIO_CONCURRENCY = "MINIO_CONCURRENCY" //nolint:staticcheck MINIO_COMPRESS = "MINIO_COMPRESS" //nolint:staticcheck MINIO_TRACE = "MINIO_TRACE" //nolint:staticcheck MINIO_SESSION_TOKEN = "MINIO_SESSION_TOKEN" //nolint:staticcheck MINIO_USE_IAM = "MINIO_USE_IAM" //nolint:staticcheck MINIO_USE_STS = "MINIO_USE_STS" //nolint:staticcheck MINIO_IAM_ENDPOINT = "MINIO_IAM_ENDPOINT" //nolint:staticcheck MINIO_STS_ENDPOINT = "MINIO_STS_ENDPOINT" //nolint:staticcheck MINIO_TLS_ENABLED = "MINIO_TLS_ENABLED" //nolint:staticcheck MINIO_CERT_FILE = "MINIO_CERT_FILE" //nolint:staticcheck MINIO_KEY_FILE = "MINIO_KEY_FILE" //nolint:staticcheck MINIO_CA_FILE = "MINIO_CA_FILE" //nolint:staticcheck MINIO_INSECURE_SKIP_VERIFY = "MINIO_INSECURE_SKIP_VERIFY" //nolint:staticcheck MINIO_ENABLED = "MINIO_ENABLED" //nolint:staticcheck )
const ( MONGO_HOST = "MONGO_HOST" //nolint:staticcheck MONGO_PORT = "MONGO_PORT" //nolint:staticcheck MONGO_USERNAME = "MONGO_USERNAME" //nolint:staticcheck MONGO_PASSWORD = "MONGO_PASSWORD" //nolint:staticcheck MONGO_DATABASE = "MONGO_DATABASE" //nolint:staticcheck MONGO_AUTH_SOURCE = "MONGO_AUTH_SOURCE" //nolint:staticcheck MONGO_MAX_POOL_SIZE = "MONGO_MAX_POOL_SIZE" //nolint:staticcheck MONGO_MIN_POOL_SIZE = "MONGO_MIN_POOL_SIZE" //nolint:staticcheck MONGO_CONNECT_TIMEOUT = "MONGO_CONNECT_TIMEOUT" //nolint:staticcheck MONGO_SERVER_SELECTION_TIMEOUT = "MONGO_SERVER_SELECTION_TIMEOUT" //nolint:staticcheck MONGO_MAX_CONN_IDLE_TIME = "MONGO_MAX_CONN_IDLE_TIME" //nolint:staticcheck MONGO_MAX_CONNECTING = "MONGO_MAX_CONNECTING" //nolint:staticcheck MONGO_READ_CONCERN = "MONGO_READ_CONCERN" //nolint:staticcheck MONGO_WRITE_CONCERN = "MONGO_WRITE_CONCERN" //nolint:staticcheck MONGO_TLS_ENABLED = "MONGO_TLS_ENABLED" //nolint:staticcheck MONGO_CERT_FILE = "MONGO_CERT_FILE" //nolint:staticcheck MONGO_KEY_FILE = "MONGO_KEY_FILE" //nolint:staticcheck MONGO_CA_FILE = "MONGO_CA_FILE" //nolint:staticcheck MONGO_INSECURE_SKIP_VERIFY = "MONGO_INSECURE_SKIP_VERIFY" //nolint:staticcheck MONGO_ENABLED = "MONGO_ENABLED" //nolint:staticcheck )
const ( MQTT_ADDR = "MQTT_ADDR" //nolint:staticcheck MQTT_USERNAME = "MQTT_USERNAME" //nolint:staticcheck MQTT_PASSWORD = "MQTT_PASSWORD" //nolint:staticcheck MQTT_CLIENT_PREFIX = "MQTT_CLIENT_PREFIX" //nolint:staticcheck MQTT_CONNECT_TIMEOUT = "MQTT_CONNECT_TIMEOUT" //nolint:staticcheck MQTT_KEEPALIVE = "MQTT_KEEPALIVE" //nolint:staticcheck MQTT_CLEAN_SESSION = "MQTT_CLEAN_SESSION" //nolint:staticcheck MQTT_AUTO_RECONNECT = "MQTT_AUTO_RECONNECT" //nolint:staticcheck MQTT_USE_TLS = "MQTT_USE_TLS" //nolint:staticcheck MQTT_CERT_FILE = "MQTT_CERT_FILE" //nolint:staticcheck MQTT_KEY_FILE = "MQTT_KEY_FILE" //nolint:staticcheck MQTT_INSECURE_SKIP_VERIFY = "MQTT_INSECURE_SKIP_VERIFY" //nolint:staticcheck MQTT_ENABLED = "MQTT_ENABLED" //nolint:staticcheck )
const ( MYSQL_HOST = "MYSQL_HOST" //nolint:staticcheck MYSQL_PORT = "MYSQL_PORT" //nolint:staticcheck MYSQL_DATABASE = "MYSQL_DATABASE" //nolint:staticcheck MYSQL_USERNAME = "MYSQL_USERNAME" //nolint:staticcheck MYSQL_PASSWORD = "MYSQL_PASSWORD" //nolint:staticcheck MYSQL_CHARSET = "MYSQL_CHARSET" //nolint:staticcheck MYSQL_ENABLED = "MYSQL_ENABLED" //nolint:staticcheck )
const ( NATS_ADDRS = "NATS_ADDRS" //nolint:staticcheck NATS_CLIENT_NAME = "NATS_CLIENT_NAME" //nolint:staticcheck NATS_USERNAME = "NATS_USERNAME" //nolint:staticcheck NATS_PASSWORD = "NATS_PASSWORD" //nolint:staticcheck NATS_TOKEN = "NATS_TOKEN" //nolint:staticcheck NATS_CREDENTIALS = "NATS_CREDENTIALS" //nolint:staticcheck NATS_NKEY_FILE = "NATS_NKEY_FILE" //nolint:staticcheck NATS_MAX_RECONNECTS = "NATS_MAX_RECONNECTS" //nolint:staticcheck NATS_RECONNECT_WAIT = "NATS_RECONNECT_WAIT" //nolint:staticcheck NATS_RECONNECT_JITTER = "NATS_RECONNECT_JITTER" //nolint:staticcheck NATS_RECONNECT_JITTER_TLS = "NATS_RECONNECT_JITTER_TLS" //nolint:staticcheck NATS_CONNECT_TIMEOUT = "NATS_CONNECT_TIMEOUT" //nolint:staticcheck NATS_PING_INTERVAL = "NATS_PING_INTERVAL" //nolint:staticcheck NATS_MAX_PINGS_OUTSTANDING = "NATS_MAX_PINGS_OUTSTANDING" //nolint:staticcheck NATS_TLS_ENABLED = "NATS_TLS_ENABLED" //nolint:staticcheck NATS_CERT_FILE = "NATS_CERT_FILE" //nolint:staticcheck NATS_KEY_FILE = "NATS_KEY_FILE" //nolint:staticcheck NATS_CA_FILE = "NATS_CA_FILE" //nolint:staticcheck NATS_INSECURE_SKIP_VERIFY = "NATS_INSECURE_SKIP_VERIFY" //nolint:staticcheck NATS_ENABLED = "NATS_ENABLED" //nolint:staticcheck )
const ( // OTEL_ENABLED enables OpenTelemetry tracing. OTEL_ENABLED = "OTEL_ENABLED" //nolint:staticcheck // OTEL_SERVICE_NAME configures the OpenTelemetry service.name resource attribute. OTEL_SERVICE_NAME = "OTEL_SERVICE_NAME" //nolint:staticcheck // OTEL_EXPORTER_OTLP_PROTOCOL configures the OTLP traces transport protocol. OTEL_EXPORTER_OTLP_PROTOCOL = "OTEL_EXPORTER_OTLP_PROTOCOL" //nolint:staticcheck // OTEL_EXPORTER_OTLP_TRACES_ENDPOINT configures the trace-specific OTLP endpoint. OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT" //nolint:staticcheck // OTEL_EXPORTER_OTLP_HEADERS configures headers sent with OTLP trace exports. OTEL_EXPORTER_OTLP_HEADERS = "OTEL_EXPORTER_OTLP_HEADERS" //nolint:staticcheck // OTEL_EXPORTER_OTLP_COMPRESSION configures OTLP trace export compression. OTEL_EXPORTER_OTLP_COMPRESSION = "OTEL_EXPORTER_OTLP_COMPRESSION" //nolint:staticcheck // OTEL_TRACES_SAMPLER configures the OpenTelemetry traces sampler. OTEL_TRACES_SAMPLER = "OTEL_TRACES_SAMPLER" //nolint:staticcheck // OTEL_TRACES_SAMPLER_ARG configures the OpenTelemetry traces sampler argument. OTEL_TRACES_SAMPLER_ARG = "OTEL_TRACES_SAMPLER_ARG" //nolint:staticcheck // OTEL_LOG_SPANS controls whether spans are also written to the OTEL logger. OTEL_LOG_SPANS = "OTEL_LOG_SPANS" //nolint:staticcheck // OTEL_MAX_TAG_VALUE_LEN configures the maximum helper tag value length. OTEL_MAX_TAG_VALUE_LEN = "OTEL_MAX_TAG_VALUE_LEN" //nolint:staticcheck // OTEL_BSP_MAX_QUEUE_SIZE configures the BatchSpanProcessor queue capacity. OTEL_BSP_MAX_QUEUE_SIZE = "OTEL_BSP_MAX_QUEUE_SIZE" //nolint:staticcheck // OTEL_BSP_MAX_EXPORT_BATCH_SIZE configures the BatchSpanProcessor export batch limit. OTEL_BSP_MAX_EXPORT_BATCH_SIZE = "OTEL_BSP_MAX_EXPORT_BATCH_SIZE" //nolint:staticcheck // OTEL_BSP_SCHEDULE_DELAY configures the BatchSpanProcessor schedule delay. OTEL_BSP_SCHEDULE_DELAY = "OTEL_BSP_SCHEDULE_DELAY" //nolint:staticcheck // OTEL_BSP_EXPORT_TIMEOUT configures the BatchSpanProcessor export timeout. OTEL_BSP_EXPORT_TIMEOUT = "OTEL_BSP_EXPORT_TIMEOUT" //nolint:staticcheck )
const ( POSTGRES_HOST = "POSTGRES_HOST" //nolint:staticcheck POSTGRES_PORT = "POSTGRES_PORT" //nolint:staticcheck POSTGRES_DATABASE = "POSTGRES_DATABASE" //nolint:staticcheck POSTGRES_USERNAME = "POSTGRES_USERNAME" //nolint:staticcheck POSTGRES_PASSWORD = "POSTGRES_PASSWORD" //nolint:staticcheck,gosec POSTGRES_SSLMODE = "POSTGRES_SSLMODE" //nolint:staticcheck POSTGRES_TIMEZONE = "POSTGRES_TIMEZONE" //nolint:staticcheck POSTGRES_ENABLED = "POSTGRES_ENABLED" //nolint:staticcheck )
const ( REDIS_ADDR = "REDIS_ADDR" //nolint:staticcheck REDIS_ADDRS = "REDIS_ADDRS" //nolint:staticcheck REDIS_DB = "REDIS_DB" //nolint:staticcheck REDIS_PASSWORD = "REDIS_PASSWORD" //nolint:staticcheck REDIS_NAMESPACE = "REDIS_NAMESPACE" //nolint:staticcheck REDIS_POOL_SIZE = "REDIS_POOL_SIZE" //nolint:staticcheck REDIS_EXPIRATION = "REDIS_EXPIRATION" //nolint:staticcheck REDIS_CLUSTER_MODE = "REDIS_CLUSTER_MODE" //nolint:staticcheck REDIS_DIAL_TIMEOUT = "REDIS_DIAL_TIMEOUT" //nolint:staticcheck REDIS_READ_TIMEOUT = "REDIS_READ_TIMEOUT" //nolint:staticcheck REDIS_WRITE_TIMEOUT = "REDIS_WRITE_TIMEOUT" //nolint:staticcheck REDIS_MIN_IDLE_CONNS = "REDIS_MIN_IDLE_CONNS" //nolint:staticcheck REDIS_MAX_RETRIES = "REDIS_MAX_RETRIES" //nolint:staticcheck REDIS_MIN_RETRY_BACKOFF = "REDIS_MIN_RETRY_BACKOFF" //nolint:staticcheck REDIS_MAX_RETRY_BACKOFF = "REDIS_MAX_RETRY_BACKOFF" //nolint:staticcheck REDIS_TLS_ENABLED = "REDIS_TLS_ENABLED" //nolint:staticcheck REDIS_CERT_FILE = "REDIS_CERT_FILE" //nolint:staticcheck REDIS_KEY_FILE = "REDIS_KEY_FILE" //nolint:staticcheck REDIS_CA_FILE = "REDIS_CA_FILE" //nolint:staticcheck REDIS_INSECURE_SKIP_VERIFY = "REDIS_INSECURE_SKIP_VERIFY" //nolint:staticcheck REDIS_ENABLED = "REDIS_ENABLED" //nolint:staticcheck )
const ( RETHINKDB_HOSTS = "RETHINKDB_HOSTS" //nolint:staticcheck RETHINKDB_USERNAME = "RETHINKDB_USERNAME" //nolint:staticcheck RETHINKDB_PASSWORD = "RETHINKDB_PASSWORD" //nolint:staticcheck,gosec RETHINKDB_DATABASE = "RETHINKDB_DATABASE" //nolint:staticcheck RETHINKDB_DISCOVERY_HOST = "RETHINKDB_DISCOVERY_HOST" //nolint:staticcheck RETHINKDB_MAX_IDLE = "RETHINKDB_MAX_IDLE" //nolint:staticcheck RETHINKDB_MAX_OPEN = "RETHINKDB_MAX_OPEN" //nolint:staticcheck RETHINKDB_NUM_RETRIES = "RETHINKDB_NUM_RETRIES" //nolint:staticcheck RETHINKDB_CONNECT_TIMEOUT = "RETHINKDB_CONNECT_TIMEOUT" //nolint:staticcheck RETHINKDB_READ_TIMEOUT = "RETHINKDB_READ_TIMEOUT" //nolint:staticcheck RETHINKDB_WRITE_TIMEOUT = "RETHINKDB_WRITE_TIMEOUT" //nolint:staticcheck RETHINKDB_KEEP_ALIVE_TIME = "RETHINKDB_KEEP_ALIVE_TIME" //nolint:staticcheck RETHINKDB_TLS_ENABLED = "RETHINKDB_TLS_ENABLED" //nolint:staticcheck RETHINKDB_CERT_FILE = "RETHINKDB_CERT_FILE" //nolint:staticcheck RETHINKDB_KEY_FILE = "RETHINKDB_KEY_FILE" //nolint:staticcheck RETHINKDB_CA_FILE = "RETHINKDB_CA_FILE" //nolint:staticcheck RETHINKDB_INSECURE_SKIP_VERIFY = "RETHINKDB_INSECURE_SKIP_VERIFY" //nolint:staticcheck RETHINKDB_ENABLED = "RETHINKDB_ENABLED" //nolint:staticcheck )
const ( ROCKETMQ_NAMESRV_ADDRS = "ROCKETMQ_NAMESRV_ADDRS" //nolint:staticcheck ROCKETMQ_ACCESS_KEY = "ROCKETMQ_ACCESS_KEY" //nolint:staticcheck ROCKETMQ_SECRET_KEY = "ROCKETMQ_SECRET_KEY" //nolint:staticcheck ROCKETMQ_NAMESPACE = "ROCKETMQ_NAMESPACE" //nolint:staticcheck ROCKETMQ_GROUP_NAME = "ROCKETMQ_GROUP_NAME" //nolint:staticcheck ROCKETMQ_INSTANCE_NAME = "ROCKETMQ_INSTANCE_NAME" //nolint:staticcheck ROCKETMQ_NUM_RETRIES = "ROCKETMQ_NUM_RETRIES" //nolint:staticcheck ROCKETMQ_SEND_MSG_TIMEOUT = "ROCKETMQ_SEND_MSG_TIMEOUT" //nolint:staticcheck ROCKETMQ_VIP_CHANNEL_ENABLED = "ROCKETMQ_VIP_CHANNEL_ENABLED" //nolint:staticcheck ROCKETMQ_CONSUME_ORDERLY = "ROCKETMQ_CONSUME_ORDERLY" //nolint:staticcheck ROCKETMQ_MAX_RECONSUME_TIMES = "ROCKETMQ_MAX_RECONSUME_TIMES" //nolint:staticcheck ROCKETMQ_AUTO_COMMIT = "ROCKETMQ_AUTO_COMMIT" //nolint:staticcheck ROCKETMQ_CONSUME_CONCURRENTLY_MAX_SPAN = "ROCKETMQ_CONSUME_CONCURRENTLY_MAX_SPAN" //nolint:staticcheck ROCKETMQ_CONSUME_MESSAGE_BATCH_MAX_SIZE = "ROCKETMQ_CONSUME_MESSAGE_BATCH_MAX_SIZE" //nolint:staticcheck ROCKETMQ_MESSAGE_MODEL = "ROCKETMQ_MESSAGE_MODEL" //nolint:staticcheck ROCKETMQ_CONSUME_FROM_WHERE = "ROCKETMQ_CONSUME_FROM_WHERE" //nolint:staticcheck ROCKETMQ_CONSUME_TIMESTAMP = "ROCKETMQ_CONSUME_TIMESTAMP" //nolint:staticcheck ROCKETMQ_TRACE_ENABLED = "ROCKETMQ_TRACE_ENABLED" //nolint:staticcheck ROCKETMQ_CREDENTIALS_FILE = "ROCKETMQ_CREDENTIALS_FILE" //nolint:staticcheck,gosec ROCKETMQ_TLS_ENABLED = "ROCKETMQ_TLS_ENABLED" //nolint:staticcheck ROCKETMQ_CERT_FILE = "ROCKETMQ_CERT_FILE" //nolint:staticcheck ROCKETMQ_KEY_FILE = "ROCKETMQ_KEY_FILE" //nolint:staticcheck ROCKETMQ_CA_FILE = "ROCKETMQ_CA_FILE" //nolint:staticcheck ROCKETMQ_INSECURE_SKIP_VERIFY = "ROCKETMQ_INSECURE_SKIP_VERIFY" //nolint:staticcheck ROCKETMQ_ENABLED = "ROCKETMQ_ENABLED" //nolint:staticcheck )
const ( S3_ENDPOINT = "S3_ENDPOINT" //nolint:staticcheck S3_REGION = "S3_REGION" //nolint:staticcheck S3_ACCESS_KEY_ID = "S3_ACCESS_KEY_ID" //nolint:staticcheck S3_SECRET_ACCESS_KEY = "S3_SECRET_ACCESS_KEY" //nolint:staticcheck S3_BUCKET = "S3_BUCKET" //nolint:staticcheck S3_USE_SSL = "S3_USE_SSL" //nolint:staticcheck S3_ENABLED = "S3_ENABLED" //nolint:staticcheck )
const ( SCYLLA_HOSTS = "SCYLLA_HOSTS" //nolint:staticcheck SCYLLA_USERNAME = "SCYLLA_USERNAME" //nolint:staticcheck SCYLLA_PASSWORD = "SCYLLA_PASSWORD" //nolint:staticcheck SCYLLA_KEYSPACE = "SCYLLA_KEYSPACE" //nolint:staticcheck SCYLLA_CONSISTENCY = "SCYLLA_CONSISTENCY" //nolint:staticcheck SCYLLA_NUM_CONNS = "SCYLLA_NUM_CONNS" //nolint:staticcheck SCYLLA_CONNECT_TIMEOUT = "SCYLLA_CONNECT_TIMEOUT" //nolint:staticcheck SCYLLA_TIMEOUT = "SCYLLA_TIMEOUT" //nolint:staticcheck SCYLLA_PAGE_SIZE = "SCYLLA_PAGE_SIZE" //nolint:staticcheck SCYLLA_RETRY_POLICY = "SCYLLA_RETRY_POLICY" //nolint:staticcheck SCYLLA_RETRY_NUM_RETRIES = "SCYLLA_RETRY_NUM_RETRIES" //nolint:staticcheck SCYLLA_RETRY_MIN_INTERVAL = "SCYLLA_RETRY_MIN_INTERVAL" //nolint:staticcheck SCYLLA_RETRY_MAX_INTERVAL = "SCYLLA_RETRY_MAX_INTERVAL" //nolint:staticcheck SCYLLA_RECONNECT_POLICY = "SCYLLA_RECONNECT_POLICY" //nolint:staticcheck SCYLLA_RECONNECT_MAX_RETRIES = "SCYLLA_RECONNECT_MAX_RETRIES" //nolint:staticcheck SCYLLA_RECONNECT_INITIAL_INTERVAL = "SCYLLA_RECONNECT_INITIAL_INTERVAL" //nolint:staticcheck SCYLLA_RECONNECT_MAX_INTERVAL = "SCYLLA_RECONNECT_MAX_INTERVAL" //nolint:staticcheck SCYLLA_RECONNECT_CONSTANT_INTERVAL = "SCYLLA_RECONNECT_CONSTANT_INTERVAL" //nolint:staticcheck SCYLLA_TRACING_ENABLED = "SCYLLA_TRACING_ENABLED" //nolint:staticcheck SCYLLA_TLS_ENABLED = "SCYLLA_TLS_ENABLED" //nolint:staticcheck SCYLLA_CERT_FILE = "SCYLLA_CERT_FILE" //nolint:staticcheck SCYLLA_KEY_FILE = "SCYLLA_KEY_FILE" //nolint:staticcheck SCYLLA_CA_FILE = "SCYLLA_CA_FILE" //nolint:staticcheck SCYLLA_INSECURE_SKIP_VERIFY = "SCYLLA_INSECURE_SKIP_VERIFY" //nolint:staticcheck SCYLLA_ENABLED = "SCYLLA_ENABLED" //nolint:staticcheck )
const ( Prod = "prod" Stg = "stg" Pre = "pre" Test = "test" Dev = "dev" Local = "local" )
const ( SERVER_DOMAIN = "SERVER_DOMAIN" //nolint:staticcheck SERVER_MODE = "SERVER_MODE" //nolint:staticcheck SERVER_LISTEN = "SERVER_LISTEN" //nolint:staticcheck SERVER_PORT = "SERVER_PORT" //nolint:staticcheck SERVER_READ_TIMEOUT = "SERVER_READ_TIMEOUT" //nolint:staticcheck SERVER_WRITE_TIMEOUT = "SERVER_WRITE_TIMEOUT" //nolint:staticcheck SERVER_IDLE_TIMEOUT = "SERVER_IDLE_TIMEOUT" //nolint:staticcheck SERVER_CIRCUIT_BREAKER_NAME = "SERVER_CIRCUIT_BREAKER_NAME" //nolint:staticcheck SERVER_CIRCUIT_BREAKER_MAX_REQUESTS = "SERVER_CIRCUIT_BREAKER_MAX_REQUESTS" //nolint:staticcheck SERVER_CIRCUIT_BREAKER_INTERVAL = "SERVER_CIRCUIT_BREAKER_INTERVAL" //nolint:staticcheck SERVER_CIRCUIT_BREAKER_TIMEOUT = "SERVER_CIRCUIT_BREAKER_TIMEOUT" //nolint:staticcheck SERVER_CIRCUIT_BREAKER_FAILURE_RATE = "SERVER_CIRCUIT_BREAKER_FAILURE_RATE" //nolint:staticcheck SERVER_CIRCUIT_BREAKER_MIN_REQUESTS = "SERVER_CIRCUIT_BREAKER_MIN_REQUESTS" //nolint:staticcheck SERVER_CIRCUIT_BREAKER_ENABLED = "SERVER_CIRCUIT_BREAKER_ENABLED" //nolint:staticcheck SERVER_CIRCULAR_BUFFER_SIZE_OPERATION_LOG = "SERVER_CIRCULAR_BUFFER_SIZE_OPERATION_LOG" //nolint:staticcheck )
const ( SQLITE_PATH = "SQLITE_PATH" //nolint:staticcheck SQLITE_DATABASE = "SQLITE_DATABASE" //nolint:staticcheck SQLITE_IS_MEMORY = "SQLITE_IS_MEMORY" //nolint:staticcheck SQLITE_ENABLED = "SQLITE_ENABLED" //nolint:staticcheck )
const ( SQLSERVER_HOST = "SQLSERVER_HOST" //nolint:staticcheck SQLSERVER_PORT = "SQLSERVER_PORT" //nolint:staticcheck SQLSERVER_DATABASE = "SQLSERVER_DATABASE" //nolint:staticcheck SQLSERVER_USERNAME = "SQLSERVER_USERNAME" //nolint:staticcheck SQLSERVER_PASSWORD = "SQLSERVER_PASSWORD" //nolint:staticcheck,gosec SQLSERVER_ENCRYPT = "SQLSERVER_ENCRYPT" //nolint:staticcheck SQLSERVER_TRUST_SERVER = "SQLSERVER_TRUST_SERVER" //nolint:staticcheck SQLSERVER_APP_NAME = "SQLSERVER_APP_NAME" //nolint:staticcheck SQLSERVER_ENABLED = "SQLSERVER_ENABLED" //nolint:staticcheck )
Variables ¶
var (
App = new(Config)
)
Functions ¶
func Get ¶
func Get[T any]() (t T)
Get returns the registered custom configuration. The type parameter T must match the registered type or be a pointer to it, otherwise a zero value or nil pointer will be returned.
Example usage:
config.Register[WechatConfig]() // Get by pointer type - returns pointer cfg3 := config.Get[*WechatConfig]() // Type mismatch - returns zero value cfg4 := config.Get[OtherConfig]() // Type mismatch - returns nil cfg5 := config.Get[*OtherConfig]()
func Init ¶
func Init() (err error)
Init initializes the application configuration
Configuration priority (from highest to lowest): 1. Environment variables 2. Configuration file 3. Default values
func Register ¶
func Register[T any]()
Register registers a custom configuration into config system. The type parameter T can be either struct type or pointer to struct type. If T is not a struct or pointer to struct, the registration will be skipped silently. The registered type will be used to create and initialize the configuration instance when loading configuration from file or environment variables.
Configuration values are loaded in the following priority order (from highest to lowest): 1. Environment variables (format: SECTION_FIELD, e.g., NATS_USERNAME) 2. Configuration file values 3. Default values from struct tags
The struct tag "default" can be used to set default values for fields. For time.Duration fields, you can use duration strings like "5s", "1m", etc.
Register can be called before or after `Init`. If called before `Init`, the registration will be processed during initialization.
Example usage:
type WechatConfig struct {
AppID string `json:"app_id" mapstructure:"app_id" default:"myappid"`
AppSecret string `json:"app_secret" mapstructure:"app_secret" default:"myappsecret"`
Enabled bool `json:"enabled" mapstructure:"enabled"`
}
type NatsConfig struct {
URL string `json:"url" mapstructure:"url" default:"nats://127.0.0.1:4222"`
Username string `json:"username" mapstructure:"username" default:"nats"`
Password string `json:"password" mapstructure:"password" default:"nats"`
Timeout time.Duration `json:"timeout" mapstructure:"timeout" default:"5s"`
Enabled bool `json:"enabled" mapstructure:"enabled"`
}
// Register with struct type
config.Register[WechatConfig]()
// Register with pointer type
config.Register[*NatsConfig]()
After registration, you can access the config using Get:
natsCfg := config.Get[NatsConfig]() // or with pointer natsPtr := config.Get[*NatsConfig]()
func SetConfigFile ¶
func SetConfigFile(file string)
SetConfigFile sets an explicit config file path. You should always call this function before `Init`.
Types ¶
type AppInfo ¶
type AppInfo struct {
// Basic application information
Name string `json:"name" mapstructure:"name" ini:"name" yaml:"name"`
Version string `json:"version" mapstructure:"version" ini:"version" yaml:"version"`
Description string `json:"description" mapstructure:"description" ini:"description" yaml:"description"`
Author string `json:"author" mapstructure:"author" ini:"author" yaml:"author"`
Email string `json:"email" mapstructure:"email" ini:"email" yaml:"email"`
Homepage string `json:"homepage" mapstructure:"homepage" ini:"homepage" yaml:"homepage"`
License string `json:"license" mapstructure:"license" ini:"license" yaml:"license"`
// Build and runtime information
BuildTime time.Time `json:"build_time" mapstructure:"build_time" ini:"build_time" yaml:"build_time"`
GitCommit string `json:"git_commit" mapstructure:"git_commit" ini:"git_commit" yaml:"git_commit"`
GitBranch string `json:"git_branch" mapstructure:"git_branch" ini:"git_branch" yaml:"git_branch"`
GoVersion string `json:"go_version" mapstructure:"go_version" ini:"go_version" yaml:"go_version"`
GitTag string `json:"git_tag" mapstructure:"git_tag" ini:"git_tag" yaml:"git_tag"`
GitTreeState string `json:"git_tree_state" mapstructure:"git_tree_state" ini:"git_tree_state" yaml:"git_tree_state"`
Platform string `json:"platform" mapstructure:"platform" ini:"platform" yaml:"platform"`
Compiler string `json:"compiler" mapstructure:"compiler" ini:"compiler" yaml:"compiler"`
BuildTags []string `json:"build_tags" mapstructure:"build_tags" ini:"build_tags" yaml:"build_tags"`
}
AppInfo represents application metadata and build information This struct contains essential project information that can be used for version reporting, monitoring, and application identification
type Audit ¶
type Audit struct {
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
AsyncWrite bool `json:"async_write" mapstructure:"async_write" ini:"async_write" yaml:"async_write"`
BatchSize int `json:"batch_size" mapstructure:"batch_size" ini:"batch_size" yaml:"batch_size"`
FlushInterval string `json:"flush_interval" mapstructure:"flush_interval" ini:"flush_interval" yaml:"flush_interval"`
ExcludeOperations []consts.OP `json:"exclude_operations" mapstructure:"exclude_operations" ini:"exclude_operations" yaml:"exclude_operations"`
ExcludeTables []string `json:"exclude_tables" mapstructure:"exclude_tables" ini:"exclude_tables" yaml:"exclude_tables"`
RecordRequestBody bool `json:"record_request_body" mapstructure:"record_request_body" ini:"record_request_body" yaml:"record_request_body"`
RecordResponseBody bool `json:"record_response_body" mapstructure:"record_response_body" ini:"record_response_body" yaml:"record_response_body"`
RecordOldValues bool `json:"record_old_values" mapstructure:"record_old_values" ini:"record_old_values" yaml:"record_old_values"`
RecordNewValues bool `json:"record_new_values" mapstructure:"record_new_values" ini:"record_new_values" yaml:"record_new_values"`
ExcludeFields []string `json:"exclude_fields" mapstructure:"exclude_fields" ini:"exclude_fields" yaml:"exclude_fields"`
IncludeFields []string `json:"include_fields" mapstructure:"include_fields" ini:"include_fields" yaml:"include_fields"`
MaxFieldLength int `json:"max_field_length" mapstructure:"max_field_length" ini:"max_field_length" yaml:"max_field_length"`
RecordQueryParams bool `json:"record_query_params" mapstructure:"record_query_params" ini:"record_query_params" yaml:"record_query_params"`
RecordUserAgent bool `json:"record_user_agent" mapstructure:"record_user_agent" ini:"record_user_agent" yaml:"record_user_agent"`
}
type Auth ¶
type Auth struct {
NoneExpireToken string `json:"none_expire_token" mapstructure:"none_expire_token" ini:"none_expire_token" yaml:"none_expire_token"`
NoneExpireUsername string `json:"none_expire_username" mapstructure:"none_expire_username" ini:"none_expire_username" yaml:"none_expire_username"`
NoneExpirePassword string `json:"none_expire_passord" mapstructure:"none_expire_passord" ini:"none_expire_passord" yaml:"none_expire_passord"`
BaseAuthUsername string `json:"base_auth_username" mapstructure:"base_auth_username" ini:"base_auth_username" yaml:"base_auth_username"`
BaseAuthPassword string `json:"base_auth_password" mapstructure:"base_auth_password" ini:"base_auth_password" yaml:"base_auth_password"`
AccessTokenExpireDuration time.Duration `` /* 150-byte string literal not displayed */
RefreshTokenExpireDuration time.Duration `` /* 154-byte string literal not displayed */
RBACEnabled bool `json:"rbac_enabled" mapstructure:"rbac_enabled" ini:"rbac_enabled" yaml:"rbac_enabled"`
}
type Cache ¶
type Cache struct {
Shards int `json:"shards" mapstructure:"shards" ini:"shards" yaml:"shards"` // 分片数量(仅部分缓存类型支持)
LifeWindow time.Duration `json:"life_window" mapstructure:"life_window" ini:"life_window" yaml:"life_window"` // 单条数据存活时间
CleanWindow time.Duration `json:"clean_window" mapstructure:"clean_window" ini:"clean_window" yaml:"clean_window"` // 清理过期数据的周期
Expiration time.Duration `json:"expiration" mapstructure:"expiration" ini:"expiration" yaml:"expiration"`
Capacity int `json:"capacity" mapstructure:"capacity" ini:"capacity" yaml:"capacity"`
}
type Cassandra ¶
type Cassandra struct {
Hosts []string `json:"hosts" mapstructure:"hosts" ini:"hosts" yaml:"hosts"`
Port int `json:"port" mapstructure:"port" ini:"port" yaml:"port"`
Keyspace string `json:"keyspace" mapstructure:"keyspace" ini:"keyspace" yaml:"keyspace"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
Consistency string `json:"consistency" mapstructure:"consistency" ini:"consistency" yaml:"consistency"`
Timeout time.Duration `json:"timeout" mapstructure:"timeout" ini:"timeout" yaml:"timeout"`
ConnectTimeout time.Duration `json:"connect_timeout" mapstructure:"connect_timeout" ini:"connect_timeout" yaml:"connect_timeout"`
NumConns int `json:"num_conns" mapstructure:"num_conns" ini:"num_conns" yaml:"num_conns"`
PageSize int `json:"page_size" mapstructure:"page_size" ini:"page_size" yaml:"page_size"`
RetryPolicy string `json:"retry_policy" mapstructure:"retry_policy" ini:"retry_policy" yaml:"retry_policy"`
ReconnectInterval time.Duration `json:"reconnect_interval" mapstructure:"reconnect_interval" ini:"reconnect_interval" yaml:"reconnect_interval"`
MaxRetryCount int `json:"max_retry_count" mapstructure:"max_retry_count" ini:"max_retry_count" yaml:"max_retry_count"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type CircuitBreaker ¶
type CircuitBreaker struct {
Name string `json:"name" mapstructure:"name" ini:"name" yaml:"name"`
MaxRequests uint32 `json:"max_requests" mapstructure:"max_requests" ini:"max_requests" yaml:"max_requests"`
Interval time.Duration `json:"interval" mapstructure:"interval" ini:"interval" yaml:"interval"`
Timeout time.Duration `json:"timeout" mapstructure:"timeout" ini:"timeout" yaml:"timeout"`
FailureRate float64 `json:"failure_rate" mapstructure:"failure_rate" ini:"failure_rate" yaml:"failure_rate"`
MinRequests uint32 `json:"min_requests" mapstructure:"min_requests" ini:"min_requests" yaml:"min_requests"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type CircularBuffer ¶
type CircularBuffer struct {
SizeOperationLog int64 `json:"size_operation_log" mapstructure:"size_operation_log" ini:"size" yaml:"size_operation_log"`
}
type Clickhouse ¶
type Clickhouse struct {
Host string `json:"host" mapstructure:"host" ini:"host" yaml:"host"`
Port uint `json:"port" mapstructure:"port" ini:"port" yaml:"port"`
Database string `json:"database" mapstructure:"database" ini:"database" yaml:"database"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
DialTimeout string `json:"dial_timeout" mapstructure:"dial_timeout" ini:"dial_timeout" yaml:"dial_timeout"`
ReadTimeout string `json:"read_timeout" mapstructure:"read_timeout" ini:"read_timeout" yaml:"read_timeout"`
WriteTimeout string `json:"write_timeout" mapstructure:"write_timeout" ini:"write_timeout" yaml:"write_timeout"`
Compress bool `json:"compress" mapstructure:"compress" ini:"compress" yaml:"compress"`
Debug bool `json:"debug" mapstructure:"debug" ini:"debug" yaml:"debug"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Config ¶
type Config struct {
AppInfo `json:"app" mapstructure:"app" ini:"app" yaml:"app"`
Server `json:"server" mapstructure:"server" ini:"server" yaml:"server"`
Middleware `json:"middleware" mapstructure:"middleware" ini:"middleware" yaml:"middleware"`
Grpc `json:"grpc" mapstructure:"grpc" ini:"grpc" yaml:"grpc"`
Auth `json:"auth" mapstructure:"auth" ini:"auth" yaml:"auth"`
Database `json:"database" mapstructure:"database" ini:"database" yaml:"database"`
Cache `json:"cache" mapstructure:"cache" ini:"cache" yaml:"cache"`
Sqlite `json:"sqlite" mapstructure:"sqlite" ini:"sqlite" yaml:"sqlite"`
Postgres `json:"postgres" mapstructure:"postgres" ini:"postgres" yaml:"postgres"`
MySQL `json:"mysql" mapstructure:"mysql" ini:"mysql" yaml:"mysql"`
SQLServer `json:"sqlserver" mapstructure:"sqlserver" ini:"sqlserver" yaml:"sqlserver"`
Clickhouse `json:"clickhouse" mapstructure:"clickhouse" ini:"clickhouse" yaml:"clickhouse"`
Redis `json:"redis" mapstructure:"redis" ini:"redis" yaml:"redis"`
OTEL `json:"otel" mapstructure:"otel" ini:"otel" yaml:"otel"`
Elasticsearch `json:"elasticsearch" mapstructure:"elasticsearch" ini:"elasticsearch" yaml:"elasticsearch"`
Mongo `json:"mongo" mapstructure:"mongo" ini:"mongo" yaml:"mongo"`
Kafka `json:"kafka" mapstructure:"kafka" ini:"kafka" yaml:"kafka"`
Minio `json:"minio" mapstructure:"minio" ini:"minio" yaml:"minio"`
S3 `json:"s3" mapstructure:"s3" ini:"s3" yaml:"s3"`
Logger `json:"logger" mapstructure:"logger" ini:"logger" yaml:"logger"`
Ldap `json:"ldap" mapstructure:"ldap" ini:"ldap" yaml:"ldap"`
Influxdb `json:"influxdb" mapstructure:"influxdb" ini:"influxdb" yaml:"influxdb"`
Mqtt `json:"mqtt" mapstructure:"mqtt" ini:"mqtt" yaml:"mqtt"`
Nats `json:"nats" mapstructure:"nats" ini:"nats" yaml:"nats"`
Etcd `json:"etcd" mapstructure:"etcd" ini:"etcd" yaml:"etcd"`
Cassandra `json:"cassandra" mapstructure:"cassandra" ini:"cassandra" yaml:"cassandra"`
Scylla `json:"scylla" mapstructure:"scylla" ini:"scylla" yaml:"scylla"`
Memcached `json:"memcached" mapstructure:"memcached" ini:"memcached" yaml:"memcached"`
RethinkDB `json:"rethinkdb" mapstructure:"rethinkdb" ini:"rethinkdb" yaml:"rethinkdb"`
RocketMQ `json:"rocketmq" mapstructure:"rocketmq" ini:"rocketmq" yaml:"rocketmq"`
Feishu `json:"feishu" mapstructure:"feishu" ini:"feishu" yaml:"feishu"`
Debug `json:"debug" mapstructure:"debug" ini:"debug" yaml:"debug"`
Audit `json:"audit" mapstructure:"audit" ini:"audit" yaml:"audit"`
}
type Consistency ¶
type Consistency string
const ( ConsistencyAny Consistency = "any" ConsistencyOne Consistency = "one" ConsistencyTwo Consistency = "two" ConsistencyThree Consistency = "three" ConsistencyQuorum Consistency = "quorum" ConsistencyAll Consistency = "all" ConsistencyLocalQuorum Consistency = "local_quorum" ConsistencyEachQuorum Consistency = "each_quorum" ConsistencyLocalOne Consistency = "local_one" )
type ConsumeFromWhere ¶
type ConsumeFromWhere string
const ( ConsumeFromWhereLastOffset ConsumeFromWhere = "last_offset" // 从上次消费位点开始消费 ConsumeFromWhereFirstOffset ConsumeFromWhere = "first_offset" // 从队列最开始开始消费 ConsumeFromWhereTimestamp ConsumeFromWhere = "timestamp" // 从指定时间点开始消费 )
type Consumer ¶
type Consumer struct {
Group string `json:"group" mapstructure:"group" ini:"group" yaml:"group"`
RebalanceStrategy string `json:"rebalance_strategy" mapstructure:"rebalance_strategy" ini:"rebalance_strategy" yaml:"rebalance_strategy"`
Offset string `json:"offset" mapstructure:"offset" ini:"offset" yaml:"offset"`
}
Consumer defines Kafka consumer specific configuration
type Database ¶
type Database struct {
Type DBType `json:"type" mapstructure:"type" ini:"type" yaml:"type"`
AutoMigrate bool `json:"auto_migrate" mapstructure:"auto_migrate" ini:"auto_migrate" yaml:"auto_migrate"`
SlowQueryThreshold time.Duration `json:"slow_query_threshold" mapstructure:"slow_query_threshold" ini:"slow_query_threshold" yaml:"slow_query_threshold"`
MaxIdleConns int `json:"max_idle_conns" mapstructure:"max_idle_conns" ini:"max_idle_conns" yaml:"max_idle_conns"`
MaxOpenConns int `json:"max_open_conns" mapstructure:"max_open_conns" ini:"max_open_conns" yaml:"max_open_conns"`
ConnMaxLifetime time.Duration `json:"conn_max_lifetime" mapstructure:"conn_max_lifetime" ini:"conn_max_lifetime" yaml:"conn_max_lifetime"`
ConnMaxIdleTime time.Duration `json:"conn_max_idle_time" mapstructure:"conn_max_idle_time" ini:"conn_max_idle_time" yaml:"conn_max_idle_time"`
}
type Debug ¶
type Debug struct {
StatsvizEnabled bool `json:"statsviz_enabled" mapstructure:"statsviz_enabled" ini:"statsviz_enabled" yaml:"statsviz_enabled"`
StatsvizListen string `json:"statsviz_listen" mapstructure:"statsviz_listen" ini:"statsviz_listen" yaml:"statsviz_listen"`
StatsvizPort int `json:"statsviz_port" mapstructure:"statsviz_port" ini:"statsviz_port" yaml:"statsviz_port"`
PprofEnabled bool `json:"pprof_enabled" mapstructure:"pprof_enabled" ini:"pprof_enabled" yaml:"pprof_enabled"`
PprofListen string `json:"pprof_listen" mapstructure:"pprof_listen" ini:"pprof_listen" yaml:"pprof_listen"`
PprofPort int `json:"pprof_port" mapstructure:"pprof_port" ini:"pprof_port" yaml:"pprof_port"`
GopsEnabled bool `json:"gops_enabled" mapstructure:"gops_enabled" ini:"gops_enabled" yaml:"gops_enabled"`
GopsListen string `json:"gops_listen" mapstructure:"gops_listen" ini:"gops_listen" yaml:"gops_listen"`
GopsPort int `json:"gops_port" mapstructure:"gops_port" ini:"gops_port" yaml:"gops_port"`
}
type DerefAliases ¶
type DerefAliases int
DerefAliases controls alias dereferencing
const ( // NeverDerefAliases never dereferences aliases NeverDerefAliases DerefAliases = 0 // DerefInSearching dereferences aliases in searching DerefInSearching DerefAliases = 1 // DerefFindingBaseObj dereferences aliases in finding the base object DerefFindingBaseObj DerefAliases = 2 // DerefAlways dereferences aliases always DerefAlways DerefAliases = 3 )
type Elasticsearch ¶
type Elasticsearch struct {
Addrs []string `json:"addrs" mapstructure:"addrs" ini:"addrs" yaml:"addrs"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
CloudID string `json:"cloud_id" mapstructure:"cloud_id" ini:"cloud_id" yaml:"cloud_id"`
APIKey string `json:"api_key" mapstructure:"api_key" ini:"api_key" yaml:"api_key"`
MaxRetries int `json:"max_retries" mapstructure:"max_retries" ini:"max_retries" yaml:"max_retries"`
RetryOnStatus []int `json:"retry_on_status" mapstructure:"retry_on_status" ini:"retry_on_status" yaml:"retry_on_status"`
DisableRetries bool `json:"disable_retries" mapstructure:"disable_retries" ini:"disable_retries" yaml:"disable_retries"`
RetryBackoff bool `json:"retry_backoff" mapstructure:"retry_backoff" ini:"retry_backoff" yaml:"retry_backoff"`
RetryBackoffMin time.Duration `json:"retry_backoff_min" mapstructure:"retry_backoff_min" ini:"retry_backoff_min" yaml:"retry_backoff_min"`
RetryBackoffMax time.Duration `json:"retry_backoff_max" mapstructure:"retry_backoff_max" ini:"retry_backoff_max" yaml:"retry_backoff_max"`
Compress bool `json:"compress" mapstructure:"compress" ini:"compress" yaml:"compress"`
DiscoveryInterval time.Duration `json:"discovery_interval" mapstructure:"discovery_interval" ini:"discovery_interval" yaml:"discovery_interval"`
MetricsEnabled bool `json:"metrics_enabled" mapstructure:"metrics_enabled" ini:"metrics_enabled" yaml:"metrics_enabled"`
DebugLoggerEnabled bool `json:"debug_logger_enabled" mapstructure:"debug_logger_enabled" ini:"debug_logger_enabled" yaml:"debug_logger_enabled"`
ConnectionPoolSize int `json:"connection_pool_size" mapstructure:"connection_pool_size" ini:"connection_pool_size" yaml:"connection_pool_size"`
ResponseHeaderTimeout time.Duration `` /* 130-byte string literal not displayed */
RequestTimeout time.Duration `json:"request_timeout" mapstructure:"request_timeout" ini:"request_timeout" yaml:"request_timeout"`
DialTimeout time.Duration `json:"dial_timeout" mapstructure:"dial_timeout" ini:"dial_timeout" yaml:"dial_timeout"`
KeepAliveInterval time.Duration `json:"keep_alive_interval" mapstructure:"keep_alive_interval" ini:"keep_alive_interval" yaml:"keep_alive_interval"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Etcd ¶
type Etcd struct {
Endpoints []string `json:"endpoints" mapstructure:"endpoints" ini:"endpoints" yaml:"endpoints"`
DialTimeout time.Duration `json:"dial_timeout" mapstructure:"dial_timeout" ini:"dial_timeout" yaml:"dial_timeout"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
AutoSync bool `json:"auto_sync" mapstructure:"auto_sync" ini:"auto_sync" yaml:"auto_sync"`
AutoSyncInterval time.Duration `json:"auto_sync_interval" mapstructure:"auto_sync_interval" ini:"auto_sync_interval" yaml:"auto_sync_interval"`
KeepAliveTime time.Duration `json:"keepalive_time" mapstructure:"keepalive_time" ini:"keepalive_time" yaml:"keepalive_time"`
KeepAliveTimeout time.Duration `json:"keepalive_timeout" mapstructure:"keepalive_timeout" ini:"keepalive_timeout" yaml:"keepalive_timeout"`
MaxCallSendMsgSize int `` /* 126-byte string literal not displayed */
MaxCallRecvMsgSize int `` /* 126-byte string literal not displayed */
PermitWithoutStream bool `json:"permit_without_stream" mapstructure:"permit_without_stream" ini:"permit_without_stream" yaml:"permit_without_stream"`
RejectOldCluster bool `json:"reject_old_cluster" mapstructure:"reject_old_cluster" ini:"reject_old_cluster" yaml:"reject_old_cluster"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
Etcd 配置结构
type Feishu ¶
type Feishu struct {
AppID string `json:"app_id" mapstructure:"app_id" ini:"app_id" yaml:"app_id"`
AppSecret string `json:"app_secret" mapstructure:"app_secret" ini:"app_secret" yaml:"app_secret"`
AppType FeishuAppType `json:"app_type" mapstructure:"app_type" ini:"app_type" yaml:"app_type"`
DisableTokenCache bool `json:"disable_token_cache" mapstructure:"disable_token_cache" ini:"disable_token_cache" yaml:"disable_token_cache"`
RequestTimeout time.Duration `json:"request_timeout" mapstructure:"request_timeout" ini:"request_timeout" yaml:"request_timeout"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type FeishuAppType ¶
type FeishuAppType string
const ( FeishuAppTypeSelfBuilt FeishuAppType = "SelfBuilt" FeishuAppTypeMarketplace FeishuAppType = "Marketplace" )
type Grpc ¶
type Grpc struct {
Listen string `json:"listen" mapstructure:"listen" ini:"listen" yaml:"listen" default:"127.0.0.1"`
Port int `json:"port" mapstructure:"port" ini:"port" yaml:"port" default:"11500"`
MaxRecvMsgSize int `json:"max_recv_msg_size" mapstructure:"max_recv_msg_size" ini:"max_recv_msg_size" yaml:"max_recv_msg_size"`
MaxSendMsgSize int `json:"max_send_msg_size" mapstructure:"max_send_msg_size" ini:"max_send_msg_size" yaml:"max_send_msg_size"`
InitialWindowSize int32 `json:"initial_window_size" mapstructure:"initial_window_size" ini:"initial_window_size" yaml:"initial_window_size"`
InitialConnWindowSize int32 `` /* 134-byte string literal not displayed */
KeepaliveTime time.Duration `json:"keepalive_time" mapstructure:"keepalive_time" ini:"keepalive_time" yaml:"keepalive_time"`
KeepaliveTimeout time.Duration `json:"keepalive_timeout" mapstructure:"keepalive_timeout" ini:"keepalive_timeout" yaml:"keepalive_timeout"`
MaxConnectionIdle time.Duration `json:"max_connection_idle" mapstructure:"max_connection_idle" ini:"max_connection_idle" yaml:"max_connection_idle"`
MaxConnectionAge time.Duration `json:"max_connection_age" mapstructure:"max_connection_age" ini:"max_connection_age" yaml:"max_connection_age"`
MaxConnectionAgeGrace time.Duration `` /* 134-byte string literal not displayed */
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
ReflectionEnabled bool `json:"reflection_enabled" mapstructure:"reflection_enabled" ini:"reflection_enabled" yaml:"reflection_enabled"`
HealthCheckEnabled bool `json:"health_check_enabled" mapstructure:"health_check_enabled" ini:"health_check_enabled" yaml:"health_check_enabled"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type HTTPBodyLogMode ¶
type HTTPBodyLogMode string
HTTPBodyLogMode selects which finished requests get a captured HTTP body written to the log.
const ( // HTTPBodyLogModeAll writes the captured body for every request. HTTPBodyLogModeAll HTTPBodyLogMode = "all" // HTTPBodyLogModeError writes the captured body only for failed requests: // HTTP status >= 400, or a non-zero envelope code recorded by the // response helpers. HTTPBodyLogModeError HTTPBodyLogMode = "error" // HTTPBodyLogModeNone disables body logging for that side entirely. HTTPBodyLogModeNone HTTPBodyLogMode = "none" )
type HTTPBodyLogger ¶
type HTTPBodyLogger struct {
// Enabled enables the HTTP request and response body logging middleware.
// Default: false
Enabled bool `json:"enabled" ini:"enabled" yaml:"enabled" mapstructure:"enabled"`
// LogRequest selects which requests get their JSON body logged (all|error|none).
// Empty or unknown values fall back to the default.
// Default: all
LogRequest HTTPBodyLogMode `json:"log_request" ini:"log_request" yaml:"log_request" mapstructure:"log_request"`
// LogResponse selects which responses get their JSON body logged (all|error|none).
// Empty or unknown values fall back to the default.
// Default: error
LogResponse HTTPBodyLogMode `json:"log_response" ini:"log_response" yaml:"log_response" mapstructure:"log_response"`
// MaxBodySize limits how much request or response body data can be logged.
// Values are parsed with github.com/dustin/go-humanize, for example "64KB".
// Default: 64KB
MaxBodySize string `json:"max_body_size" ini:"max_body_size" yaml:"max_body_size" mapstructure:"max_body_size"`
// SkipRoutes lists routes whose bodies are never logged, for example login
// or other credential-carrying endpoints. A pattern ending in "*" matches
// the route by prefix; any other pattern must match the route exactly.
SkipRoutes []string `json:"skip_routes" ini:"skip_routes" yaml:"skip_routes" mapstructure:"skip_routes"`
}
HTTPBodyLogger represents HTTP body logging configuration.
type Influxdb ¶
type Influxdb struct {
Host string `json:"host" mapstructure:"host" ini:"host" yaml:"host"`
Port uint `json:"port" mapstructure:"port" ini:"port" yaml:"port"`
Token string `json:"token" mapstructure:"token" ini:"token" yaml:"token"`
Org string `json:"org" mapstructure:"org" ini:"org" yaml:"org"`
Bucket string `json:"bucket" mapstructure:"bucket" ini:"bucket" yaml:"bucket"`
// Write options
BatchSize uint `json:"batch_size" mapstructure:"batch_size" ini:"batch_size" yaml:"batch_size"`
FlushInterval time.Duration `json:"flush_interval" mapstructure:"flush_interval" ini:"flush_interval" yaml:"flush_interval"`
RetryInterval time.Duration `json:"retry_interval" mapstructure:"retry_interval" ini:"retry_interval" yaml:"retry_interval"`
MaxRetries uint `json:"max_retries" mapstructure:"max_retries" ini:"max_retries" yaml:"max_retries"`
RetryBufferLimit uint `json:"retry_buffer_limit" mapstructure:"retry_buffer_limit" ini:"retry_buffer_limit" yaml:"retry_buffer_limit"`
MaxRetryInterval time.Duration `json:"max_retry_interval" mapstructure:"max_retry_interval" ini:"max_retry_interval" yaml:"max_retry_interval"`
MaxRetryTime time.Duration `json:"max_retry_time" mapstructure:"max_retry_time" ini:"max_retry_time" yaml:"max_retry_time"`
ExponentialBase uint `json:"exponential_base" mapstructure:"exponential_base" ini:"exponential_base" yaml:"exponential_base"`
Precision time.Duration `json:"precision" mapstructure:"precision" ini:"precision" yaml:"precision"`
UseGZip bool `json:"use_gzip" mapstructure:"use_gzip" ini:"use_gzip" yaml:"use_gzip"`
// TLS configuration
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
// Advanced options
DefaultTags map[string]string `json:"default_tags" mapstructure:"default_tags" ini:"default_tags" yaml:"default_tags"`
AppName string `json:"app_name" mapstructure:"app_name" ini:"app_name" yaml:"app_name"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Kafka ¶
type Kafka struct {
Brokers []string `json:"brokers" mapstructure:"brokers" ini:"brokers" yaml:"brokers"`
ClientID string `json:"client_id" mapstructure:"client_id" ini:"client_id" yaml:"client_id"`
Version string `json:"version" mapstructure:"version" ini:"version" yaml:"version"`
SASL SASL `json:"sasl" mapstructure:"sasl" ini:"sasl" yaml:"sasl"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Producer Producer `json:"producer" mapstructure:"producer" ini:"producer" yaml:"producer"`
Consumer Consumer `json:"consumer" mapstructure:"consumer" ini:"consumer" yaml:"consumer"`
Timeout Timeout `json:"timeout" mapstructure:"timeout" ini:"timeout" yaml:"timeout"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Ldap ¶
type Ldap struct {
Host string `json:"host" mapstructure:"host" ini:"host" yaml:"host"`
Port int `json:"port" mapstructure:"port" ini:"port" yaml:"port"`
BaseDN string `json:"base_dn" mapstructure:"base_dn" ini:"base_dn" yaml:"base_dn"`
BindDN string `json:"bind_dn" mapstructure:"bind_dn" ini:"bind_dn" yaml:"bind_dn"`
BindPassword string `json:"bind_password" mapstructure:"bind_password" ini:"bind_password" yaml:"bind_password"`
Attributes []string `json:"attributes" mapstructure:"attributes" ini:"attributes" yaml:"attributes"`
Filter string `json:"filter" mapstructure:"filter" ini:"filter" yaml:"filter"`
GroupFilter string `json:"group_filter" mapstructure:"group_filter" ini:"group_filter" yaml:"group_filter"`
UserFilter string `json:"user_filter" mapstructure:"user_filter" ini:"user_filter" yaml:"user_filter"`
GroupDN string `json:"group_dn" mapstructure:"group_dn" ini:"group_dn" yaml:"group_dn"`
UserDN string `json:"user_dn" mapstructure:"user_dn" ini:"user_dn" yaml:"user_dn"`
GroupAttribute string `json:"group_attribute" mapstructure:"group_attribute" ini:"group_attribute" yaml:"group_attribute"`
UserAttribute string `json:"user_attribute" mapstructure:"user_attribute" ini:"user_attribute" yaml:"user_attribute"`
Scope int `json:"scope" mapstructure:"scope" ini:"scope" yaml:"scope"`
RequestTimeout time.Duration `json:"request_timeout" mapstructure:"request_timeout" ini:"request_timeout" yaml:"request_timeout"`
ConnTimeout time.Duration `json:"conn_timeout" mapstructure:"conn_timeout" ini:"conn_timeout" yaml:"conn_timeout"`
Referrals bool `json:"referrals" mapstructure:"referrals" ini:"referrals" yaml:"referrals"`
Deref int `json:"deref" mapstructure:"deref" ini:"deref" yaml:"deref"`
PageSize int `json:"page_size" mapstructure:"page_size" ini:"page_size" yaml:"page_size"`
Heartbeat time.Duration `json:"heartbeat" mapstructure:"heartbeat" ini:"heartbeat" yaml:"heartbeat"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Logger ¶
type Logger struct {
// Dir specifies which direcotory log to.
Dir string `json:"dir" ini:"dir" yaml:"dir" mapstructure:"dir"`
// Prefix specifies the log prefix.
// You can set the prefix name to your project name.
Prefix string `json:"prefix" ini:"prefix" yaml:"prefix" mapstructure:"prefix"`
// File specifies the which file log to.
// If value is "/dev/stdout", log to os.Stdout.
// If value is "/dev/stderr", log to os.Stderr.
// If value is empty(length is zero), log to os.Stdout.
File string `json:"file" ini:"file" yaml:"file" mapstructure:"file"`
// Console additionally mirrors the global logger's output to os.Stdout
// when File is set to a real file path. It has no effect when File is
// empty or one of "/dev/stdout"/"/dev/stderr", since those already log
// to console. Only the global logger built by Init() reads this field;
// subsystem loggers stay file-only unless the caller opts in explicitly
// via zap.Option.Console.
// Default: true
Console bool `json:"console" ini:"console" yaml:"console" mapstructure:"console"`
// Level specifies the log level, supported values are: (error|warn|warning|info|debug).
// The value default to "info" and ignore case.
Level string `json:"level" ini:"level" yaml:"level" mapstructure:"level"`
// Format specifies the log format, supported values are: (json|text).
// The Value default to "text" and ignore case.
Format string `json:"format" ini:"format" yaml:"format" mapstructure:"format"`
// Encoder is the same as LogFormat.
Encoder string `json:"encoder" ini:"encoder" yaml:"encoder" mapstructure:"encoder"`
// ErrorStackDisabled disables attaching the error_stack field to
// error-level logs when a logged error carries a stack trace embedded at
// its creation point. Stack traces are attached by default; set this to
// true in environments where the extra payload is unwanted, such as local
// development.
// Default: false
ErrorStackDisabled bool `json:"error_stack_disabled" ini:"error_stack_disabled" yaml:"error_stack_disabled" mapstructure:"error_stack_disabled"`
// MaxAge is the maximum number of days to retain old log files based on the
// timestamp encoded in their filename.
// uint is "day" and default to 7.
MaxAge int `json:"max_age" ini:"max_age" yaml:"max_age" mapstructure:"max_age"`
// MaxSize is the maximum size in megabytes of the log file before it gets
// rotated, default to 1MB.
MaxSize int `json:"max_size" ini:"max_size" yaml:"max_size" mapstructure:"max_size"`
// MaxBackups is the maximum number of old log files to retain.
// The value default to 3.
MaxBackups int `json:"max_backups" ini:"max_backups" yaml:"max_backups" mapstructure:"max_backups"`
// HTTPBody contains HTTP request and response body logging configurations.
HTTPBody HTTPBodyLogger `json:"http_body" ini:"http_body" yaml:"http_body" mapstructure:"http_body"`
}
Logger represents section "logger" for client-side or server-side configuration, and there is only one copy during the application entire lifetime.
type Memcached ¶
type Memcached struct {
Servers []string `json:"servers" mapstructure:"servers" ini:"servers" yaml:"servers"`
MaxIdleConns int `json:"max_idle_conns" mapstructure:"max_idle_conns" ini:"max_idle_conns" yaml:"max_idle_conns"`
Timeout time.Duration `json:"timeout" mapstructure:"timeout" ini:"timeout" yaml:"timeout"`
MaxCacheSize int `json:"max_cache_size" mapstructure:"max_cache_size" ini:"max_cache_size" yaml:"max_cache_size"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Middleware ¶
type Middleware struct {
JWTAuthEnabled bool `json:"jwt_auth_enabled" mapstructure:"jwt_auth_enabled" ini:"jwt_auth_enabled" yaml:"jwt_auth_enabled"`
AuthzEnabled bool `json:"authz_enabled" mapstructure:"authz_enabled" ini:"authz_enabled" yaml:"authz_enabled"`
IAMSessionEnabled bool `json:"iam_session_enabled" mapstructure:"iam_session_enabled" ini:"iam_session_enabled" yaml:"iam_session_enabled"`
}
type Minio ¶
type Minio struct {
Endpoint string `json:"endpoint" mapstructure:"endpoint" ini:"endpoint" yaml:"endpoint"`
AccessKey string `json:"access_key" mapstructure:"access_key" ini:"access_key" yaml:"access_key"`
SecretKey string `json:"secret_key" mapstructure:"secret_key" ini:"secret_key" yaml:"secret_key"`
Bucket string `json:"bucket" mapstructure:"bucket" ini:"bucket" yaml:"bucket"`
Location string `json:"location" mapstructure:"location" ini:"location" yaml:"location"`
Secure bool `json:"secure" mapstructure:"secure" ini:"secure" yaml:"secure"`
Region string `json:"region" mapstructure:"region" ini:"region" yaml:"region"`
Timeout time.Duration `json:"timeout" mapstructure:"timeout" ini:"timeout" yaml:"timeout"`
PartSize int64 `json:"part_size" mapstructure:"part_size" ini:"part_size" yaml:"part_size"`
Concurrency int `json:"concurrency" mapstructure:"concurrency" ini:"concurrency" yaml:"concurrency"`
Compress bool `json:"compress" mapstructure:"compress" ini:"compress" yaml:"compress"`
Trace bool `json:"trace" mapstructure:"trace" ini:"trace" yaml:"trace"`
SessionToken string `json:"session_token" mapstructure:"session_token" ini:"session_token" yaml:"session_token"`
UseIAM bool `json:"use_iam" mapstructure:"use_iam" ini:"use_iam" yaml:"use_iam"`
UseSTS bool `json:"use_sts" mapstructure:"use_sts" ini:"use_sts" yaml:"use_sts"`
IAMEndpoint string `json:"iam_endpoint" mapstructure:"iam_endpoint" ini:"iam_endpoint" yaml:"iam_endpoint"`
STSEndpoint string `json:"sts_endpoint" mapstructure:"sts_endpoint" ini:"sts_endpoint" yaml:"sts_endpoint"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Mongo ¶
type Mongo struct {
Host string `json:"host" mapstructure:"host" ini:"host" yaml:"host"`
Port int `json:"port" mapstructure:"port" ini:"port" yaml:"port"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
Database string `json:"database" mapstructure:"database" ini:"database" yaml:"database"`
AuthSource string `json:"auth_source" mapstructure:"auth_source" ini:"auth_source" yaml:"auth_source"`
MaxPoolSize uint64 `json:"max_pool_size" mapstructure:"max_pool_size" ini:"max_pool_size" yaml:"max_pool_size"`
MinPoolSize uint64 `json:"min_pool_size" mapstructure:"min_pool_size" ini:"min_pool_size" yaml:"min_pool_size"`
ConnectTimeout time.Duration `json:"connect_timeout" mapstructure:"connect_timeout" ini:"connect_timeout" yaml:"connect_timeout"`
ServerSelectionTimeout time.Duration `` /* 134-byte string literal not displayed */
MaxConnIdleTime time.Duration `json:"max_conn_idle_time" mapstructure:"max_conn_idle_time" ini:"max_conn_idle_time" yaml:"max_conn_idle_time"`
MaxConnecting uint64 `json:"max_connecting" mapstructure:"max_connecting" ini:"max_connecting" yaml:"max_connecting"`
ReadConcern ReadConcern `json:"read_concern" mapstructure:"read_concern" ini:"read_concern" yaml:"read_concern"`
WriteConcern WriteConcern `json:"write_concern" mapstructure:"write_concern" ini:"write_concern" yaml:"write_concern"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Mqtt ¶
type Mqtt struct {
Addr string `json:"addr" mapstructure:"addr" ini:"addr" yaml:"addr"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
ClientPrefix string `json:"client_prefix" mapstructure:"client_prefix" ini:"client_prefix" yaml:"client_prefix"`
ConnectTimeout time.Duration `json:"connect_timeout" mapstructure:"connect_timeout" ini:"connect_timeout" yaml:"connect_timeout"`
Keepalive time.Duration `json:"keepalive" mapstructure:"keepalive" ini:"keepalive" yaml:"keepalive"`
CleanSession bool `json:"clean_session" mapstructure:"clean_session" ini:"clean_session" yaml:"clean_session"`
AutoReconnect bool `json:"auto_reconnect" mapstructure:"auto_reconnect" ini:"auto_reconnect" yaml:"auto_reconnect"`
UseTLS bool `json:"use_tls" mapstructure:"use_tls" ini:"use_tls" yaml:"use_tls"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type MySQL ¶
type MySQL struct {
Host string `json:"host" mapstructure:"host" ini:"host" yaml:"host"`
Port uint `json:"port" mapstructure:"port" ini:"port" yaml:"port"`
Database string `json:"database" mapstructure:"database" ini:"database" yaml:"database"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
Charset string `json:"charset" mapstructure:"charset" ini:"charset" yaml:"charset"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Nats ¶
type Nats struct {
Addrs []string `json:"addrs" mapstructure:"addrs" ini:"addrs" yaml:"addrs"`
ClientName string `json:"client_name" mapstructure:"client_name" ini:"client_name" yaml:"client_name"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
Token string `json:"token" mapstructure:"token" ini:"token" yaml:"token"`
CredentialsFile string `json:"credentials_file" mapstructure:"credentials_file" ini:"credentials_file" yaml:"credentials_file"`
NKeyFile string `json:"nkey_file" mapstructure:"nkey_file" ini:"nkey_file" yaml:"nkey_file"`
MaxReconnects int `json:"max_reconnects" mapstructure:"max_reconnects" ini:"max_reconnects" yaml:"max_reconnects"`
ReconnectWait time.Duration `json:"reconnect_wait" mapstructure:"reconnect_wait" ini:"reconnect_wait" yaml:"reconnect_wait"`
ReconnectJitter time.Duration `json:"reconnect_jitter" mapstructure:"reconnect_jitter" ini:"reconnect_jitter" yaml:"reconnect_jitter"`
ReconnectJitterTLS time.Duration `json:"reconnect_jitter_tls" mapstructure:"reconnect_jitter_tls" ini:"reconnect_jitter_tls" yaml:"reconnect_jitter_tls"`
ConnectTimeout time.Duration `json:"connect_timeout" mapstructure:"connect_timeout" ini:"connect_timeout" yaml:"connect_timeout"`
PingInterval time.Duration `json:"ping_interval" mapstructure:"ping_interval" ini:"ping_interval" yaml:"ping_interval"`
MaxPingsOutstanding int `json:"max_pings_outstanding" mapstructure:"max_pings_outstanding" ini:"max_pings_outstanding" yaml:"max_pings_outstanding"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type OTEL ¶
type OTEL struct {
// Enabled controls whether OpenTelemetry tracing is enabled.
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
// ServiceName is the OpenTelemetry service.name resource attribute.
ServiceName string `json:"service_name" mapstructure:"service_name" ini:"service_name" yaml:"service_name"`
// ExporterOTLPProtocol selects the OTLP transport protocol: grpc or http/protobuf.
ExporterOTLPProtocol OTLPProtocol `` /* 126-byte string literal not displayed */
// ExporterOTLPTracesEndpoint is the trace-specific OTLP endpoint URL.
ExporterOTLPTracesEndpoint string `` /* 154-byte string literal not displayed */
// ExporterOTLPHeaders are key-value headers sent with OTLP requests.
ExporterOTLPHeaders map[string]string `json:"exporter_otlp_headers" mapstructure:"exporter_otlp_headers" ini:"exporter_otlp_headers" yaml:"exporter_otlp_headers"`
// ExporterOTLPCompression controls OTLP payload compression: none or gzip.
ExporterOTLPCompression OTLPCompression `` /* 138-byte string literal not displayed */
// TracesSampler selects the OpenTelemetry trace sampler.
TracesSampler TracesSampler `json:"traces_sampler" mapstructure:"traces_sampler" ini:"traces_sampler" yaml:"traces_sampler"`
// TracesSamplerArg configures samplers that need an argument, such as traceidratio.
TracesSamplerArg string `json:"traces_sampler_arg" mapstructure:"traces_sampler_arg" ini:"traces_sampler_arg" yaml:"traces_sampler_arg"`
// LogSpans controls whether spans are also written to the OTEL logger.
LogSpans bool `json:"log_spans" mapstructure:"log_spans" ini:"log_spans" yaml:"log_spans"`
// MaxTagValueLen is the maximum length of tag values added through helpers.
MaxTagValueLen int `json:"max_tag_value_len" mapstructure:"max_tag_value_len" ini:"max_tag_value_len" yaml:"max_tag_value_len"`
// BSPMaxQueueSize is the BatchSpanProcessor queue capacity.
BSPMaxQueueSize int `json:"bsp_max_queue_size" mapstructure:"bsp_max_queue_size" ini:"bsp_max_queue_size" yaml:"bsp_max_queue_size"`
// BSPMaxExportBatchSize is the maximum number of spans exported in one batch.
BSPMaxExportBatchSize int `` /* 138-byte string literal not displayed */
// BSPScheduleDelay is the maximum delay between two consecutive exports.
BSPScheduleDelay time.Duration `json:"bsp_schedule_delay" mapstructure:"bsp_schedule_delay" ini:"bsp_schedule_delay" yaml:"bsp_schedule_delay"`
// BSPExportTimeout is the maximum duration allowed for one export attempt.
BSPExportTimeout time.Duration `json:"bsp_export_timeout" mapstructure:"bsp_export_timeout" ini:"bsp_export_timeout" yaml:"bsp_export_timeout"`
}
OTEL represents OpenTelemetry tracing configuration using OTLP exporters. This configuration supports sending traces to Jaeger, Uptrace, or other OTLP-compatible backends.
type OTLPCompression ¶
type OTLPCompression string
OTLPCompression is the compression mode used by OTLP trace exporters.
const ( // OTLPCompressionNone sends OTLP trace payloads without compression. OTLPCompressionNone OTLPCompression = "none" // OTLPCompressionGzip compresses OTLP trace payloads with gzip. OTLPCompressionGzip OTLPCompression = "gzip" )
type OTLPProtocol ¶
type OTLPProtocol string
OTLPProtocol is the transport protocol used by OTLP trace exporters.
const ( // OTLPProtocolGRPC exports traces with OTLP over gRPC. OTLPProtocolGRPC OTLPProtocol = "grpc" // OTLPProtocolHTTPProtobuf exports traces with OTLP over HTTP using protobuf payloads. OTLPProtocolHTTPProtobuf OTLPProtocol = "http/protobuf" )
type Postgres ¶
type Postgres struct {
Host string `json:"host" mapstructure:"host" ini:"host" yaml:"host"`
Port uint `json:"port" mapstructure:"port" ini:"port" yaml:"port"`
Database string `json:"database" mapstructure:"database" ini:"database" yaml:"database"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
SSLMode string `json:"sslmode" mapstructure:"sslmode" ini:"sslmode" yaml:"sslmode"`
TimeZone string `json:"timezone" mapstructure:"timezone" ini:"timezone" yaml:"timezone"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Producer ¶
type Producer struct {
RequiredAcks int `json:"required_acks" mapstructure:"required_acks" ini:"required_acks" yaml:"required_acks"`
Retries int `json:"retries" mapstructure:"retries" ini:"retries" yaml:"retries"`
Compression string `json:"compression" mapstructure:"compression" ini:"compression" yaml:"compression"`
MaxMessageBytes int `json:"max_message_bytes" mapstructure:"max_message_bytes" ini:"max_message_bytes" yaml:"max_message_bytes"`
}
Producer defines Kafka producer specific configuration
type ReadConcern ¶
type ReadConcern string
const ( ReadConcernLocal ReadConcern = "local" ReadConcernMajority ReadConcern = "majority" ReadConcernAvailable ReadConcern = "available" ReadConcernLinearizable ReadConcern = "linearizable" ReadConcernSnapshot ReadConcern = "snapshot" )
type ReconnectPolicy ¶
type ReconnectPolicy string
const ( ReconnectPolicyConstant ReconnectPolicy = "constant" ReconnectPolicyExponential ReconnectPolicy = "exponential" )
type Redis ¶
type Redis struct {
Addr string `json:"addr" mapstructure:"addr" ini:"addr" yaml:"addr"`
Addrs []string `json:"addrs" mapstructure:"addrs" ini:"addrs" yaml:"addrs"`
DB int `json:"db" mapstructure:"db" ini:"db" yaml:"db"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
Namespace string `json:"namespace" mapstructure:"namespace" ini:"namespace" yaml:"namespace"`
PoolSize int `json:"pool_size" mapstructure:"pool_size" ini:"pool_size" yaml:"pool_size"`
Expiration time.Duration `json:"expiration" mapstructure:"expiration" ini:"expiration" yaml:"expiration"`
ClusterMode bool `json:"cluster_mode" mapstructure:"cluster_mode" ini:"cluster_mode" yaml:"cluster_mode"`
DialTimeout time.Duration `json:"dial_timeout" mapstructure:"dial_timeout" ini:"dial_timeout" yaml:"dial_timeout"`
ReadTimeout time.Duration `json:"read_timeout" mapstructure:"read_timeout" ini:"read_timeout" yaml:"read_timeout"`
WriteTimeout time.Duration `json:"write_timeout" mapstructure:"write_timeout" ini:"write_timeout" yaml:"write_timeout"`
MinIdleConns int `json:"min_idle_conns" mapstructure:"min_idle_conns" ini:"min_idle_conns" yaml:"min_idle_conns"`
MaxRetries int `json:"max_retries" mapstructure:"max_retries" ini:"max_retries" yaml:"max_retries"`
MinRetryBackoff time.Duration `json:"min_retry_backoff" mapstructure:"min_retry_backoff" ini:"min_retry_backoff" yaml:"min_retry_backoff"`
MaxRetryBackoff time.Duration `json:"max_retry_backoff" mapstructure:"max_retry_backoff" ini:"max_retry_backoff" yaml:"max_retry_backoff"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type RethinkDB ¶
type RethinkDB struct {
Hosts []string `json:"hosts" mapstructure:"hosts" ini:"hosts" yaml:"hosts"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
Database string `json:"database" mapstructure:"database" ini:"database" yaml:"database"`
DiscoveryHost bool `json:"discovery_host" mapstructure:"discovery_host" ini:"discovery_host" yaml:"discovery_host"`
MaxIdle int `json:"max_idle" mapstructure:"max_idle" ini:"max_idle" yaml:"max_idle"`
MaxOpen int `json:"max_open" mapstructure:"max_open" ini:"max_open" yaml:"max_open"`
NumRetries int `json:"num_retries" mapstructure:"num_retries" ini:"num_retries" yaml:"num_retries"`
ConnectTimeout time.Duration `json:"connect_timeout" mapstructure:"connect_timeout" ini:"connect_timeout" yaml:"connect_timeout"`
ReadTimeout time.Duration `json:"read_timeout" mapstructure:"read_timeout" ini:"read_timeout" yaml:"read_timeout"`
WriteTimeout time.Duration `json:"write_timeout" mapstructure:"write_timeout" ini:"write_timeout" yaml:"write_timeout"`
KeepAliveTime time.Duration `json:"keep_alive_time" mapstructure:"keep_alive_time" ini:"keep_alive_time" yaml:"keep_alive_time"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type RetryPolicy ¶
type RetryPolicy string
const ( RetryPolicySimple RetryPolicy = "simple" RetryPolicyDowngradingConsistency RetryPolicy = "downgrading_consistency" RetryPolicyExponentialBackoff RetryPolicy = "exponential_backoff" )
type RocketMQ ¶
type RocketMQ struct {
NameServerAddrs []string `json:"name_server_addrs" mapstructure:"name_server_addrs" ini:"name_server_addrs" yaml:"name_server_addrs"`
AccessKey string `json:"access_key" mapstructure:"access_key" ini:"access_key" yaml:"access_key"`
SecretKey string `json:"secret_key" mapstructure:"secret_key" ini:"secret_key" yaml:"secret_key"`
Namespace string `json:"namespace" mapstructure:"namespace" ini:"namespace" yaml:"namespace"`
GroupName string `json:"group_name" mapstructure:"group_name" ini:"group_name" yaml:"group_name"`
InstanceName string `json:"instance_name" mapstructure:"instance_name" ini:"instance_name" yaml:"instance_name"`
NumRetries int `json:"num_retries" mapstructure:"num_retries" ini:"num_retries" yaml:"num_retries"`
SendMsgTimeout time.Duration `json:"send_msg_timeout" mapstructure:"send_msg_timeout" ini:"send_msg_timeout" yaml:"send_msg_timeout"`
VipChannelEnabled bool `json:"vip_channel_enabled" mapstructure:"vip_channel_enabled" ini:"vip_channel_enabled" yaml:"vip_channel_enabled"`
ConsumeOrderly bool `json:"consume_orderly" mapstructure:"consume_orderly" ini:"consume_orderly" yaml:"consume_orderly"`
MaxReconsumeTime int32 `json:"max_reconsume_times" mapstructure:"max_reconsume_times" ini:"max_reconsume_times" yaml:"max_reconsume_times"`
AutoCommit bool `json:"auto_commit" mapstructure:"auto_commit" ini:"auto_commit" yaml:"auto_commit"`
ConsumeConcurrentlyMaxSpan int `` /* 154-byte string literal not displayed */
ConsumeMessageBatchMaxSize int `` /* 158-byte string literal not displayed */
ConsumeFromWhere ConsumeFromWhere `json:"consume_from_where" mapstructure:"consume_from_where" ini:"consume_from_where" yaml:"consume_from_where"`
ConsumeTimestamp string `json:"consume_timestamp" mapstructure:"consume_timestamp" ini:"consume_timestamp" yaml:"consume_timestamp"`
TraceEnabled bool `json:"trace_enabled" mapstructure:"trace_enabled" ini:"trace_enabled" yaml:"trace_enabled"`
CredentialsFile string `json:"credentials_file" mapstructure:"credentials_file" ini:"credentials_file" yaml:"credentials_file"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type S3 ¶
type S3 struct {
Endpoint string `json:"endpoint" mapstructure:"endpoint" ini:"endpoint" yaml:"endpoint"`
Region string `json:"region" mapstructure:"region" ini:"region" yaml:"region"`
AccessKeyID string `json:"access_key_id" mapstructure:"access_key_id" ini:"access_key_id" yaml:"access_key_id"`
SecretAccessKey string `json:"secret_access_key" mapstructure:"secret_access_key" ini:"secret_access_key" yaml:"secret_access_key"`
Bucket string `json:"bucket" mapstructure:"bucket" ini:"bucket" yaml:"bucket"`
UseSsl bool `json:"use_ssl" mapstructure:"use_ssl" ini:"use_ssl" yaml:"use_ssl"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type SASL ¶
type SASL struct {
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
Mechanism string `json:"mechanism" mapstructure:"mechanism" ini:"mechanism" yaml:"mechanism"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
}
SASL defines SASL authentication parameters
type SQLServer ¶
type SQLServer struct {
Host string `json:"host" mapstructure:"host" ini:"host" yaml:"host"`
Port uint `json:"port" mapstructure:"port" ini:"port" yaml:"port"`
Database string `json:"database" mapstructure:"database" ini:"database" yaml:"database"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
Encrypt bool `json:"encrypt" mapstructure:"encrypt" ini:"encrypt" yaml:"encrypt"`
TrustServer bool `json:"trust_server" mapstructure:"trust_server" ini:"trust_server" yaml:"trust_server"`
AppName string `json:"app_name" mapstructure:"app_name" ini:"app_name" yaml:"app_name"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Scylla ¶
type Scylla struct {
Hosts []string `json:"hosts" mapstructure:"hosts" ini:"hosts" yaml:"hosts"`
Username string `json:"username" mapstructure:"username" ini:"username" yaml:"username"`
Password string `json:"password" mapstructure:"password" ini:"password" yaml:"password"`
Keyspace string `json:"keyspace" mapstructure:"keyspace" ini:"keyspace" yaml:"keyspace"`
Consistency Consistency `json:"consistency" mapstructure:"consistency" ini:"consistency" yaml:"consistency"`
NumConns int `json:"num_conns" mapstructure:"num_conns" ini:"num_conns" yaml:"num_conns"`
ConnectTimeout time.Duration `json:"connect_timeout" mapstructure:"connect_timeout" ini:"connect_timeout" yaml:"connect_timeout"`
Timeout time.Duration `json:"timeout" mapstructure:"timeout" ini:"timeout" yaml:"timeout"`
PageSize int `json:"page_size" mapstructure:"page_size" ini:"page_size" yaml:"page_size"`
RetryPolicy RetryPolicy `json:"retry_policy" mapstructure:"retry_policy" ini:"retry_policy" yaml:"retry_policy"`
RetryNumRetries int `json:"retry_num_retries" mapstructure:"retry_num_retries" ini:"retry_num_retries" yaml:"retry_num_retries"`
RetryMinInterval time.Duration `json:"retry_min_interval" mapstructure:"retry_min_interval" ini:"retry_min_interval" yaml:"retry_min_interval"`
RetryMaxInterval time.Duration `json:"retry_max_interval" mapstructure:"retry_max_interval" ini:"retry_max_interval" yaml:"retry_max_interval"`
ReconnectPolicy ReconnectPolicy `json:"reconnect_policy" mapstructure:"reconnect_policy" ini:"reconnect_policy" yaml:"reconnect_policy"`
ReconnectMaxRetries int `json:"reconnect_max_retries" mapstructure:"reconnect_max_retries" ini:"reconnect_max_retries" yaml:"reconnect_max_retries"`
ReconnectInitialInterval time.Duration `` /* 142-byte string literal not displayed */
ReconnectMaxInterval time.Duration `` /* 126-byte string literal not displayed */
ReconnectConstantInterval time.Duration `` /* 146-byte string literal not displayed */
TracingEnabled bool `json:"tracing_enabled" mapstructure:"tracing_enabled" ini:"tracing_enabled" yaml:"tracing_enabled"`
TLSEnabled bool `json:"tls_enabled" mapstructure:"tls_enabled" ini:"tls_enabled" yaml:"tls_enabled"`
CertFile string `json:"cert_file" mapstructure:"cert_file" ini:"cert_file" yaml:"cert_file"`
KeyFile string `json:"key_file" mapstructure:"key_file" ini:"key_file" yaml:"key_file"`
CAFile string `json:"ca_file" mapstructure:"ca_file" ini:"ca_file" yaml:"ca_file"`
InsecureSkipVerify bool `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify" ini:"insecure_skip_verify" yaml:"insecure_skip_verify"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Server ¶
type Server struct {
Mode Mode `json:"mode" mapstructure:"mode" ini:"mode" yaml:"mode"`
Listen string `json:"listen" mapstructure:"listen" ini:"listen" yaml:"listen"`
Port int `json:"port" mapstructure:"port" ini:"port" yaml:"port"`
Domain string `json:"domain" mapstructure:"domain" ini:"domain" yaml:"domain"`
ReadTimeout time.Duration `json:"read_timeout" mapstructure:"read_timeout" ini:"read_timeout" yaml:"read_timeout"`
WriteTimeout time.Duration `json:"write_timeout" mapstructure:"write_timeout" ini:"write_timeout" yaml:"write_timeout"`
IdleTimeout time.Duration `json:"idle_timeout" mapstructure:"idle_timeout" ini:"idle_timeout" yaml:"idle_timeout"`
// Circuit breaker
CircuitBreaker CircuitBreaker `json:"circuit_breaker" mapstructure:"circuit_breaker" ini:"circuit_breaker" yaml:"circuit_breaker"`
// Circular buffer
CircularBuffer CircularBuffer `json:"circular_buffer" mapstructure:"circular_buffer" ini:"circular_buffer" yaml:"circular_buffer"`
}
type Sqlite ¶
type Sqlite struct {
Path string `json:"path" mapstructure:"path" ini:"path" yaml:"path"`
Database string `json:"database" mapstructure:"database" ini:"database" yaml:"database"`
IsMemory bool `json:"is_memory" mapstructure:"is_memory" ini:"is_memory" yaml:"is_memory"`
Enabled bool `json:"enabled" mapstructure:"enabled" ini:"enabled" yaml:"enabled"`
}
type Timeout ¶
type Timeout struct {
Dial time.Duration `json:"dial" mapstructure:"dial" ini:"dial" yaml:"dial"`
Read time.Duration `json:"read" mapstructure:"read" ini:"read" yaml:"read"`
Write time.Duration `json:"write" mapstructure:"write" ini:"write" yaml:"write"`
}
Timeout defines connection timeouts
type TracesSampler ¶
type TracesSampler string
TracesSampler is the OpenTelemetry sampler name used for traces.
const ( // TracesSamplerAlwaysOn samples every trace. TracesSamplerAlwaysOn TracesSampler = "always_on" // TracesSamplerAlwaysOff drops every trace. TracesSamplerAlwaysOff TracesSampler = "always_off" // TracesSamplerTraceIDRatio samples root traces by trace ID ratio. TracesSamplerTraceIDRatio TracesSampler = "traceidratio" // TracesSamplerParentBasedAlwaysOn samples roots and honors upstream parent decisions. TracesSamplerParentBasedAlwaysOn TracesSampler = "parentbased_always_on" // TracesSamplerParentBasedAlwaysOff drops roots and honors upstream parent decisions. TracesSamplerParentBasedAlwaysOff TracesSampler = "parentbased_always_off" // TracesSamplerParentBasedTraceIDRatio samples roots by ratio and honors upstream parent decisions. TracesSamplerParentBasedTraceIDRatio TracesSampler = "parentbased_traceidratio" )
type WriteConcern ¶
type WriteConcern string
const ( WriteConcernMajority WriteConcern = "majority" WriteConcernJournaled WriteConcern = "journaled" WriteConcernW0 WriteConcern = "0" WriteConcernW1 WriteConcern = "1" WriteConcernW2 WriteConcern = "2" WriteConcernW3 WriteConcern = "3" WriteConcernW4 WriteConcern = "4" WriteConcernW5 WriteConcern = "5" WriteConcernW6 WriteConcern = "6" WriteConcernW7 WriteConcern = "7" WriteConcernW8 WriteConcern = "8" WriteConcernW9 WriteConcern = "9" )
Source Files
¶
- app.go
- audit.go
- auth.go
- cache.go
- cassandra.go
- clickhouse.go
- config.go
- database.go
- debug.go
- elasticsearch.go
- etcd.go
- feishu.go
- grpc.go
- influxdb.go
- kafka.go
- ldap.go
- logger.go
- memcached.go
- middleware.go
- minio.go
- mongo.go
- mqtt.go
- mysql.go
- nats.go
- otel.go
- postgres.go
- redis.go
- rethinkdb.go
- rocketmq.go
- s3.go
- scylla.go
- server.go
- sqlite.go
- sqlserver.go