API vitrine : Stripe / subscription process
![]() |
1 week ago | |
---|---|---|
cmd | 1 week ago | |
internal | 1 week ago | |
.env.sample | 1 week ago | |
.gitignore | 1 month ago | |
Dockerfile | 1 week ago | |
README.md | 1 week ago | |
config.sample.yml | 1 month ago | |
docker-compose.yml | 1 week ago | |
go.mod | 1 month ago | |
go.sum | 1 month ago |
Gros nettoyage à faire.
Structure API incohérente avec le reste des projets
Mais fonctionnelle.
BYOM-Onboard est un service de provisionnement automatisé qui gère :
# Cloner le projet
git clone git@git.linuxforward.com:byom/byom-onboard.git
# Se placer dans le répertoire
cd byom-onboard
# Installer les dépendances
go mod download
Créer un fichier .env à la racine du projet :
SERVER_ADDRESS=:8080
DATABASE_URL=postgres://user:password@localhost:5432/byom_onboard
OVH_ENDPOINT=ovh-eu
OVH_APP_KEY=votre-app-key
OVH_APP_SECRET=votre-app-secret
STRIPE_KEY=votre-stripe-key
byom-onboard/
├── cmd/
│ └── server/ # Point d'entrée de l'application
├── internal/
│ ├── config/ # Configuration
│ ├── domain/ # Logique métier
│ ├── handlers/ # Gestionnaires HTTP
│ ├── middleware/ # Middleware HTTP
│ ├── repository/ # Accès aux données
│ └── services/ # Services métier
└── pkg/ # Packages publics réutilisables
# En développement
go run cmd/server/main.go
# En production
go build -o byom-onboard cmd/server/main.go
./byom-onboard
sequenceDiagram
participant U as User
participant API as Registration API
participant DB as Database
participant PS as Payment Service
participant Q as Message Queue
participant P as Provisioning Service
participant C as Cloud Provider
U->>API: Submit registration
API->>DB: Store registration details
API->>PS: Initialize payment
PS-->>U: Redirect to payment gateway
U->>PS: Complete payment
PS-->>API: Payment confirmation
API->>Q: Send provisioning request
Q->>P: Process request
P->>C: Create VM instance
C-->>P: VM creation confirmation
P->>DB: Update VM details
P-->>U: Send access credentials
Propriétaire - Tous droits réservés
Pour toute question ou suggestion, merci de contacter l'équipe BYOM.