Pārlūkot izejas kodu

Initial project structure

loic boulet 6 mēneši atpakaļ
revīzija
c1bf9e4800

+ 29 - 0
.gitignore

@@ -0,0 +1,29 @@
+# Binaries
+*.exe
+*.exe~
+*.dll
+*.so
+*.dylib
+
+# Test binary, built with 'go test -c'
+*.test
+
+# Output of the go coverage tool
+*.out
+
+# Dependency directories
+vendor/
+
+# IDE specific files
+.idea/
+.vscode/
+*.swp
+*.swo
+
+# Environment variables
+.env
+.env.local
+
+# Build output
+bin/
+dist/

+ 54 - 0
README.md

@@ -0,0 +1,54 @@
+# byom-design
+
+## Project Structure
+
+```
+.
+├── app
+│   ├── server.go
+│   └── middleware.go
+├── common
+│   ├── models.go
+│   ├── errors.go
+│   └── utils.go
+├── config
+│   ├── config.go
+│   └── validator.go
+├── database
+│   ├── client.go
+│   └── migrations
+├── design
+│   ├── handlers.go
+│   ├── service.go
+│   ├── repository.go
+│   ├── models.go
+│   └── interfaces.go
+├── docs
+├── internal
+│   └── cache
+├── logger
+├── pkg
+│   ├── apiclient
+│   └── validator
+└── main.go
+```
+
+## Getting Started
+
+1. Install dependencies:
+   ```bash
+   go mod download
+   ```
+
+2. Run the application:
+   ```bash
+   go run main.go
+   ```
+
+## Configuration
+
+Configuration is stored in `config.yaml`. 
+
+## Development
+
+...

+ 0 - 0
app/middleware.go


+ 0 - 0
app/server.go


+ 0 - 0
common/errors.go


+ 0 - 0
common/models.go


+ 0 - 0
common/utils.go


+ 35 - 0
config.yaml

@@ -0,0 +1,35 @@
+server:
+  host: "localhost"
+  port: 8080
+  environment: "development"
+  timeout: 30
+  tls:
+    enabled: false
+    cert_file: ""
+    key_file: ""
+
+database:
+  host: "localhost"
+  port: 5432
+  name: "myapp"
+  user: "postgres"
+  password: ""
+  ssl_mode: "disable"
+  max_connections: 10
+
+logger:
+  level: "debug"
+  format: "json"
+  output: "stdout"
+
+cache:
+  enabled: true
+  type: "memory"
+  ttl: 3600
+
+api:
+  timeout: 10
+  retry:
+    enabled: true
+    max_attempts: 3
+    delay: 1

+ 0 - 0
config/config.go


+ 0 - 0
config/validator.go


+ 0 - 0
database/client.go


+ 0 - 0
database/migrations/init.sql


+ 0 - 0
design/handlers.go


+ 0 - 0
design/interfaces.go


+ 0 - 0
design/models.go


+ 0 - 0
design/repository.go


+ 0 - 0
design/service.go


+ 0 - 0
docs/api.md


+ 3 - 0
go.mod

@@ -0,0 +1,3 @@
+module git.linuxforward.com/byom/byom-design
+
+go 1.23.0

+ 0 - 0
go.sum


+ 0 - 0
internal/cache/cache.go


+ 0 - 0
internal/cache/models.go


+ 0 - 0
logger/logger.go


+ 0 - 0
main.go


+ 0 - 0
pkg/apiclient/client.go


+ 0 - 0
pkg/apiclient/interfaces.go


+ 0 - 0
pkg/apiclient/models.go


+ 0 - 0
pkg/validator/validator.go