93f084598e
This diff extracts the fakefiller inside of internal/ooapi (a currently unused package) into its own package. The fakefiller knows how to fill many fields that are typically shared as data structures across processes. It is not perfect in that it cannot fill logger or http client fields, but still helps with better filling and testing. So, here we're using the fakefiller to improve testing of httpx and, nicely enough, we've already catched a bug in the way in which APIClientTemplate.Build misses to forward Authorization from the original template. Yay! Work part of https://github.com/ooni/probe/issues/1951
19 lines
580 B
Go
19 lines
580 B
Go
// Code generated by go generate; DO NOT EDIT.
|
|
// 2022-01-04 17:58:24.519577773 +0100 CET m=+0.000226600
|
|
|
|
package ooapi
|
|
|
|
//go:generate go run ./internal/generator -file cloners.go
|
|
|
|
// clonerForPsiphonConfigAPI represents any type exposing a method
|
|
// like simplePsiphonConfigAPI.WithToken.
|
|
type clonerForPsiphonConfigAPI interface {
|
|
WithToken(token string) callerForPsiphonConfigAPI
|
|
}
|
|
|
|
// clonerForTorTargetsAPI represents any type exposing a method
|
|
// like simpleTorTargetsAPI.WithToken.
|
|
type clonerForTorTargetsAPI interface {
|
|
WithToken(token string) callerForTorTargetsAPI
|
|
}
|