Versions in this module Expand all Collapse all v0 v0.1.0 Aug 22, 2023 Changes in this version + const DefaultBackoffDelayFactor + const DefaultBackoffMaxDelay + const DefaultBackoffMinDelay + const DefaultMaxRetries + func BackoffDelayFactor(x float64) func(*Client) + func BackoffMaxDelay(x int) func(*Client) + func BackoffMinDelay(x int) func(*Client) + func Insecure(x bool) func(*Client) + func Logging(x bool) func(*Client) + func MaxRetries(x int) func(*Client) + func NoLogPayload(req *Req) + func NoRefresh(req *Req) + func Query(k, v string) func(req *Req) + func RequestTimeout(x time.Duration) func(*Client) + type Body struct + Str string + func (body Body) Delete(path string) Body + func (body Body) Res() Res + func (body Body) Set(path, value string) Body + func (body Body) SetRaw(path, rawValue string) Body + type Client struct + AuthenticationMutex *sync.Mutex + BackoffDelayFactor float64 + BackoffMaxDelay int + BackoffMinDelay int + HttpClient *http.Client + Insecure bool + LastRefresh time.Time + Logging bool + MaxRetries int + Pwd string + Token string + Url string + Usr string + func NewClient(url, usr, pwd string, mods ...func(*Client)) (Client, error) + func (client *Client) Authenticate() error + func (client *Client) Backoff(attempts int) bool + func (client *Client) DeleteDn(dn string, mods ...func(*Req)) (Res, error) + func (client *Client) Do(req Req) (Res, error) + func (client *Client) Get(path string, mods ...func(*Req)) (Res, error) + func (client *Client) GetClass(class string, mods ...func(*Req)) (Res, error) + func (client *Client) GetDn(dn string, mods ...func(*Req)) (Res, error) + func (client *Client) Login() error + func (client *Client) Post(dn, data string, mods ...func(*Req)) (Res, error) + func (client *Client) Refresh() error + func (client Client) NewReq(method, uri string, body io.Reader, mods ...func(*Req)) Req + type Req struct + HttpReq *http.Request + LogPayload bool + Refresh bool + type Res = gjson.Result