Files
2026-07-16 10:13:46 +03:30

65 lines
3.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Go Web API Course — Full Index
This course teaches you Go by building a real authentication API: chi
router, MySQL, Redis-backed sessions, password login, "Sign in with
Google", rate limiting, structured logging, and Docker — from an empty
folder to a containerized, production-shaped service.
It assumes **zero prior Go knowledge**. If you've never written a line of
Go before, start with the three "Go Basics" lessons below — everything
after that leans on them constantly.
## Go Basics (do these first if you're new to Go)
| File | Covers |
|---|---|
| `00-go-basics-1-syntax-and-types.md` | Installing Go, `go run`/`go build`, variables, basic types, `if`/`for`/`switch`, `fmt.Println` |
| `00-go-basics-2-functions-structs-pointers.md` | Functions, multiple return values, structs, methods, pointers (`*`/`&`) |
| `00-go-basics-3-interfaces-errors-concurrency-packages.md` | Interfaces, error handling, slices & maps, packages & modules, goroutines, JSON basics |
## The Project Lessons
| # | File | Builds |
|---|---|---|
| 1 | `lesson-01-project-skeleton-chi-routing.md` | Project layout, chi router, graceful shutdown |
| 2 | `lesson-02-structured-json-logging.md` | `log/slog` JSON logging, request-logging middleware |
| 3 | `lesson-03-config-and-mysql.md` | Env config, MySQL connection pooling |
| 4 | `lesson-04-user-model-repository-pattern.md` | Domain models, the repository pattern |
| 5 | `lesson-05-password-login-bcrypt.md` | bcrypt password hashing, register/login handlers |
| 6 | `lesson-06-sessions-scs-redis.md` | Server-side sessions backed by Redis |
| 7 | `lesson-07-google-oauth.md` | "Sign in with Google" (OAuth2 Authorization Code flow) |
| 8 | `lesson-08-auth-middleware.md` | `context.Context`, reusable auth-guard middleware |
| 9 | `lesson-09-rate-limiting-security.md` | Rate limiting, CORS, cookie hardening |
| 10 | `lesson-10-docker-wrapup.md` | Docker, docker-compose, full course review |
## How each lesson is structured
Every project lesson (110) has two parts:
- **Part A — standalone playground.** A tiny, throwaway program that
teaches the *new* concept in isolation, with nothing else going on. You
build and run this in its own scratch folder.
- **Part B — apply it to the project.** The same concept, now wired into
the real, growing `go-simple-api` project, building on the previous
lesson's code.
Each lesson also has a **"New Go concepts in this lesson"** box near the
top, pointing back at the specific Go Basics section you should understand
first. If something feels unfamiliar, that's the place to go check.
## What you'll have by the end
A real, working Go web service with:
- Password-based registration/login (bcrypt-hashed passwords)
- "Sign in with Google" (OAuth2)
- Server-side sessions stored in Redis
- MySQL-backed user storage via a repository pattern
- Structured JSON logging (ready for Grafana Loki / Alloy)
- Rate limiting and basic security hardening
- A Docker Compose setup running the whole stack with one command
Go at your own pace. Each lesson builds directly on the file state left by
the previous one — if you get lost, the companion `go-simple-api` code zip
(from earlier) has the final, correct state of every file at the end of
the whole course.