Web Services & APIs Training
This 3-day training covers building production-ready web services and REST APIs in Go. Participants will master the net/http package, routing with modern Go 1.22 patterns and Chi, middleware chains, JSON handling, database access with sqlx/pgx, authentication, OpenAPI documentation, and comprehensive HTTP testing. Each module builds toward a complete API application.
Build production-grade web services and APIs with Go in this comprehensive 3-day training. Learn to design, implement, and deploy REST and gRPC services using the Go standard library and popular frameworks, with proper authentication, database access, and testing strategies.
Training Details
| Duration | 3 days (24 hours) |
| Level | Intermediate |
| Delivery | In-person, Live online, Hybrid |
| Certification | N/A |
Who Is This For?
- Go developers building backend services
- Backend engineers moving from other languages to Go
- API developers designing production services
- Full-stack developers adding Go to their stack
- Teams adopting Go for microservices
Learning Outcomes
After completing this training, participants will be able to:
- Build REST APIs using the Go standard library and popular routers
- Design and implement gRPC services with Protocol Buffers
- Implement middleware for logging, authentication, and rate limiting
- Integrate with SQL and NoSQL databases using Go patterns
- Write comprehensive API tests including integration and end-to-end
- Deploy Go services with proper health checks and graceful shutdown
Detailed Agenda
Day 1: REST API Development
Module 1: HTTP Server Foundations
- net/http package deep dive
- ServeMux and handler patterns
- Request parsing and response writing
- JSON encoding and decoding
- Hands-on: Build a CRUD API with net/http
Module 2: Routing and Middleware
- Popular routers (chi, gorilla/mux, gin)
- Middleware patterns and chaining
- Logging, recovery, and CORS middleware
- Request validation and error responses
- Hands-on: Refactor to chi router with middleware stack
Module 3: Authentication and Authorization
- JWT token generation and validation
- OAuth2 integration patterns
- Role-based access control middleware
- API key authentication
- Hands-on: Add JWT authentication to the API
Day 2: Database Integration and gRPC
Module 4: Database Access
- database/sql package and connection pooling
- Query patterns and prepared statements
- Migrations with golang-migrate
- Working with sqlx and GORM
- Hands-on: Add PostgreSQL persistence layer
Module 5: gRPC Services
- Protocol Buffers and service definitions
- Unary and streaming RPCs
- gRPC interceptors and metadata
- Error handling in gRPC
- Hands-on: Build a gRPC service with streaming
Module 6: API Design Best Practices
- RESTful resource design
- Pagination, filtering, and sorting
- Versioning strategies
- API documentation with OpenAPI/Swagger
- Hands-on: Design and document a complete API
Day 3: Testing, Deployment, and Production Readiness
Module 7: API Testing
- Unit testing HTTP handlers
- httptest package for integration tests
- Table-driven API tests
- Mocking dependencies with interfaces
- Hands-on: Write comprehensive test suites
Module 8: Production Patterns
- Configuration management (env vars, files, flags)
- Structured logging with slog
- Health check endpoints and readiness probes
- Graceful shutdown and signal handling
- Hands-on: Add production instrumentation
Module 9: Deployment
- Multi-stage Docker builds for Go
- Container-optimized binaries (static linking, scratch images)
- Kubernetes deployment manifests
- CI/CD pipeline for Go services
- Hands-on: Containerize and deploy the service
Prerequisites
- Go Fundamentals or equivalent experience
- Basic understanding of HTTP and REST concepts
- Familiarity with SQL databases
- Understanding of JSON data format
Delivery Formats
| Format | Description |
|---|---|
| In-Person | On-site at your company's location, hands-on with direct interaction |
| Live Online | Interactive virtual sessions with screen sharing and real-time labs |
| Hybrid | Combination of on-site and remote sessions, flexible scheduling |
All formats include hands-on labs, course materials, starter code repositories, and post-training support.
Ready to get started?
Request a training quote for your team — in-person, live-online, or hybrid.