Documentation ¶
Index ¶
- Variables
- func BuildRequest(uri, host string) *retryablehttp.Request
- func DoRequest(client *retryablehttp.Client, req *retryablehttp.Request) (*http.Response, error)
- func Fetch(uri, host, profile string, client *retryablehttp.Client) func() ([]byte, error)
- func RemoveHost(w http.ResponseWriter, r *http.Request)
- func TestConn(w http.ResponseWriter, r *http.Request)
- type ChassisCredentials
- type Credential
- type CredentialProfilesFlag
- type Handler
- type IgnoredDevice
- type ProfileFlag
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ChassisCreds = ChassisCredentials{ Creds: make(map[string]*Credential), Profiles: make(map[string]*fishy_vault.SecretProperties), } )
View Source
var (
ErrInvalidCredential = errors.New("invalid credential")
)
View Source
var (
IgnoredDevices = make(map[string]IgnoredDevice)
)
Functions ¶
func BuildRequest ¶
func BuildRequest(uri, host string) *retryablehttp.Request
func RemoveHost ¶
func RemoveHost(w http.ResponseWriter, r *http.Request)
Types ¶
type ChassisCredentials ¶
type ChassisCredentials struct { Creds map[string]*Credential Profiles map[string]*fishy_vault.SecretProperties DefaultProfile string Vault *fishy_vault.Vault // contains filtered or unexported fields }
func (*ChassisCredentials) Get ¶
func (c *ChassisCredentials) Get(key string) (*Credential, bool)
func (*ChassisCredentials) GetCredentials ¶
func (c *ChassisCredentials) GetCredentials(ctx context.Context, profile, target string) (*Credential, error)
func (*ChassisCredentials) Set ¶
func (c *ChassisCredentials) Set(key string, value *Credential)
type Credential ¶
type CredentialProfilesFlag ¶
type CredentialProfilesFlag struct {
Profiles []ProfileFlag `json:"profiles" yaml:"profiles"`
}
func CredentialProf ¶
func CredentialProf(s *kingpin.FlagClause) (target *CredentialProfilesFlag)
func (*CredentialProfilesFlag) Set ¶
func (cp *CredentialProfilesFlag) Set(value string) error
func (*CredentialProfilesFlag) String ¶
func (c *CredentialProfilesFlag) String() string
type IgnoredDevice ¶
type ProfileFlag ¶
type ProfileFlag struct { Name string `json:"name" yaml:"name"` MountPath string `json:"mountPath" yaml:"mountPath"` Path string `json:"path" yaml:"path"` UserField string `json:"userField,omitempty" yaml:"userField,omitempty"` PasswordField string `json:"passwordField" yaml:"passwordField"` SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"` UserName string `json:"userName,omitempty" yaml:"userName,omitempty"` }
Click to show internal directories.
Click to hide internal directories.