config

package
v0.52.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 6

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

func NewRoundTripper(timeout time.Duration, tlsConfig *secret.TLSConfig) (http.RoundTripper, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL