Documentation ¶
Index ¶
- func NewHeadersTransport(rt http.RoundTripper, headers map[string]string) http.RoundTripper
- type Client
- func (c *Client) Delete(ctx context.Context, path string, body interface{}, query map[string]string) (*http.Response, error)
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) Get(ctx context.Context, path string, query map[string]string) (*http.Response, error)
- func (c *Client) NewRequestWithContext(ctx context.Context, method string, path string, body interface{}, ...) (*http.Request, error)
- func (c *Client) Patch(ctx context.Context, path string, body interface{}, query map[string]string) (*http.Response, error)
- func (c *Client) Post(ctx context.Context, path string, body interface{}, query map[string]string) (*http.Response, error)
- func (c *Client) Put(ctx context.Context, path string, body interface{}, query map[string]string) (*http.Response, error)
- func (c *Client) Request(ctx context.Context, method string, path string, body interface{}, ...) (*http.Response, error)
- type HeadersTransport
- type Option
- type ResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHeadersTransport ¶
func NewHeadersTransport(rt http.RoundTripper, headers map[string]string) http.RoundTripper
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) NewRequestWithContext ¶
type HeadersTransport ¶
type HeadersTransport struct {
// contains filtered or unexported fields
}
type Option ¶
func WithBasicAuth ¶
func WithHTTPClient ¶
func WithKubernetesAuth ¶ added in v0.0.26
func WithLogger ¶
func WithTimeout ¶
func WithVersion ¶
type ResponseWriter ¶ added in v0.0.26
type ResponseWriter struct {
// contains filtered or unexported fields
}
func NewResponseWriter ¶ added in v0.0.26
func NewResponseWriter(logger *logr.Logger) *ResponseWriter
func (*ResponseWriter) Write ¶ added in v0.0.26
func (r *ResponseWriter) Write(w http.ResponseWriter, v any, statusCode int)
func (*ResponseWriter) WriteError ¶ added in v0.0.26
func (r *ResponseWriter) WriteError(w http.ResponseWriter, msg string)
func (*ResponseWriter) WriteErrorf ¶ added in v0.0.26
func (r *ResponseWriter) WriteErrorf(w http.ResponseWriter, format string, a ...any)
func (*ResponseWriter) WriteOK ¶ added in v0.0.26
func (r *ResponseWriter) WriteOK(w http.ResponseWriter, v any)
Click to show internal directories.
Click to hide internal directories.