Documentation
¶
Index ¶
Constants ¶
View Source
const (
EnvFile = ".env" // Environment file name
)
Constants related to configuration
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App struct represents the main application
func InitializeApp ¶
InitializeApp initializes the application using the Wire framework
func NewApp ¶
func NewApp(cfg *Config, db *gorm.DB, e *echo.Echo, sqsConsumer *SQSConsumer, eventController *api.EventController) *App
NewApp creates and returns a new App instance
func (*App) SetupAndRun ¶
SetupAndRun sets up and runs the application
type Config ¶
type Config struct {
// Server configuration
ServerPort int `mapstructure:"SERVER_PORT" validate:"required"`
// Database configuration
DBDSN string `mapstructure:"DB_DSN" validate:"required"`
DBReplicaDSN string `mapstructure:"DB_REPLICA_DSN"`
// SQS configuration
SQSQueueURL string `mapstructure:"SQS_QUEUE_URL" validate:"required,url"`
SQSRegion string `mapstructure:"SQS_REGION" validate:"required"`
SQSMaxNumberOfMessages int32 `mapstructure:"SQS_MAX_NUMBER_OF_MESSAGES" validate:"required,min=1,max=10"`
SQSWaitTimeSeconds int32 `mapstructure:"SQS_WAIT_TIME_SECONDS" validate:"required,min=0,max=20"`
SQSVisibilityTimeout int32 `mapstructure:"SQS_VISIBILITY_TIMEOUT" validate:"required,min=0"`
// External service configuration
SlackWebhook string `mapstructure:"SLACK_WEBHOOK"`
}
Config struct defines the configuration items for the application
type SQSConsumer ¶
type SQSConsumer struct {
// contains filtered or unexported fields
}
SQSConsumer represents a consumer that consumes and processes messages from an AWS SQS queue
func NewSQSConsumer ¶
func NewSQSConsumer(cfg aws.Config, config *Config, eventUsecase domain.EventUsecase) *SQSConsumer
NewSQSConsumer creates a new SQSConsumer instance
Click to show internal directories.
Click to hide internal directories.