W1W2W3W4W5W6W7W8

Lessons

Week 1Project setup and rate limiting0/24
Week 2Restaurants and menus with MySQL0/20
Week 3Authentication, orders and Kafka events0/20
Week 4Customer application with Expo0/18
Week 5Live order tracking and rider management0/14
Week 6Performance, caching and load testing0/14
Week 7Deployment and production operations0/14
Week 8Advanced features and project documentation0/8
ReviewQuiz questions that are due
ResourcesReading list, by week

Go interfaces

An interface defines a set of method signatures that a type must provide to satisfy it. Go uses implicit satisfaction, so a type implements an interface automatically when its method set contains all the required methods.

Minimal example

go
type Limiter interface {
    Allow(key string) bool
}

type AlwaysAllow struct{}

func (AlwaysAllow) Allow(key string) bool {
    return true
}

Learn this concept

Lesson 1.7 · Interfaces and Go errors

Used in exercises

Exercise 1.8 · Practice: write your first Go program Exercise 1.11 · Token bucket limiter with lazy refill Exercise 1.14 · Limiter interface and a FixedWindow implementation Exercise 1.18 · RateLimit HTTP middleware that returns 429 Exercise 1.22 · Redis fixed-window limiter that fails open Exercise 1.26 · Optional: Sliding window log limiter Exercise 1.27 · Optional: Sliding window counter limiter Exercise 1.28 · Optional: Leaky bucket limiter Exercise 1.29 · Optional: Token bucket in Redis with Lua and EVALSHA Exercise 1.30 · Optional: X-RateLimit response headers Exercise 2.22 · GET /v1/restaurants: signed cursors Exercise 2.24 · GET /v1/restaurants: search by name Exercise 2.26 · GET /v1/restaurants: sort by distance Exercise 3.24 · POST /v1/auth/login: rate limit attempts Exercise 8.4 · Payment processing service
Prerequisite conceptsGo methods and receiversGo structs
RelatedGo errorsHTTP middlewareGo testing