Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONFileManager ¶ added in v1.13.6
type JSONFileManager struct {
// contains filtered or unexported fields
}
JSONFileManager holds a local copy of all secrets (settings & S2S tokens).
func CreateNewJSONFileManager ¶ added in v1.13.6
func CreateNewJSONFileManager(path string) (*JSONFileManager, error)
CreateNewJSONFileManager creates a new secret manager hooked up to Viper.
func (JSONFileManager) DoesTokenExist ¶ added in v1.13.6
func (s JSONFileManager) DoesTokenExist(reqToken string) bool
DoesTokenExist checks if a token is present in the secret manager.
func (JSONFileManager) GetSetting ¶ added in v1.13.6
func (s JSONFileManager) GetSetting(key string) (string, error)
GetSetting gets a setting from the secret manager.
func (*JSONFileManager) SyncSecrets ¶ added in v1.13.6
func (s *JSONFileManager) SyncSecrets() error
SyncSecrets syncs all the available tokens from env and saves them to local state.
type LocalSecretManager ¶
type LocalSecretManager struct{}
LocalSecretManager is just a struct.
func CreateNewLocalSecretManager ¶
func CreateNewLocalSecretManager() *LocalSecretManager
CreateNewLocalSecretManager creates a new secret manager hooked up to Viper.
func (LocalSecretManager) DoesTokenExist ¶ added in v1.10.0
func (s LocalSecretManager) DoesTokenExist(reqToken string) bool
DoesTokenExist checks if a token is present in the secret manager.
func (LocalSecretManager) GetSetting ¶
func (s LocalSecretManager) GetSetting(key string) (string, error)
GetSetting gets a setting from Viper.
type SecretManager ¶
SecretManager is a interface that describes how we want to use secrets.