tooling for cloud provider (OVH) for the infrastructure : ovhcli etc ...
![]() |
1 month ago | |
---|---|---|
config | 1 month ago | |
handlers | 1 month ago | |
middleware | 1 month ago | |
models.bak | 1 month ago | |
routes | 1 month ago | |
.gitignore | 1 month ago | |
README.md | 1 month ago | |
byom.conf | 1 month ago | |
go.mod | 1 month ago | |
go.sum | 1 month ago | |
main.go | 1 month ago |
RESTful API service for OVH infrastructure management, built with Go.
git clone [repo-url]
cd byom-infra-api
go mod download
go run main.go
OVH_APPLICATION_KEY=your_key
OVH_APPLICATION_SECRET=your_secret
OVH_CONSUMER_KEY=your_consumer_key
OVH_ENDPOINT=ovh-eu
Method | Endpoint | Description |
---|---|---|
GET | /sshkey | List all keys |
GET | /sshkey/{id} | Get specific key |
POST | /sshkey | Create new key |
DELETE | /sshkey/{keyName} | Delete key |
# List SSH keys
curl http://localhost:8080/sshkey
# Create SSH key
curl -X POST http://localhost:8080/sshkey \
-H "Content-Type: application/json" \
-d '{"keyName": "mykey", "key": "ssh-ed25519 AAAA..."}'
Method | Endpoint | Description |
---|---|---|
GET | /dns | List all A records |
GET | /dns/{subdomain} | Get record ID for subdomain |
POST | /dns | Create new A record with random subdomain |
DELETE | /dns/{recordId} | Delete DNS record |
# List DNS A records
curl http://localhost:8080/dns
# Create DNS A record
curl -X POST http://localhost:8080/dns \
-H "Content-Type: application/json" \
-d '{"fieldType": "A", "subDomain": "test", "target": "1.2.3.4", "ttl": 3600}'
# Get DNS record ID for subdomain
curl http://localhost:8080/dns/mysubdomain
# Delete DNS record
curl -X DELETE http://localhost:8080/dns/1234567
byom-infra-api/
├── config/ # OVH configuration
├── handlers/ # Request handlers
├── middleware/ # HTTP middleware
├── routes/ # API routes
├── main.go # Entry point
└── README.md # Documentation
go test ./...
go build -o byom-api
MIT License