Documentation
¶
Index ¶
- func AADJSONFromContext(ctx context.Context) []byte
- func BytesToKeyHandle(b []byte) (*keyset.Handle, error)
- func Close() error
- func ContextWithAAD(ctx context.Context, aad AAD) context.Context
- func Initialize(ctx context.Context, kekResource, dekResource string, opts ...ManagerOption) error
- func JSONToKeyHandle(b []byte) (*keyset.Handle, error)
- func KeyHandleToBytes(kh *keyset.Handle) ([]byte, error)
- func KeyHandleToJSON(kh *keyset.Handle) ([]byte, error)
- func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error)
- func RandomBytes(n int) []byte
- func Unseal(ctx context.Context, sealed *Sealed) ([]byte, error)
- type AAD
- type KMS
- type Manager
- type ManagerOption
- type Sealed
- type SecretManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AADJSONFromContext ¶
func Initialize ¶
func Initialize(ctx context.Context, kekResource, dekResource string, opts ...ManagerOption) error
func ParseCertsPEM ¶
func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error)
func RandomBytes ¶
Types ¶
type ManagerOption ¶
type ManagerOption func(*Manager)
func WithSealedTimestamp ¶
func WithSealedTimestamp() ManagerOption
type Sealed ¶
type Sealed struct {
Blob []byte `json:"blob"`
DEK []byte `json:"dek"`
DEKVersion string `json:"dek_version"`
KEKVersion string `json:"kek_version"`
Timestamp *time.Time `json:"timestamp"`
}
func UnmarshalSealed ¶
type SecretManager ¶
type SecretManager struct {
// contains filtered or unexported fields
}
func NewSecretManager ¶
func NewSecretManager(ctx context.Context, projectID string) (*SecretManager, error)
func (*SecretManager) Close ¶
func (m *SecretManager) Close()
func (*SecretManager) FetchSecret ¶
Click to show internal directories.
Click to hide internal directories.