Documentation
¶
Index ¶
- type CredentialManager
- func (cm *CredentialManager) DeleteCredentials(ctx context.Context, tenantID uuid.UUID, sourceID string) error
- func (cm *CredentialManager) GetAllCredentials(ctx context.Context, tenantID uuid.UUID, sourceID string) (map[string]string, error)
- func (cm *CredentialManager) GetCredential(ctx context.Context, tenantID uuid.UUID, sourceID string, credType string) (string, error)
- func (cm *CredentialManager) StoreCredential(ctx context.Context, tenantID uuid.UUID, sourceID string, credType string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialManager ¶
type CredentialManager struct {
// contains filtered or unexported fields
}
CredentialManager handles encryption and storage of tenant credentials
func NewCredentialManager ¶
func NewCredentialManager(db *sqlx.DB, masterKey []byte) *CredentialManager
NewCredentialManager creates a new credential manager masterKey must be exactly 32 bytes for AES-256
func (*CredentialManager) DeleteCredentials ¶
func (cm *CredentialManager) DeleteCredentials(ctx context.Context, tenantID uuid.UUID, sourceID string) error
DeleteCredentials removes all credentials for a source
func (*CredentialManager) GetAllCredentials ¶
func (cm *CredentialManager) GetAllCredentials(ctx context.Context, tenantID uuid.UUID, sourceID string) (map[string]string, error)
GetAllCredentials retrieves and decrypts all credentials for a source
Click to show internal directories.
Click to hide internal directories.