device42

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DoRequestError = "error: do request: %w"
)

Variables

This section is empty.

Functions

func ReadAndUnmarshal

func ReadAndUnmarshal(resp *http.Response, target any) error

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(baseURL, username, password, hostPort string) *API

func (*API) GetSecret

func (api *API) GetSecret(secretID string) (D42Password, error)

func (*API) GetSecretMap

func (api *API) GetSecretMap(_ context.Context, _ esv1beta1.ExternalSecretDataRemoteRef) (map[string][]byte, error)

type Client

type Client interface {
	GetSecret(secretID string) (D42Password, error)
}

type D42Password

type D42Password struct {
	Password string `json:"password"`
	ID       int    `json:"id"`
}

func (D42Password) ToMap

func (s D42Password) ToMap() map[string][]byte

type D42PasswordResponse

type D42PasswordResponse struct {
	Passwords []D42Password
}

type Device42

type Device42 struct {
	// contains filtered or unexported fields
}

Device42 Provider struct with reference to a Device42 client.

func NewDevice42Provider

func NewDevice42Provider() *Device42

NewDevice42Provider returns a reference to a new instance of a 'Device42' struct.

func (*Device42) Capabilities

func (p *Device42) Capabilities() esv1beta1.SecretStoreCapabilities

func (*Device42) Close

func (p *Device42) Close(_ context.Context) error

func (*Device42) DeleteSecret

func (*Device42) GetAllSecrets

func (p *Device42) GetAllSecrets(_ context.Context, _ esv1beta1.ExternalSecretFind) (map[string][]byte, error)

func (*Device42) GetSecret

func (*Device42) GetSecretMap

func (p *Device42) GetSecretMap(_ context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) (map[string][]byte, error)

func (*Device42) NewClient

func (p *Device42) NewClient(ctx context.Context, store esv1beta1.GenericStore, kube kclient.Client, namespace string) (esv1beta1.SecretsClient, error)

func (*Device42) PushSecret

func (*Device42) SecretExists

func (p *Device42) SecretExists(_ context.Context, _ esv1beta1.PushSecretRemoteRef) (bool, error)

func (*Device42) Validate

func (p *Device42) Validate() (esv1beta1.ValidationResult, error)

func (*Device42) ValidateStore

func (p *Device42) ValidateStore(esv1beta1.GenericStore) (admission.Warnings, error)

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type Provider

type Provider struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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