fmt: apply gofmt to Go source files
Alignment of struct literal field values in config.go and domain/types.go.
This commit is contained in:
@@ -24,18 +24,18 @@ type Config struct {
|
|||||||
|
|
||||||
func Load() (*Config, error) {
|
func Load() (*Config, error) {
|
||||||
cfg := &Config{
|
cfg := &Config{
|
||||||
Port: getEnvInt("PORT", 3001),
|
Port: getEnvInt("PORT", 3001),
|
||||||
APIBasePath: getEnv("API_BASE_PATH", "/v1"),
|
APIBasePath: getEnv("API_BASE_PATH", "/v1"),
|
||||||
DatabaseURL: os.Getenv("DATABASE_URL"),
|
DatabaseURL: os.Getenv("DATABASE_URL"),
|
||||||
DBHost: getEnv("DB_HOST", "localhost"),
|
DBHost: getEnv("DB_HOST", "localhost"),
|
||||||
DBPort: getEnvInt("DB_PORT", 5432),
|
DBPort: getEnvInt("DB_PORT", 5432),
|
||||||
DBUser: os.Getenv("DB_USER"),
|
DBUser: os.Getenv("DB_USER"),
|
||||||
DBPassword: os.Getenv("DB_PASSWORD"),
|
DBPassword: os.Getenv("DB_PASSWORD"),
|
||||||
DBName: os.Getenv("DB_NAME"),
|
DBName: os.Getenv("DB_NAME"),
|
||||||
FirebaseProjectID: os.Getenv("FIREBASE_PROJECT_ID"),
|
FirebaseProjectID: os.Getenv("FIREBASE_PROJECT_ID"),
|
||||||
EthRPCURL: os.Getenv("ETH_RPC_URL"),
|
EthRPCURL: os.Getenv("ETH_RPC_URL"),
|
||||||
PollIntervalMS: getEnvInt("POLL_INTERVAL_MS", 60000),
|
PollIntervalMS: getEnvInt("POLL_INTERVAL_MS", 60000),
|
||||||
NodeEnv: getEnv("NODE_ENV", "development"),
|
NodeEnv: getEnv("NODE_ENV", "development"),
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.PollIntervalMS < 1000 {
|
if cfg.PollIntervalMS < 1000 {
|
||||||
|
|||||||
@@ -59,12 +59,12 @@ type AlertRule struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type AlertEvent struct {
|
type AlertEvent struct {
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
AlertRuleID int `json:"alert_rule_id"`
|
AlertRuleID int `json:"alert_rule_id"`
|
||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
AddressLabel *string `json:"address_label"`
|
AddressLabel *string `json:"address_label"`
|
||||||
TxHash *string `json:"tx_hash"`
|
TxHash *string `json:"tx_hash"`
|
||||||
Timestamp time.Time `json:"timestamp"`
|
Timestamp time.Time `json:"timestamp"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddressCheckpoint struct {
|
type AddressCheckpoint struct {
|
||||||
@@ -82,23 +82,23 @@ type CheckpointDetail struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type NotificationConfig struct {
|
type NotificationConfig struct {
|
||||||
UserID string `json:"user_id"`
|
UserID string `json:"user_id"`
|
||||||
DiscordWebhookURL *string `json:"discord_webhook_url"`
|
DiscordWebhookURL *string `json:"discord_webhook_url"`
|
||||||
TelegramChatID *string `json:"telegram_chat_id"`
|
TelegramChatID *string `json:"telegram_chat_id"`
|
||||||
TelegramBotToken *string `json:"telegram_bot_token,omitempty"`
|
TelegramBotToken *string `json:"telegram_bot_token,omitempty"`
|
||||||
Email *string `json:"email"`
|
Email *string `json:"email"`
|
||||||
NotificationEnabled bool `json:"notification_enabled"`
|
NotificationEnabled bool `json:"notification_enabled"`
|
||||||
CreatedAt *time.Time `json:"created_at,omitempty"`
|
CreatedAt *time.Time `json:"created_at,omitempty"`
|
||||||
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type NormalizedTx struct {
|
type NormalizedTx struct {
|
||||||
Hash string `json:"hash"`
|
Hash string `json:"hash"`
|
||||||
From string `json:"from"`
|
From string `json:"from"`
|
||||||
To *string `json:"to"`
|
To *string `json:"to"`
|
||||||
Value string `json:"value"` // Wei as string for precision
|
Value string `json:"value"` // Wei as string for precision
|
||||||
BlockNumber int `json:"block_number"`
|
BlockNumber int `json:"block_number"`
|
||||||
BlockTimestamp int64 `json:"block_timestamp"`
|
BlockTimestamp int64 `json:"block_timestamp"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Direction string
|
type Direction string
|
||||||
|
|||||||
Reference in New Issue
Block a user