Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoToken = errors.New("no token")
Functions ¶
This section is empty.
Types ¶
type Encryption ¶
type Encryption struct {
// contains filtered or unexported fields
}
func NewEnc ¶
func NewEnc(fs filesys.FileSystem) *Encryption
func (*Encryption) DecryptAtRest ¶
func (enc *Encryption) DecryptAtRest(path string, keyString string) ([]byte, error)
func (*Encryption) EncryptAtRest ¶
func (enc *Encryption) EncryptAtRest(path string, data []byte, keyString string) error
type EnvTokenReader ¶
type EnvTokenReader struct {
// contains filtered or unexported fields
}
func NewEnvTokenReader ¶
func NewEnvTokenReader() EnvTokenReader
func (EnvTokenReader) AccessToken ¶
func (e EnvTokenReader) AccessToken() (string, error)
func (EnvTokenReader) Salt ¶
func (e EnvTokenReader) Salt() (string, error)
type SecretFetchOptions ¶
type ServicePrincipal ¶
type ServicePrincipal struct {
TenantId string
ClientId string
ClientSecret string
// contains filtered or unexported fields
}
func NewServicePrincipalFromEnv ¶
func NewServicePrincipalFromEnv(configDir string, opts ...SpOption) (ServicePrincipal, error)
func (ServicePrincipal) AccessToken ¶
func (sp ServicePrincipal) AccessToken() (string, error)
func (ServicePrincipal) Salt ¶
func (sp ServicePrincipal) Salt() (string, error)
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func NewSourceOrDie ¶
func NewSourceOrDie(cnfDir string, tokenSrc TokenSource, enc *Encryption) Source
type SpOption ¶
type SpOption func(sp *ServicePrincipal)
func WithEncryption ¶
func WithEncryption(enc *Encryption) SpOption
type TokenResponse ¶
type TokenResponse struct {
TokenType string `json:"token_type"`
ExpiresIn string `json:"expires_in"`
ExtExpiresIn string `json:"ext_expires_in"`
ExpiresOn string `json:"expires_on"`
NotBefore string `json:"not_before"`
Resource string `json:"resource"`
Scope string `json:"scope"`
AccessToken string `json:"access_token"`
}
type TokenSource ¶
type VaultSecret ¶
type VaultSecret struct {
Value string `json:"value"`
ID string `json:"id"`
Attributes VaultSecretAttributes `json:"attributes"`
Tags map[string]string `json:"tags"`
}
Click to show internal directories.
Click to hide internal directories.