Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRESTClient ¶
func NewRESTClient(config RestConfigClient) (*perseshttp.RESTClient, error)
NewRESTClient create an instance of RESTClient using the config passed as parameter
func NewRoundTripper ¶
Types ¶
type PublicRestConfigClient ¶
type PublicRestConfigClient struct {
URL *common.URL `json:"url" yaml:"url"`
NativeAuth *api.PublicAuth `json:"native_auth,omitempty" yaml:"native_auth,omitempty"`
Oauth *secret.PublicOAuth `json:"oauth_config,omitempty" yaml:"oauth_config,omitempty"`
BasicAuth *secret.PublicBasicAuth `json:"basic_auth,omitempty" yaml:"basic_auth,omitempty"`
// The HTTP authorization credentials for the targets.
Authorization *secret.PublicAuthorization `json:"authorization,omitempty" yaml:"authorization,omitempty"`
// TLSConfig to use to connect to the targets.
TLSConfig *secret.PublicTLSConfig `json:"tls_config,omitempty" yaml:"tls_config,omitempty"`
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
}
PublicRestConfigClient is the struct that should be used when printing the config
func NewPublicRestConfigClient ¶
func NewPublicRestConfigClient(config *RestConfigClient) *PublicRestConfigClient
type RestConfigClient ¶
type RestConfigClient struct {
URL *common.URL `json:"url" yaml:"url"`
NativeAuth *api.Auth `json:"native_auth,omitempty" yaml:"native_auth,omitempty"`
OAuth *secret.OAuth `json:"oauth,omitempty" yaml:"oauth,omitempty"`
BasicAuth *secret.BasicAuth `json:"basic_auth,omitempty" yaml:"basic_auth,omitempty"`
// The HTTP authorization credentials for the targets.
Authorization *secret.Authorization `json:"authorization,omitempty" yaml:"authorization,omitempty"`
// TLSConfig to use to connect to the targets.
TLSConfig *secret.TLSConfig `json:"tls_config,omitempty" yaml:"tls_config,omitempty"`
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
}
RestConfigClient defines all parameters that can be set to customize the RESTClient
func (*RestConfigClient) Validate ¶ added in v0.49.0
func (c *RestConfigClient) Validate() error
Click to show internal directories.
Click to hide internal directories.