Documentation ¶
Index ¶
- type HttpTransportAuthProvider
- type HttpTransportClient
- func (t *HttpTransportClient) AddAuthHeaders(req *http.Request)
- func (t *HttpTransportClient) AddCommonHeaders(req *http.Request)
- func (t *HttpTransportClient) GetJSON(path string, out any, params ...HttpTransportClientParams) error
- func (t *HttpTransportClient) ParseParams(req *http.Request, params ...HttpTransportClientParams)
- func (t *HttpTransportClient) PostJSON(path string, in any, out any, params ...HttpTransportClientParams) error
- func (t *HttpTransportClient) PutJSON(path string, in any, out any, params ...HttpTransportClientParams) error
- type HttpTransportClientConfig
- type HttpTransportClientOpts
- type HttpTransportClientParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpTransportClient ¶
type HttpTransportClient struct { Client *http.Client Config *HttpTransportClientConfig }
func (*HttpTransportClient) AddAuthHeaders ¶
func (t *HttpTransportClient) AddAuthHeaders(req *http.Request)
func (*HttpTransportClient) AddCommonHeaders ¶
func (t *HttpTransportClient) AddCommonHeaders(req *http.Request)
func (*HttpTransportClient) GetJSON ¶
func (t *HttpTransportClient) GetJSON(path string, out any, params ...HttpTransportClientParams) error
func (*HttpTransportClient) ParseParams ¶ added in v0.1.6
func (t *HttpTransportClient) ParseParams(req *http.Request, params ...HttpTransportClientParams)
func (*HttpTransportClient) PostJSON ¶
func (t *HttpTransportClient) PostJSON(path string, in any, out any, params ...HttpTransportClientParams) error
func (*HttpTransportClient) PutJSON ¶
func (t *HttpTransportClient) PutJSON(path string, in any, out any, params ...HttpTransportClientParams) error
type HttpTransportClientConfig ¶
type HttpTransportClientConfig struct { BaseURL string AuthProvider HttpTransportAuthProvider Role string Version rorversion.RorVersion }
type HttpTransportClientOpts ¶ added in v0.1.6
type HttpTransportClientOpts string
const ( HttpTransportClientOptsNoAuth HttpTransportClientOpts = "NOAUTH" HttpTransportClientOptsHeaders HttpTransportClientOpts = "HEADERS" HttpTransportClientOptsQuery HttpTransportClientOpts = "QUERY" HttpTransportClientTimeout HttpTransportClientOpts = "TIMEOUT" )
type HttpTransportClientParams ¶
type HttpTransportClientParams struct { Key HttpTransportClientOpts Value any }
Click to show internal directories.
Click to hide internal directories.