Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface {
SendRequest(ctx context.Context, method string, url string, body Data, headers Data, tlsConfig *TLSConfigData) (resp HttpDetails, err error)
}
Client is the interface to interact with Http
type Data ¶ added in v1.0.0
type Data struct {
Encrypted interface{} // Data containing encrypted data -> to be shown at the status
Decrypted interface{} // Data containing sensitive data -> to be sent
}
type HttpDetails ¶
type HttpDetails struct {
HttpResponse HttpResponse
HttpRequest HttpRequest
}
type HttpRequest ¶
type HttpResponse ¶
type HttpResponse struct {
Body string `json:"body"`
Headers map[string][]string `json:"headers"`
StatusCode int `json:"statusCode"`
}
func (*HttpResponse) GetBody ¶ added in v1.0.12
func (r *HttpResponse) GetBody() string
GetBody returns the response body.
func (*HttpResponse) GetHeaders ¶ added in v1.0.12
func (r *HttpResponse) GetHeaders() map[string][]string
GetHeaders returns the response headers.
func (*HttpResponse) GetStatusCode ¶ added in v1.0.12
func (r *HttpResponse) GetStatusCode() int
GetStatusCode returns the HTTP status code.
type TLSConfigData ¶ added in v1.0.12
type TLSConfigData struct {
// CABundle contains PEM encoded CA certificates
CABundle []byte
// ClientCert contains PEM encoded client certificate
ClientCert []byte
// ClientKey contains PEM encoded client private key
ClientKey []byte
// InsecureSkipVerify controls whether to skip TLS verification
InsecureSkipVerify bool
}
TLSConfigData contains the TLS configuration data loaded from secrets or inline.
func LoadTLSConfig ¶ added in v1.0.12
func LoadTLSConfig(ctx context.Context, kubeClient kube.Client, tlsConfig *common.TLSConfig) (*TLSConfigData, error)
LoadTLSConfig loads TLS configuration from secrets and returns TLSConfigData
Click to show internal directories.
Click to hide internal directories.