Documentation
¶
Index ¶
- func AssertEqual(t *testing.T, expected, actual any)
- func AssertNotEqual(t *testing.T, expected, actual any)
- func RequireErrorIs(t *testing.T, err error, target error)
- func RequireNoError(t *testing.T, err error)
- func TestHttpClient(t *testing.T, createClient func() HttpClientTester)
- type Config
- type HttpClient
- type HttpClientTester
- type Interface
- type Option
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqual ¶ added in v0.0.3
func AssertNotEqual ¶ added in v0.0.3
func RequireNoError ¶ added in v0.0.3
func TestHttpClient ¶ added in v0.0.2
func TestHttpClient(t *testing.T, createClient func() HttpClientTester)
Types ¶
type HttpClient ¶
type HttpClient interface { // SetConfig sets the config for the client, global config SetConfig(Config) // Do sends a request and returns a response Do(req *Request) (*Response, error) }
HttpClient is the genapi client runtime, the generated client will call this interface to send requests You can provide your own implementation of HttpClient to use a different HTTP client
type HttpClientTester ¶ added in v0.0.2
type HttpClientTester interface { HttpClient GetClient() *http.Client }
type Interface ¶
type Interface interface {
SetHttpClient(HttpClient)
}
Interface is the interface that mark this interface should be a genapi client that can be generated
Click to show internal directories.
Click to hide internal directories.