Welcome to our Go-based API, designed to simplify your interaction with OpenAPI RESTful and AsyncAPI messaging services. This powerful system is deployed to kubernetes and extends the functionality of the container plafrom by enabling you to effortlessly generate adapter code, modify configurations, delete services, and access comprehensive documentation.
-
RESTful Service Integration: With our API, you can seamlessly interact with RESTful services, making it easy to perform common tasks like making HTTP requests, handling responses, and more.
-
Messaging Service Integration: Our API supports messaging services, allowing you to effortlessly connect and communicate with various message queues, making your application more robust and responsive.
-
Generate Adapter Code: Simplify the integration process by generating adapter code tailored to your specific needs.
-
Configuration Management: Modify your service configurations on the fly. Our API provides endpoints to adjust settings, ensuring your applications are always aligned with your requirements.
-
Service Deletion: Need to clean up or reconfigure your services? You can easily delete services using our API, streamlining the management of your resources.
-
Extensive Documentation: Access comprehensive Swagger documentation, making it simple to understand and navigate the API endpoints and functionality.
-
Platform Agnostic: Our API leverages Kubernetes under the hood, providing a platform-agnostic experience. You can use this API on any infrastructure that supports Kubernetes, ensuring flexibility and portability.
Before you proceed, make sure you have the following prerequisites installed:
- Go The API is developed in go.
brew install go
- Docker The API is packaged as a OCI container using Docker. Docker is also used as the test environment.
brew install --cask docker
- Kind (Kubernetes in Docker) Kind is used to test the api in a local kubernetes cluster.
brew install kind
- Kubectl Kubectl is required to interact with the Kind cluster or any other Kubernetes cluster.
brew install kubectl
- Swag Swag is used to generate the OpenAPI Spec used for documenting the API
brew tap swaggo/swag && brew install swag
This API is equipped with a Makefile that simplifies various development and deployment tasks. You can use it for building, testing, running, and deploying the API. Additionally, it includes targets for creating and managing a Kubernetes cluster with Kind for local production like testing and generating Swagger documentation.
Build and Run the Go Application:
make run
Build the Go Application:
make build
Generate Swagger Documentation:
make swagger
Create a Kind Cluster:
make create-cluster
Delete a Kind Cluster:
make delete-cluster
Build the Docker Image:
make docker-build
Deploy the Application to Kubernetes:
make make deploy-api
Run Tests:
make test
Clean Up:
make clean
- APP_NAME: The name of your Go application.
- SWAG_DIR: The directory containing Swagger documentation.
- KIND_CONFIG: The Kind cluster configuration file.
- KIND_CLUSTER_NAME: The name of your Kind cluster.
- DOCKER_IMAGE_NAME: The name of the Docker image for your - application.
- DOCKER_IMAGE_TAG: The Docker image tag.
- KUBE_MANIFESTS: The path to your Kubernetes manifest files.
- MAIN_FILE: The main Go file for your application.
- Make sure you have all the prerequisites installed.
- Use the provided Makefile targets to build, run, and deploy your Go application as needed.
- Customize the Makefile variables to match your project's configuration.
- Refer to the Makefile documentation for more details on each target and their usage.
use npm install -g @stoplight/prism-cli
to mock the api based on open api prism mock ./openapi.yml -p 8080
- Generate the Server based on
https://swagger.io/docs/open-source-tools/swagger-codegen/ https://github.com/swagger-api/swagger-codegen#homebrew https://www.asyncapi.com/docs/tutorials/getting-started˝ file:///Users/lukeroy/Downloads/OpenAPI+Specification+Zero+to+Master.pdf
Choosing the Right Open-Source FaaS Platform: A Comparative Guide: https://medium.com/@patrickkoss/choosing-the-right-open-source-faas-platform-a-comparative-guide-3da55be0a7fa