Versions in this module Expand all Collapse all v0 v0.20241126.1723 Nov 26, 2024 Changes in this version + func RequestRetryAll(retryFuncs ...RequestRetryFunc) func(resp *http.Response, o *odata.OData) (bool, error) + func RequestRetryAny(retryFuncs ...RequestRetryFunc) func(resp *http.Response, o *odata.OData) (bool, error) + func RetryOn404ConsistencyFailureFunc(resp *http.Response, _ *odata.OData) (bool, error) + func RetryableErrorHandler(resp *http.Response, err error, _ int) (*http.Response, error) + type BaseClient interface + AppendRequestMiddleware func(RequestMiddleware) + AppendResponseMiddleware func(ResponseMiddleware) + ClearRequestMiddlewares func() + ClearResponseMiddlewares func() + Execute func(ctx context.Context, req *Request) (*Response, error) + ExecutePaged func(ctx context.Context, req *Request) (*Response, error) + GetUserAgent func() string + NewRequest func(ctx context.Context, input RequestOptions) (*Request, error) + SetAuthorizer func(auth.Authorizer) + SetUserAgent func(string) + type Client struct + AuthorizeRequest func(context.Context, *http.Request, auth.Authorizer) error + Authorizer auth.Authorizer + BaseUri string + CorrelationId string + DisableRetries bool + RequestMiddlewares *[]RequestMiddleware + ResponseMiddlewares *[]ResponseMiddleware + UserAgent string + func NewClient(baseUri string, serviceName, apiVersion string) *Client + func (c *Client) AppendRequestMiddleware(f RequestMiddleware) + func (c *Client) AppendResponseMiddleware(f ResponseMiddleware) + func (c *Client) ClearRequestMiddlewares() + func (c *Client) ClearResponseMiddlewares() + func (c *Client) Execute(ctx context.Context, req *Request) (*Response, error) + func (c *Client) ExecutePaged(ctx context.Context, req *Request) (*Response, error) + func (c *Client) GetUserAgent() string + func (c *Client) NewRequest(ctx context.Context, input RequestOptions) (*Request, error) + func (c *Client) SetAuthorizer(authorizer auth.Authorizer) + func (c *Client) SetUserAgent(userAgent string) + type Headers struct + func (h *Headers) Append(key, value string) + func (h *Headers) AppendHeader(h2 http.Header) + func (h *Headers) Headers() http.Header + func (h *Headers) Merge(h2 Headers) + type Options interface + ToHeaders func() *Headers + ToOData func() *odata.Query + ToQuery func() *QueryParams + type QueryParams struct + func (q *QueryParams) Append(key, value string) + func (q *QueryParams) AppendValues(q2 url.Values) + func (q *QueryParams) Merge(q2 Headers) + func (q *QueryParams) Values() url.Values + type Request struct + Client BaseClient + CustomErrorParser ResponseErrorParser + Pager odata.CustomPager + RetryFunc RequestRetryFunc + ValidStatusCodes []int + ValidStatusFunc ValidStatusFunc + func (r *Request) Execute(ctx context.Context) (*Response, error) + func (r *Request) ExecutePaged(ctx context.Context) (*Response, error) + func (r *Request) IsIdempotent() bool + func (r *Request) Marshal(payload interface{}) error + type RequestMiddleware func(*http.Request) (*http.Request, error) + type RequestOptions struct + ContentType string + ExpectedStatusCodes []int + HttpMethod string + OptionsObject Options + Pager odata.CustomPager + Path string + RetryFunc RequestRetryFunc + func (ro RequestOptions) Validate() error + type RequestRetryFunc func(*http.Response, *odata.OData) (bool, error) + type Response struct + OData *odata.OData + func (r *Response) Unmarshal(model interface{}) error + type ResponseErrorParser interface + FromResponse func(*http.Response) error + type ResponseMiddleware func(*http.Request, *http.Response) (*http.Response, error) + type ValidStatusFunc func(*http.Response, *odata.OData) bool