Documentation ¶
Index ¶
- Constants
- type DefaultCredential
- type Device
- type PDUCredentialStore
- func (credStore *PDUCredentialStore) GetDefaultPDUCredentails() (cred DefaultCredential, err error)
- func (credStore *PDUCredentialStore) SetKeypathValue(data map[string]interface{}) (err error)
- func (credStore *PDUCredentialStore) StoreDefaultPDUCredentails(cred DefaultCredential) error
- func (credStore *PDUCredentialStore) StorePDUCredentails(cred Device) error
Constants ¶
View Source
const CredentialsGlobalKey = "global/pdu"
CredentialsGlobalKey is the Vault key used to access RTS global credentials
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultCredential ¶
type DefaultCredential struct { Username string `json:"username"` Password string `json:"password"` }
func (DefaultCredential) String ¶
func (cred DefaultCredential) String() string
Due to the sensitive nature of the data in Device, make a custom String function to prevent passwords from being printed directly (accidentally) to output.
type Device ¶
type PDUCredentialStore ¶
type PDUCredentialStore struct { KeyPath string SecureStorage securestorage.SecureStorage }
func NewPDUCredStore ¶
func NewPDUCredStore(keyPath string, ss securestorage.SecureStorage) *PDUCredentialStore
func (*PDUCredentialStore) GetDefaultPDUCredentails ¶
func (credStore *PDUCredentialStore) GetDefaultPDUCredentails() (cred DefaultCredential, err error)
func (*PDUCredentialStore) SetKeypathValue ¶
func (credStore *PDUCredentialStore) SetKeypathValue(data map[string]interface{}) (err error)
func (*PDUCredentialStore) StoreDefaultPDUCredentails ¶
func (credStore *PDUCredentialStore) StoreDefaultPDUCredentails(cred DefaultCredential) error
func (*PDUCredentialStore) StorePDUCredentails ¶
func (credStore *PDUCredentialStore) StorePDUCredentails(cred Device) error
Click to show internal directories.
Click to hide internal directories.