Documentation
¶
Index ¶
- func DecodeAuthenticationStrategyHookFunc() mapstructure.DecodeHookFunc
- func DecodeEndpointHookFunc() mapstructure.DecodeHookFunc
- type APIKeyStrategy
- type AuthenticationStrategy
- type BasicAuthStrategy
- type ClientCredentialsStrategy
- type Endpoint
- func (e Endpoint) CreateClient(peerName string) *http.Client
- func (e Endpoint) CreateRequest(ctx context.Context, body io.Reader, rndr Renderer) (*http.Request, error)
- func (e Endpoint) Hash() []byte
- func (e Endpoint) SendRequest(ctx context.Context, body io.Reader, renderer Renderer) ([]byte, error)
- func (e Endpoint) Validate() error
- type RenderFunc
- type Renderer
- type Retry
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAuthenticationStrategyHookFunc ¶
func DecodeAuthenticationStrategyHookFunc() mapstructure.DecodeHookFunc
func DecodeEndpointHookFunc ¶
func DecodeEndpointHookFunc() mapstructure.DecodeHookFunc
Types ¶
type APIKeyStrategy ¶
type APIKeyStrategy struct {
In string `mapstructure:"in"`
Name string `mapstructure:"name"`
Value string `mapstructure:"value"`
}
func (*APIKeyStrategy) Hash ¶
func (c *APIKeyStrategy) Hash() []byte
type AuthenticationStrategy ¶
type BasicAuthStrategy ¶
type BasicAuthStrategy struct {
User string `mapstructure:"user"`
Password string `mapstructure:"password"`
}
func (*BasicAuthStrategy) Hash ¶
func (c *BasicAuthStrategy) Hash() []byte
type ClientCredentialsStrategy ¶
type ClientCredentialsStrategy struct {
ClientID string `mapstructure:"client_id"`
ClientSecret string `mapstructure:"client_secret"`
Scopes []string `mapstructure:"scopes"`
TokenURL string `mapstructure:"token_url"`
}
func (*ClientCredentialsStrategy) Hash ¶
func (c *ClientCredentialsStrategy) Hash() []byte
type Endpoint ¶
type Endpoint struct {
URL string `mapstructure:"url"`
Method string `mapstructure:"method"`
Retry *Retry `mapstructure:"retry"`
AuthStrategy AuthenticationStrategy `mapstructure:"auth"`
Headers map[string]string `mapstructure:"headers"`
HTTPCacheEnabled *bool `mapstructure:"enable_http_cache"`
Values Values `mapstructure:"values"`
}
func (Endpoint) CreateRequest ¶
func (Endpoint) SendRequest ¶
type RenderFunc ¶
Click to show internal directories.
Click to hide internal directories.