pdu_credential_store

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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 Device struct {
	Xname    string `json:"xname"`
	URL      string `json:"url"`
	Username string `json:"username"`
	Password string `json:"password"`
}

func (Device) String

func (device Device) 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 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL