Documentation
¶
Index ¶
- type Registry
- type SecretLookup
- type Service
- func (s *Service) Expand(ctx context.Context, input string, secrets map[secret.Key]secret.Resource) (string, error)
- func (s *Service) GetCredentials(ctx context.Context, resource string) (*cred.Generic, error)
- func (s *Service) GeyKey(ctx context.Context, resource string) (*cred.SecretKey, error)
- func (s *Service) HasCredentialMap() bool
- func (s *Service) Lookup(ctx context.Context, resource secret.Resource) (*scy.Secret, error)
- func (s *Service) ResolveAlias(alias string) (string, error)
- func (s *Service) SetCredentialMap(m map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maps credential aliases to secret URLs (for example op:// references). The map is populated from the root workflow's credentialMap; it is empty until Set is called.
type SecretLookup ¶
type SecretLookup interface {
Lookup(ctx context.Context, resource secret.Resource) (*scy.Secret, error)
Expand(ctx context.Context, input string, secrets map[secret.Key]secret.Resource) (string, error)
GetCredentials(ctx context.Context, resource string) (*cred.Generic, error)
GeyKey(ctx context.Context, resource string) (*cred.SecretKey, error)
}
SecretLookup is the secret surface used by endly workflow context.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service wraps scy secret lookup with e2e alias resolution.
func NewService ¶
NewService creates a secret service that resolves e2e credential aliases before lookup.
func (*Service) Expand ¶
func (s *Service) Expand(ctx context.Context, input string, secrets map[secret.Key]secret.Resource) (string, error)
Expand expands secret placeholders after resolving configured aliases.
func (*Service) GetCredentials ¶
GetCredentials returns credentials for resource after alias resolution.
func (*Service) HasCredentialMap ¶
HasCredentialMap reports whether a credential map has been registered.
func (*Service) ResolveAlias ¶
ResolveAlias returns the mapped URL for alias, or the alias unchanged when unmapped.
func (*Service) SetCredentialMap ¶
SetCredentialMap registers alias → URL mappings from the root workflow credentialMap.