Documentation
¶
Index ¶
- type APIKeyAuthIn
- type APIKeyAuthOpt
- type APIKeyAuthOption
- type BodyLocator
- type BuildOption
- type Client
- func (c *Client) Create(ctx context.Context, path string, body interface{}, opt CreateOption) (*resty.Response, error)
- func (c *Client) Delete(ctx context.Context, path string, opt DeleteOption) (*resty.Response, error)
- func (c *Client) Read(ctx context.Context, path string, opt ReadOption) (*resty.Response, error)
- func (c *Client) Update(ctx context.Context, path string, body interface{}, opt UpdateOption) (*resty.Response, error)
- type CodeLocator
- type CreateOption
- type DeleteOption
- type HTTPAuthOption
- type HTTPAuthType
- type Header
- type HeaderLocator
- type OAuth2AuthStyle
- type OAuth2ClientCredentialOption
- type OAuth2PasswordOption
- type PollOption
- type Pollable
- type PollingStatus
- type Query
- type ReadOption
- 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) String ¶
func (loc BodyLocator) String() string
type BuildOption ¶
type BuildOption struct {
Security securityOption
}
type Client ¶
type Client struct {
*resty.Client
}
type CodeLocator ¶
type CodeLocator struct{}
func (CodeLocator) String ¶
func (loc CodeLocator) String() string
type CreateOption ¶
type CreateOption struct { CreateMethod string Query Query Header Header PollOpt *PollOption }
type DeleteOption ¶
type DeleteOption struct { Query Query Header Header PollOpt *PollOption }
type HTTPAuthOption ¶
type HTTPAuthOption struct { Type HTTPAuthType Username string Password string Token string }
type HTTPAuthType ¶
type HTTPAuthType string
const ( HTTPAuthTypeBasic HTTPAuthType = "Basic" HTTPAuthTypeBearer HTTPAuthType = "Bearer" )
type HeaderLocator ¶
type HeaderLocator string
func (HeaderLocator) String ¶
func (loc HeaderLocator) String() string
type OAuth2AuthStyle ¶
type OAuth2AuthStyle string
const ( OAuth2AuthStyleInParams OAuth2AuthStyle = "params" OAuth2AuthStyleInHeader OAuth2AuthStyle = "header" )
type OAuth2PasswordOption ¶
type OAuth2PasswordOption struct { Username string Password string TokenURL string Scopes []string AuthStyle OAuth2AuthStyle }
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 // 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 Status PollingStatus StatusLocator ValueLocator DefaultDelay time.Duration }
func NewPollable ¶
func NewPollable(resp resty.Response, opt PollOption) (*Pollable, error)
type PollingStatus ¶
type ReadOption ¶
type UpdateOption ¶
type UpdateOption struct { Query Query Header Header PollOpt *PollOption }
type ValueLocator ¶
type ValueLocator interface { String() string // contains filtered or unexported methods }
ValueLocator indicates where a value is located in a HTTP response.
Click to show internal directories.
Click to hide internal directories.