Documentation
¶
Index ¶
- type DSM
- func (dsm *DSM) Close(ctx context.Context) error
- func (dsm *DSM) FetchSecrets() (respObj IsoDappResponse, err error)
- func (dsm *DSM) GetAllSecrets(ctx context.Context, ref esv1beta1.ExternalSecretFind) (secretData map[string][]byte, err error)
- func (dsm *DSM) GetSecret(ctx context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) (resp []byte, err error)
- func (dsm *DSM) GetSecretMap(ctx context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) (secretData map[string][]byte, err error)
- func (dsm *DSM) Validate() (esv1beta1.ValidationResult, error)
- type IsoDappResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DSM ¶
type DSM struct {
// contains filtered or unexported fields
}
DSM service for SenhaseguraProvider.
func New ¶
func New(isoSession *senhaseguraAuth.SenhaseguraIsoSession) (*DSM, error)
New creates an senhasegura DSM client based on ISO session.
func (*DSM) FetchSecrets ¶
func (dsm *DSM) FetchSecrets() (respObj IsoDappResponse, err error)
fetchSecrets calls senhasegura DSM /iso/dapp/application API endpoint Return an IsoDappResponse with all related information from senhasegura provider with DSM service and error.
func (*DSM) GetAllSecrets ¶
func (dsm *DSM) GetAllSecrets(ctx context.Context, ref esv1beta1.ExternalSecretFind) (secretData map[string][]byte, err error)
GetAllSecrets implements ESO interface and returns multiple secrets from senhasegura provider with DSM service
TODO: GetAllSecrets functionality is to get secrets from either regexp-matching against the names or via metadata label matching. https://github.com/external-secrets/external-secrets/pull/830#discussion_r858657107
func (*DSM) GetSecret ¶
func (dsm *DSM) GetSecret(ctx context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) (resp []byte, err error)
GetSecret implements ESO interface and get a single secret from senhasegura provider with DSM service.
func (*DSM) GetSecretMap ¶
func (dsm *DSM) GetSecretMap(ctx context.Context, ref esv1beta1.ExternalSecretDataRemoteRef) (secretData map[string][]byte, err error)
GetSecretMap implements ESO interface and returns miltiple k/v pairs from senhasegura provider with DSM service.
func (*DSM) Validate ¶
func (dsm *DSM) Validate() (esv1beta1.ValidationResult, error)
Validate if has valid connection with senhasegura, credentials, authorization using fetchSecrets method fetchSecrets method implement required check about request https://github.com/external-secrets/external-secrets/pull/830#discussion_r833275463
type IsoDappResponse ¶
type IsoDappResponse struct { Response struct { Status int `json:"status"` Message string `json:"message"` Error bool `json:"error"` ErrorCode int `json:"error_code"` } `json:"response"` Application struct { Name string `json:"name"` Description string `json:"description"` Tags []string `json:"tags"` System string `json:"system"` Environment string `json:"Environment"` Secrets []struct { SecretID string `json:"secret_id"` SecretName string `json:"secret_name"` Identity string `json:"identity"` Version string `json:"version"` ExpirationDate string `json:"expiration_date"` Engine string `json:"engine"` Data []map[string]string `json:"data"` } `json:"secrets"` } `json:"application"` }
IsoDappResponse is a response object from senhasegura /iso/dapp/response (DevOps Secrets Management API endpoint) Contains information about API request and Secrets linked with authorization.