Documentation
¶
Index ¶
- type APIKeyAuthIn
- type APIKeyAuthOpt
- type APIKeyAuthOption
- type BodyLocator
- type BuildOption
- type Client
- func (c *Client) Create(ctx context.Context, path string, body string, opt CreateOption) (*resty.Response, error)
- func (c *Client) Delete(ctx context.Context, path string, body string, opt DeleteOption) (*resty.Response, error)
- func (c *Client) Operation(ctx context.Context, path string, body []byte, opt OperationOption) (*resty.Response, error)
- func (c *Client) Read(ctx context.Context, path string, opt ReadOption) (*resty.Response, error)
- func (c *Client) ReadDS(ctx context.Context, path string, body []byte, opt ReadOptionDS) (*resty.Response, error)
- func (c *Client) ReadLR(ctx context.Context, path string, body []byte, opt ReadOptionLR) (*resty.Response, error)
- func (c *Client) SetLoggerContext(ctx context.Context)
- func (c *Client) Update(ctx context.Context, path string, body string, opt UpdateOption) (*resty.Response, error)
- type CodeLocator
- type CreateOption
- type DeleteOption
- type ExactLocator
- type HTTPBasicOption
- type HTTPTokenOption
- type Header
- func (h Header) Clone() Header
- func (h Header) MergeOrSelf(ctx context.Context, v types.Map) (Header, diag.Diagnostics)
- func (h Header) TakeOrSelf(ctx context.Context, v types.Map) (Header, diag.Diagnostics)
- func (h Header) TakeWithExparamOrSelf(ctx context.Context, v types.Map, body []byte) (Header, diag.Diagnostics)
- func (h Header) ToTFValue() types.Map
- type HeaderLocator
- type OAuth2AuthStyle
- type OAuth2ClientCredentialOption
- type OAuth2PasswordOption
- type OAuth2RefreshTokenOption
- type OperationOption
- type PollOption
- type Pollable
- type PollingStatus
- type Query
- type ReadOption
- type ReadOptionDS
- type ReadOptionLR
- type RetryOption
- type SecurityOption
- type UpdateOption
- type ValueLocator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyAuthIn ¶
type APIKeyAuthIn string
const ( APIKeyAuthInHeader APIKeyAuthIn = "header" APIKeyAuthInQuery APIKeyAuthIn = "query" APIKeyAuthInCookie APIKeyAuthIn = "cookie" )
type APIKeyAuthOpt ¶
type APIKeyAuthOpt struct {
Name string
In APIKeyAuthIn
Value string
}
type APIKeyAuthOption ¶
type APIKeyAuthOption []APIKeyAuthOpt
type BodyLocator ¶
type BodyLocator string
func (BodyLocator) LocateValueInResp ¶
func (loc BodyLocator) LocateValueInResp(resp resty.Response) (string, bool)
func (BodyLocator) String ¶
func (loc BodyLocator) String() string
type BuildOption ¶
type BuildOption struct {
Security SecurityOption
CookieEnabled bool
TLSConfig *tls.Config
Retry *RetryOption
}
type Client ¶
func (*Client) SetLoggerContext ¶
SetLoggerContext sets the ctx to the internal resty logger, as the tflog requires the current ctx. This needs to be called at the start of each CRUD function.
type CodeLocator ¶
type CodeLocator struct{}
func (CodeLocator) LocateValueInResp ¶
func (loc CodeLocator) LocateValueInResp(resp resty.Response) (string, bool)
func (CodeLocator) String ¶
func (loc CodeLocator) String() string
type CreateOption ¶
type DeleteOption ¶
type ExactLocator ¶
type ExactLocator string
func (ExactLocator) LocateValueInResp ¶
func (loc ExactLocator) LocateValueInResp(_ resty.Response) (string, bool)
func (ExactLocator) String ¶
func (loc ExactLocator) String() string
type HTTPBasicOption ¶
type HTTPTokenOption ¶
type Header ¶
func (Header) MergeOrSelf ¶
MergeOrSelf merges the entries from v into h without dropping existing keys. Keys in v override keys in h. If v is empty/null, h is returned unchanged.
func (Header) TakeOrSelf ¶
func (Header) TakeWithExparamOrSelf ¶
type HeaderLocator ¶
type HeaderLocator string
func (HeaderLocator) LocateValueInResp ¶
func (loc HeaderLocator) LocateValueInResp(resp resty.Response) (string, bool)
func (HeaderLocator) String ¶
func (loc HeaderLocator) String() string
type OAuth2AuthStyle ¶
type OAuth2AuthStyle string
const ( OAuth2AuthStyleInParams OAuth2AuthStyle = "params" OAuth2AuthStyleInHeader OAuth2AuthStyle = "header" )
type OAuth2PasswordOption ¶
type OperationOption ¶
type PollOption ¶
type PollOption struct {
// StatusLocator indicates where the polling status is located in the response of the polling requests.
StatusLocator ValueLocator
// Status the status sentinels for polling.
Status PollingStatus
// UrlLocator configures the how to discover the polling location.
// If it is nil, the original request URL is used for polling.
UrlLocator ValueLocator
Header Header
Query Query
// DefaultDelay specifies the interval between two pollings. The `Retry-After` in the response header takes higher precedence than this.
DefaultDelay time.Duration
}
type Pollable ¶
type Pollable struct {
InitDelay time.Duration
URL string
Header Header
Query Query
Status PollingStatus
StatusLocator ValueLocator
DefaultDelay time.Duration
}
func NewPollableForPoll ¶
func NewPollableForPoll(resp resty.Response, opt PollOption) (*Pollable, error)
func NewPollableForPrecheck ¶
func NewPollableForPrecheck(opt PollOption) (*Pollable, error)
type PollingStatus ¶
type ReadOption ¶
type ReadOptionDS ¶
type ReadOptionLR ¶
type RetryOption ¶
type SecurityOption ¶
type SecurityOption interface {
// contains filtered or unexported methods
}
type UpdateOption ¶
Click to show internal directories.
Click to hide internal directories.