Documentation
¶
Overview ¶
could do conditional linux build, but no actual hard linux dependencies
Index ¶
- Constants
- func GetDefaultPath() (string, error)
- func GetSecureSetting(key string) (string, *errors.ApiError)
- func ReadFileInDefaultPath(fileName string) (string, error)
- func StoreSecureSetting(key string, val string, sType string) *errors.ApiError
- func ValidateCredentialStore(st string) *errors.ApiError
- type NoneStore
- func (s *NoneStore) Delete(key string) *errors.ApiError
- func (s *NoneStore) Get(key string, outSecret interface{}) *errors.ApiError
- func (s *NoneStore) List(prefix string) ([]string, *errors.ApiError)
- func (s *NoneStore) Store(key string, secret interface{}) *errors.ApiError
- func (s *NoneStore) StoreString(key string, data string) *errors.ApiError
- func (s *NoneStore) Wipe(prefix string) *errors.ApiError
- type Store
Constants ¶
View Source
const ( Unset = "" None = "none" PassLinux = "pass_linux" WinCred = "wincred" File = "file" )
Supported store types.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultPath ¶
GetDefaultPath retrieves an OS-independent default path for secrets, tokens, encrypted key files. By default, it is /home/{username}/.thy/.
func ReadFileInDefaultPath ¶
ReadFileInDefaultPath attempts to read a file in a store path. If the store path is not found, then the default thy directory is searched for a given file.
func StoreSecureSetting ¶
func ValidateCredentialStore ¶
Types ¶
type Store ¶
type Store interface {
Store(key string, secret interface{}) *errors.ApiError
StoreString(key string, data string) *errors.ApiError
Get(key string, outSecret interface{}) *errors.ApiError
Delete(key string) *errors.ApiError
Wipe(prefix string) *errors.ApiError
List(prefix string) ([]string, *errors.ApiError)
}
Store interface provides common methods for storing data.
func NewFileStore ¶
func NewPassStore ¶
func NewPassStore() Store
func NewSecureStore ¶
func NewSecureStore(internalStore ch.StoreHelper) Store
func NewWinStore ¶
func NewWinStore() Store
Source Files
¶
Click to show internal directories.
Click to hide internal directories.