Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func ReadAndUnmarshal(resp *http.Response, target any) error
- type API
- type AccessData
- type Client
- type DatabaseEntries
- type Databases
- type Entry
- type HTTPClient
- type PasswordDepot
- func (p *PasswordDepot) Capabilities() esv1beta1.SecretStoreCapabilities
- func (p *PasswordDepot) Close(_ context.Context) error
- func (p *PasswordDepot) DeleteSecret(_ context.Context, _ esv1beta1.PushSecretRemoteRef) error
- func (p *PasswordDepot) GetAllSecrets(_ context.Context, _ esv1beta1.ExternalSecretFind) (map[string][]byte, error)
- func (p *PasswordDepot) GetSecret(_ context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) ([]byte, error)
- func (p *PasswordDepot) GetSecretMap(_ context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) (map[string][]byte, error)
- func (p *PasswordDepot) NewClient(ctx context.Context, store esv1beta1.GenericStore, kube kclient.Client, ...) (esv1beta1.SecretsClient, error)
- func (p *PasswordDepot) PushSecret(_ context.Context, _ *corev1.Secret, _ esv1beta1.PushSecretData) error
- func (p *PasswordDepot) SecretExists(_ context.Context, _ esv1beta1.PushSecretRemoteRef) (bool, error)
- func (p *PasswordDepot) Validate() (esv1beta1.ValidationResult, error)
- func (p *PasswordDepot) ValidateStore(esv1beta1.GenericStore) (admission.Warnings, error)
- type Provider
- type SecretEntry
Constants ¶
const (
DoRequestError = "error: do request: %w"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) ListDatabases ¶
func (*API) ListSecrets ¶
func (api *API) ListSecrets(dbFingerprint, folder string) (DatabaseEntries, error)
type AccessData ¶
type Client ¶
type Client interface {
GetSecret(database, key string) (SecretEntry, error)
}
type DatabaseEntries ¶
type Databases ¶
type Databases struct { Databases []struct { Name string `json:"name"` Fingerprint string `json:"fingerprint"` Date time.Time `json:"date"` Rights string `json:"rights"` Reasondelete string `json:"reasondelete"` } `json:"databases"` Infoclasses string `json:"infoclasses"` Policyforce string `json:"policyforce"` Policyminlength string `json:"policyminlength"` Policyincludeatleast string `json:"policyincludeatleast"` Policymingroups string `json:"policymingroups"` Policyselectedgroups string `json:"policyselectedgroups"` }
type Entry ¶
type Entry struct { Name string `json:"name"` Login string `json:"login"` Password string `json:"pass"` URL string `json:"url"` Importance string `json:"importance"` Date time.Time `json:"date"` Icon string `json:"icon"` Secondeye string `json:"secondeye"` Fingerprint string `json:"fingerprint"` Rights string `json:"rights"` Itemclass string `json:"itemclass"` }
type PasswordDepot ¶
type PasswordDepot struct {
// contains filtered or unexported fields
}
PasswordDepot Provider struct with reference to a PasswordDepot client and a projectID.
func NewPasswordDepotProvider ¶
func NewPasswordDepotProvider() *PasswordDepot
Function newPasswordDepotProvider returns a reference to a new instance of a 'PasswordDepot' struct.
func (*PasswordDepot) Capabilities ¶
func (p *PasswordDepot) Capabilities() esv1beta1.SecretStoreCapabilities
func (*PasswordDepot) DeleteSecret ¶
func (p *PasswordDepot) DeleteSecret(_ context.Context, _ esv1beta1.PushSecretRemoteRef) error
func (*PasswordDepot) GetAllSecrets ¶
func (p *PasswordDepot) GetAllSecrets(_ context.Context, _ esv1beta1.ExternalSecretFind) (map[string][]byte, error)
func (*PasswordDepot) GetSecret ¶
func (p *PasswordDepot) GetSecret(_ context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) ([]byte, error)
func (*PasswordDepot) GetSecretMap ¶
func (p *PasswordDepot) GetSecretMap(_ context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) (map[string][]byte, error)
func (*PasswordDepot) NewClient ¶
func (p *PasswordDepot) NewClient(ctx context.Context, store esv1beta1.GenericStore, kube kclient.Client, namespace string) (esv1beta1.SecretsClient, error)
Method on PasswordDepot Provider to set up client with credentials and populate projectID.
func (*PasswordDepot) PushSecret ¶
func (p *PasswordDepot) PushSecret(_ context.Context, _ *corev1.Secret, _ esv1beta1.PushSecretData) error
func (*PasswordDepot) SecretExists ¶
func (p *PasswordDepot) SecretExists(_ context.Context, _ esv1beta1.PushSecretRemoteRef) (bool, error)
func (*PasswordDepot) Validate ¶
func (p *PasswordDepot) Validate() (esv1beta1.ValidationResult, error)
func (*PasswordDepot) ValidateStore ¶
func (p *PasswordDepot) ValidateStore(esv1beta1.GenericStore) (admission.Warnings, error)
type SecretEntry ¶
type SecretEntry struct { Name string `json:"name"` Fingerprint string `json:"fingerprint"` Itemclass string `json:"itemclass"` Login string `json:"login"` Pass string `json:"pass"` URL string `json:"url"` Importance string `json:"importance"` Date time.Time `json:"date"` Comment string `json:"comment"` Expirydate string `json:"expirydate"` Tags string `json:"tags"` Author string `json:"author"` Category string `json:"category"` Icon string `json:"icon"` Secondeye string `json:"secondeye"` Secondpass string `json:"secondpass"` Template string `json:"template"` Acm string `json:"acm"` Paramstr string `json:"paramstr"` Loginid string `json:"loginid"` Passid string `json:"passid"` Donotaddon string `json:"donotaddon"` Markassafe string `json:"markassafe"` Safemode string `json:"safemode"` }
func (SecretEntry) ToMap ¶
func (s SecretEntry) ToMap() map[string][]byte