Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Name string `mapstructure:"NAME"`
MODE string `mapstructure:"MODE"`
Version string `mapstructure:"VERSION"`
}
App -.
type Config ¶
type Config struct {
App App `mapstructure:"APP"`
HTTP HTTP `mapstructure:"HTTP"`
Log Log `mapstructure:"LOG"`
PG PG `mapstructure:"PG"`
Redis Redis `mapstructure:"REDIS"`
GRPC GRPC `mapstructure:"GRPC"`
RMQ RMQ `mapstructure:"RMQ"`
Kafka Kafka `mapstructure:"KAFKA"`
NATS NATS `mapstructure:"NATS"`
Metrics Metrics `mapstructure:"METRICS"`
Profiling Profiling `mapstructure:"PROFILING"`
Swagger Swagger `mapstructure:"SWAGGER"`
JWT JWT `mapstructure:"JWT"`
}
Config -.
type Control ¶
type Control struct {
ProducerEnabled bool `mapstructure:"PRODUCER_ENABLED"`
ConsumerEnabled bool `mapstructure:"CONSUMER_ENABLED"`
}
Control -.
type HTTP ¶
type HTTP struct {
Port string `mapstructure:"PORT"`
ReadTimeout time.Duration `mapstructure:"READ_TIMEOUT"`
WriteTimeout time.Duration `mapstructure:"WRITE_TIMEOUT"`
IdleTimeout time.Duration `mapstructure:"IDLE_TIMEOUT"`
ShutdownTimeout time.Duration `mapstructure:"SHUTDOWN_TIMEOUT"`
UsePreforkMode bool `mapstructure:"USE_PREFORK_MODE"`
ApiTimeout time.Duration `mapstructure:"API_TIMEOUT"`
}
HTTP -.
type InOutRequest ¶
type InOutRequest struct {
PrintRequest bool `mapstructure:"PRINT_REQUEST"`
PrintResponse bool `mapstructure:"PRINT_RESPONSE"`
}
IN/Out Request
type Kafka ¶
type Kafka struct {
Brokers []string `mapstructure:"BROKERS"`
GroupID string `mapstructure:"GROUP_ID"`
Topics Topics `mapstructure:"TOPICS"`
Control Control `mapstructure:"CONTROL"`
}
Kafka -.
type Log ¶
type Log struct {
Level string `mapstructure:"LEVEL"`
InCommingRequest InOutRequest `mapstructure:"IN_COMMING_REQUEST"`
OutCommingRequest InOutRequest `mapstructure:"OUT_COMMING_REQUEST"`
}
Log -.
type Metrics ¶
type Metrics struct {
Enabled bool `mapstructure:"ENABLED"`
// SetSkipPaths type array string,
// Declare string, handle split sep ";"
SetSkipPaths string `mapstructure:"SKIP_PATHS"`
// Path metrics, default /metrics
Path string `mapstructure:"PATH"`
}
Metrics -.
type NATS ¶
type NATS struct {
URL string `mapstructure:"URL"`
Timeout time.Duration `mapstructure:"TIMEOUT"`
Enable bool `mapstructure:"ENABLE"`
}
NATS -.
type PG ¶
type PG struct {
PoolMax int `mapstructure:"POOL_MAX"`
PoolMin int `mapstructure:"POOL_MIN"`
MaxConnLifetime time.Duration `mapstructure:"MAX_CONN_LIFETIME"`
MaxConnIdleTime time.Duration `mapstructure:"MAX_CONN_IDLE_TIME"`
HealthCheckPeriod time.Duration `mapstructure:"HEALTH_CHECK_PERIOD"`
URL string `mapstructure:"URL"`
}
PG -.
type Profiling ¶
type Profiling struct {
Enabled bool `mapstructure:"ENABLED"`
// Path for profiling endpoints, default /debug
Path string `mapstructure:"PATH"`
// CPU profiling duration in seconds
CPUProfileDuration int `mapstructure:"CPU_PROFILE_DURATION"`
// Memory profiling interval in seconds
MemoryProfileInterval int `mapstructure:"MEMORY_PROFILE_INTERVAL"`
}
Profiling -.
Click to show internal directories.
Click to hide internal directories.