Series: Go
go
8 lines
· Updated 2026-04-18
errors.go
Go/payment-gateway-challenge/internal/handlers/errors.go
package handlers
// ErrorJSON is the standard JSON envelope for non-2xx API errors documented in Swagger.
type ErrorJSON struct {
Message string `json:"message" example:"failed to reach acquiring bank"`
Detail string `json:"detail,omitempty" example:"upstream body"`
Status int `json:"status,omitempty" example:"502"`
}
Related articles
Go
go
Updated 2026-04-18
main.go
main.go — go source code from the Go learning materials (Go/Baasid/cmd/hashpw/main.go).
Read article →
Go
go
Updated 2026-04-18
main.go
main.go — go source code from the Go learning materials (Go/Baasid/cmd/server/main.go).
Read article →
Go
go
Updated 2026-04-18
docs.go
docs.go — go source code from the Go learning materials (Go/Baasid/docs/docs.go).
Read article →
Go
go
Updated 2026-04-18
jwt.go
jwt.go — go source code from the Go learning materials (Go/Baasid/internal/auth/jwt.go).
Read article →
Go
go
Updated 2026-04-18
password.go
password.go — go source code from the Go learning materials (Go/Baasid/internal/auth/password.go).
Read article →
Go
go
Updated 2026-04-18
password_test.go
password_test.go — go source code from the Go learning materials (Go/Baasid/internal/auth/password_test.go).
Read article →