Documentation
¶
Overview ¶
Package secrets emulates Secret Manager (secretmanager.googleapis.com v1) over gRPC and REST on the gateway: global and regional secrets, versions and their payloads, version aliases, expiry, delayed version destruction, rotation notifications to Pub/Sub topics, managed rotation of Cloud SQL credentials, and secret IAM policies. Time-driven behaviour follows the Emulator clock (lifecycle.go). Replication policies and customer-managed encryption are Recorded.
Index ¶
- func New(env *emu.Env) emu.Service
- type Service
- func (s *Service) AccessSecretVersion(ctx context.Context, name string) ([]byte, string, error)
- func (s *Service) ApplySeed(ctx context.Context, section *yaml.Node, baseDir string) error
- func (s *Service) ClockAdvanced(ctx context.Context) error
- func (s *Service) EnvVars(gw string, endpoints map[string]string) map[string]string
- func (s *Service) Name() string
- func (s *Service) Ready() error
- func (s *Service) Register(r emu.Router) error
- func (s *Service) ResourceCounts() map[string]int
- func (s *Service) Start(ctx context.Context) error
- func (s *Service) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the secrets service module.
func (*Service) AccessSecretVersion ¶
AccessSecretVersion implements emu.SecretAccessor.
func (*Service) ApplySeed ¶
ApplySeed creates the seeded secrets (or updates their labels) and adds their missing versions. It is idempotent.
func (*Service) ClockAdvanced ¶
ClockAdvanced applies what became due before returning.
func (*Service) EnvVars ¶
EnvVars implements emu.EnvVarer (FR-CORE-004): the gcloud endpoint override for `gcloud secrets`.
func (*Service) Register ¶
Register installs the gRPC service and the REST surface, on the global and every regional hostname.
func (*Service) ResourceCounts ¶
ResourceCounts implements emu.ResourceCounter.