httpstore

package
v0.0.0-...-9009645 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient struct {
	URL          string            `yaml:"url,omitempty" json:"url,omitempty"`
	Headers      map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"`
	HeaderSecret string            `yaml:"headerSecret,omitempty" json:"headerSecret,omitempty"`
	Template     string            `yaml:"template,omitempty" json:"template,omitempty"`
	Method       string            `yaml:"method,omitempty" json:"method,omitempty"`

	SuccessCodes []int `yaml:"successCodes,omitempty" json:"successCodes,omitempty"`
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *HTTPClient) (*HTTPClient, error)

func (*HTTPClient) ApplyTemplate

func (h *HTTPClient) ApplyTemplate(secrets []byte) (string, error)

ApplyTemplate applies the configured template to the secret data

func (*HTTPClient) Close

func (h *HTTPClient) Close() error

Close closes the HTTP client

func (*HTTPClient) DeepCopy

func (in *HTTPClient) DeepCopy() *HTTPClient

func (*HTTPClient) DeepCopyInto

func (in *HTTPClient) DeepCopyInto(out *HTTPClient)

DeepCopyInto copies all properties from this object into another object of the same type

func (*HTTPClient) DeleteSecret

func (h *HTTPClient) DeleteSecret(ctx context.Context, path string) error

DeleteSecret deletes a secret from the HTTP URL

func (*HTTPClient) Driver

func (h *HTTPClient) Driver() driver.DriverName

Driver returns the driver name

func (*HTTPClient) GetPath

func (h *HTTPClient) GetPath() string

GetPath returns the path

func (*HTTPClient) GetSecret

func (h *HTTPClient) GetSecret(ctx context.Context, path string) ([]byte, error)

GetSecret retrieves a secret from the HTTP URL

func (*HTTPClient) Init

func (h *HTTPClient) Init(ctx context.Context) error

Init initializes the HTTP client

func (*HTTPClient) ListSecrets

func (h *HTTPClient) ListSecrets(ctx context.Context, path string) ([]string, error)

ListSecrets lists secrets from the HTTP URL

func (*HTTPClient) Meta

func (h *HTTPClient) Meta() map[string]any

Meta returns metadata for the HTTP client

func (*HTTPClient) SetDefaults

func (h *HTTPClient) SetDefaults(cfg any) error

SetDefaults sets default values for the HTTP client

func (*HTTPClient) Validate

func (h *HTTPClient) Validate() error

Validate the HTTP client configuration

func (*HTTPClient) WriteSecret

func (h *HTTPClient) WriteSecret(ctx context.Context, meta metav1.ObjectMeta, path string, secrets []byte) ([]byte, error)

WriteSecret writes a secret to the HTTP URL

Jump to

Keyboard shortcuts

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