Versions in this module Expand all Collapse all v1 v1.0.1 May 23, 2024 v1.0.0 May 22, 2024 Changes in this version + const DefaultBurst + const DefaultQPS + const DefaultTimeOut + const DefaultVersionApiPath + func DefaultServerURL(host string) (*url.URL, error) + func TransportFor() *http.Transport + type Config struct + APIPath string + BearerToken string + BearerTokenFile string + Burst int + Dial func(ctx context.Context, network, address string) (net.Conn, error) + DisableCompression bool + Host string + Password string + QPS float32 + RateLimiter flowcontrol2.RateLimiter + Timeout time.Duration + Transport http.RoundTripper + UserAgent string + Username string + func NewDefaultConfig(host string, username string, password string) *Config + type ContentConfig struct + AcceptContentTypes string + ContentType string + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + type Interface interface + Delete func() *Request + Get func() *Request + List func() *Request + Post func() *Request + Put func() *Request + Verb func(verb string) *Request + type RESTClient struct + Client *http.Client + Throttle flowcontrol2.RateLimiter + func NewRESTClient(baseURL *url.URL, versionedAPIPath string, config ContentConfig, ...) (*RESTClient, error) + func RESTClientFor(config *Config) (*RESTClient, error) + func (c *RESTClient) Delete() *Request + func (c *RESTClient) Get() *Request + func (c *RESTClient) List() *Request + func (c *RESTClient) Post() *Request + func (c *RESTClient) Put() *Request + func (c *RESTClient) Verb(verb string) *Request + type Request struct + func NewRequest(client HTTPClient, verb string, baseURL *url.URL, headers map[string]string, ...) *Request + func (r *Request) AbsPath(segments ...string) *Request + func (r *Request) Body(obj interface{}) *Request + func (r *Request) Do() Result + func (r *Request) DoRaw() ([]byte, error) + func (r *Request) Name(resourceName string) *Request + func (r *Request) Param(paramName, s string) *Request + func (r *Request) Params(o interface{}) *Request + func (r *Request) Prefix(segments ...string) *Request + func (r *Request) Project(project string) *Request + func (r *Request) Query(content interface{}) *Request + func (r *Request) RequestURI(uri string) *Request + func (r *Request) Resource(resource string) *Request + func (r *Request) SetHeader(key string, values ...string) *Request + func (r *Request) Suffix(segments ...string) *Request + func (r *Request) Timeout(d time.Duration) *Request + func (r *Request) URL() *url.URL + type RequestConstructionError struct + Err error + func (r *RequestConstructionError) Error() string + type ResponseWrapper interface + DoRaw func() ([]byte, error) + Stream func() (io.ReadCloser, error) + type Result struct + func (r Result) Error() error + func (r Result) Into(obj interface{}) error + type TLSClientConfig struct + CAData []byte + CAFile string + CertData []byte + CertFile string + Insecure bool + KeyData []byte + KeyFile string + NextProtos []string + ServerName string + func (in *TLSClientConfig) DeepCopy() *TLSClientConfig + func (in *TLSClientConfig) DeepCopyInto(out *TLSClientConfig)