{"id":15272370,"url":"https://github.com/codelytv/go-hexagonal_http_api-course","last_synced_at":"2025-04-13T04:17:25.040Z","repository":{"id":40642652,"uuid":"302682718","full_name":"CodelyTV/go-hexagonal_http_api-course","owner":"CodelyTV","description":"Ejemplos del curso de API HTTP en Go aplicando Arquitectura Hexagonal","archived":false,"fork":false,"pushed_at":"2024-08-17T17:38:50.000Z","size":60,"stargazers_count":139,"open_issues_count":3,"forks_count":65,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-13T04:17:17.606Z","etag":null,"topics":["codelytv","ddd","domain-driven-design","gin","go","golang","hexagonal-architecture"],"latest_commit_sha":null,"homepage":"https://pro.codely.tv/library/api-go-hexagonal","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodelyTV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-09T15:32:56.000Z","updated_at":"2025-04-04T03:03:38.000Z","dependencies_parsed_at":"2024-12-21T03:08:33.598Z","dependency_job_id":null,"html_url":"https://github.com/CodelyTV/go-hexagonal_http_api-course","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"bfd8a00f21eded9b8fee184c8d1771d4c37b6fe6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodelyTV%2Fgo-hexagonal_http_api-course","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodelyTV%2Fgo-hexagonal_http_api-course/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodelyTV%2Fgo-hexagonal_http_api-course/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodelyTV%2Fgo-hexagonal_http_api-course/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodelyTV","download_url":"https://codeload.github.com/CodelyTV/go-hexagonal_http_api-course/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661712,"owners_count":21141451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codelytv","ddd","domain-driven-design","gin","go","golang","hexagonal-architecture"],"created_at":"2024-09-30T09:05:15.845Z","updated_at":"2025-04-13T04:17:25.016Z","avatar_url":"https://github.com/CodelyTV.png","language":"Go","readme":"## CodelyTV - Go HTTP API - Hexagonal Architecture\n\nThis repository contains the code examples used on the CodelyTV course.\n\n### Requirements\n\n- Go v1.15+\n- MySQL (see below).\n\n### Contents\n\nThis project has been designed as a single Go module with multiple applications.\nEach folder contains a completely functional application (binary) that can be executed isolated.\n\nEach folder corresponds to one of the course lessons / videos:\n1. [`01-01-your-first-http-endpoint`](./01-01-your-first-http-endpoint) - Nuestro primer endpoint HTTP en Go\n1. [`01-02-using-gin`](./01-02-using-gin) - Usando Gin: nuestro primer framework\n1. [`01-03-architectured-healthcheck`](./01-03-architectured-healthcheck) - Arquitecturando nuestro health check\n1. [`02-01-post-course-endpoint`](./02-01-post-course-endpoint) - Implementando el endpoint de creación de curso\n1. [`02-02-repository-injection`](./02-02-repository-injection) - Inyectando nuestro repositorio\n1. [`02-03-controller-test`](./02-03-controller-test) - Testeando nuestro endpoint\n1. [`02-04-domain-validations`](./02-04-domain-validations) - Añadiendo validaciones a nuestro dominio\n1. [`03-01-mysql-repository-implementation`](./03-01-mysql-repository-implementation) - Implementando nuestro repositorio para MySQL\n1. [`03-02-repository-test`](./03-02-repository-test) - Testeando nuestro repositorio\n1. [`04-01-application-service`](./04-01-application-service) - Refactorizando el endpoint para extraer el Application Service\n1. [`04-02-application-service-test`](./04-02-application-service-test) - Testeando el Application Service\n1. [`04-03-command-bus`](./04-03-command-bus) - Unificando nuestros casos de uso: Command Bus\n1. [`05-01-graceful-shutdown`](./05-01-graceful-shutdown) - Graceful shutdown\n1. [`05-02-timeouts`](./05-02-timeouts) - Timeouts en operaciones asíncronas: repositorio\n1. [`06-01-http-middlewares`](./06-01-http-middlewares) - Usando middlewares HTTP en Go\n1. [`06-02-time-parse-in-go`](./06-02-time-parse-in-go) - El secreto mejor guardado de Go y sus fechas\n1. [`06-03-gin-middlewares`](./06-03-gin-middlewares) - Implementando el middleware de recuperación de errores en Gin\n1. [`07-01-publishing-domain-events`](./07-01-publishing-domain-events) - Publicando eventos de curso creado\n1. [`07-02-domain-events-subscriber`](./07-02-domain-events-subscriber) - Implementando nuestro suscriptor de eventos\n1. [`07-03-event-bus-implementation`](./07-03-event-bus-implementation) - Implementando el Event Bus\n1. [`08-01-reading-env-variables`](./08-01-reading-env-variables) - Leyendo configuración de variables de entorno\n1. [`08-02-build-and-deploy`](./08-02-build-and-deploy) - Build, despliegue y ¡a producción!\n1. [`08-03-debugging`](./08-03-debugging) - Generando la imagen de Docker y depurando errores\n\n### Usage\n\nTo execute the application from any lesson, just run:\n\n```sh\nexport COURSE_LESSON=02-04-domain-validations; go run $COURSE_LESSON/cmd/api/main.go \n```\n\nReplacing `COURSE_LESSON` value by any of the available ones.\n\n#### Simple examples\n\nSome lessons only contain a single `main.go` file with a few lines of code.\nTo run one of those lessons, just run:\n\n```sh\nexport COURSE_LESSON=01-01-your-first-http-endpoint; go run $COURSE_LESSON/main.go \n```\n\n#### MySQL \u0026 Docker\n\nFrom `02-01-post-course-endpoint` on, the application on each directory relies\non a MySQL database. So, to simplify its execution, we've added a\n`docker-compose.yaml` file with a MySQL container already set up.\n\nTo run it, just execute:\n\n```sh\ndocker-compose up -d \n```\n\nYou can also use your own MySQL instance. Note that those applications\nexpects a MySQL instance to be available on `localhost:3306`,\nidentified by `codely:codely` and with a `codely` database.\n\nTo set up your database, you can execute the `schema.sql` file\npresent on the `sql` directory. It's automatically loaded if\nyou use the provided `docker-compose.yaml` file.\n\n#### Tests\n\nTo execute all tests, just run:\n\n```sh\ngo test ./... \n```\n\nTo execute only the tests present in one of the lessons, run:\n\n```sh\ngo test ./02-04-domain-validations/... \n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelytv%2Fgo-hexagonal_http_api-course","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelytv%2Fgo-hexagonal_http_api-course","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelytv%2Fgo-hexagonal_http_api-course/lists"}