A simple Go API server that provides random names of plants, animals, and colors. Perfect for generating whimsical names and data for your projects.
GET /plants- Get all plantsGET /animals- Get all animalsGET /colors- Get all colorsGET /names- Get all categories combinedGET /plants/random?count=5- Get random plantsGET /animals/random?count=5- Get random animalsGET /colors/random?count=5- Get random colorsGET /names/random?count=10&parts=2- Generate random namesGET /health- Health check
go run main.gogo test ./...- Build and push the Docker image:
gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/whimsy-api- Deploy to Cloud Run:
gcloud run deploy whimsy-api \
--image gcr.io/YOUR_PROJECT_ID/whimsy-api \
--platform managed \
--region us-central1 \
--allow-unauthenticatedReplace YOUR_PROJECT_ID with your actual Google Cloud project ID.