Documentation ¶
Index ¶
- Variables
- type Config
- type SecretsService
- type Service
- func (s *Service) Close() error
- func (s *Service) DecryptPassphrase(ctx context.Context, encryptedPassphrase []byte) ([]byte, error)
- func (s *Service) EncryptPassphrase(ctx context.Context, passphrase []byte) ([]byte, error)
- func (s *Service) GenerateEncryptedPassphrase(ctx context.Context) ([]byte, error)
- func (s *Service) Initialize(ctx context.Context) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Error = errs.Class("kms")
Error is the default error class for the package.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SecretVersion string `` /* 140-byte string literal not displayed */ SecretChecksum int64 `help:"checksum of the master key in Google Secret Manager" default:"0"` TestMasterKey string `help:"a fake master key to be used for the purpose of testing" default:"test-master-key" hidden:"true"` }
Config is a configuration struct for secret management Service.
type SecretsService ¶
type SecretsService interface { // Initialize gets and validates the master key. Initialize(ctx context.Context) error // Close closes the service. Close() error // contains filtered or unexported methods }
SecretsService is a service for retrieving the master key.
architecture: Service
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a service for encrypting/decrypting project passphrases.
architecture: Service
func (*Service) DecryptPassphrase ¶
func (s *Service) DecryptPassphrase(ctx context.Context, encryptedPassphrase []byte) ([]byte, error)
DecryptPassphrase decrypts the provided encrypted passphrase using the masterKey.
func (*Service) EncryptPassphrase ¶
EncryptPassphrase encrypts the provided passphrase using the masterKey in an XSalsa20 and Poly1305 encryption.
func (*Service) GenerateEncryptedPassphrase ¶
GenerateEncryptedPassphrase generates a cryptographically random passphrase, returning its encrypted form.
Click to show internal directories.
Click to hide internal directories.