Documentation
¶
Overview ¶
Package kms provides a thin HTTP client for Hanzo KMS secret management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hydrate ¶
func Hydrate(cc *CachedClient, org *organization.Organization) error
Hydrate fetches all provider credentials from KMS and populates the org's integration fields. Missing secrets are silently skipped (not every org uses every provider). Only KMS communication failures are returned as errors.
Types ¶
type CachedClient ¶
type CachedClient struct {
// contains filtered or unexported fields
}
CachedClient wraps a KMS Client with a TTL cache.
func NewCachedClient ¶
func NewCachedClient(client *Client) *CachedClient
NewCachedClient creates a CachedClient wrapping the given KMS Client.
func (*CachedClient) Client ¶
func (cc *CachedClient) Client() *Client
Client returns the underlying KMS client (for write operations like SetSecret).
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a thin HTTP client wrapping the KMS REST API.
func (*Client) GetSecretRaw ¶
GetSecretRaw fetches a secret from KMS by path and name.
type Config ¶
type Config struct {
Enabled bool
URL string
ClientID string
ClientSecret string
ProjectID string
Environment string
}
Config holds KMS client configuration.
type StatusError ¶ added in v1.46.44
type StatusError struct {
Op string // operation, e.g. "get secret"
Code int // HTTP status code
Body string // response body (may carry KMS error detail)
}
StatusError is returned when KMS responds with a non-success HTTP status. It carries the status code so callers branch on it with errors.As instead of string-matching the message (e.g. a 404/400 = secret absent).
func (*StatusError) Error ¶ added in v1.46.44
func (e *StatusError) Error() string