stub.go 282 B

1234567891011121314151617
  1. package dynamodb
  2. import (
  3. "net/http"
  4. "net/http/httptest"
  5. )
  6. type dbItem struct {
  7. Key string
  8. Data string
  9. }
  10. func successRespServer(resp []byte) *httptest.Server {
  11. return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
  12. w.Write(resp)
  13. }))
  14. }