Documentation
¶
Index ¶
Constants ¶
View Source
const ( // BitwardenDefaultPrefix default prefix for BitwardenItem. BitwardenDefaultPrefix = "SSHKeys__" // BitwardenCommand base command for Bitwarden. BitwardenCommand = "bw" )
View Source
const ( // OnePasswordDefaultPrefix default prefix for OnePasswordItem. //nolint:gosec // not security issue. OnePasswordDefaultPrefix = "SSHKeys__" // OnePasswordCommand base command for OnePassword. OnePasswordCommand = "op" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIInterface ¶
type APIInterface interface {
Add(item *Item) error
Get(name string) (Item, error)
List() ([]Item, error)
}
APIInterface is an interface for all providers.
type Bitwarden ¶
type Bitwarden struct {
Commander Commander
}
Bitwarden for connection.
type BitwardenItem ¶
type BitwardenItem struct {
ID *string `json:"id"`
Type int `json:"type"`
Name string `json:"name"`
Notes string `json:"notes"`
Login string `json:"login"`
}
BitwardenItem is item adapter for provider Item.
type ExecutionFailedError ¶
ExecutionFailedError occurs when an execution fails.
func (ExecutionFailedError) Error ¶
func (e ExecutionFailedError) Error() string
type Item ¶
type Item struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Values []Field `json:"value"`
}
Item is a secure item of provider.
func (Item) EncodeValues ¶
EncodeValues encodes Values.
type ItemAlreadyExists ¶
type ItemAlreadyExists struct {
Name string
}
ItemAlreadyExists occurs when given item is not found in the provder.
func (ItemAlreadyExists) Error ¶
func (e ItemAlreadyExists) Error() string
type OnePassword ¶
type OnePassword struct {
Commander Commander
}
OnePassword for connection.
func (OnePassword) Add ¶
func (o OnePassword) Add(item *Item) error
Add adds given item to OnePassword.
func (OnePassword) Get ¶
func (o OnePassword) Get(name string) (Item, error)
Get gets Item from OnePassword with given item name.
func (OnePassword) List ¶
func (o OnePassword) List() ([]Item, error)
List lists all added SSH keys.
type OnePasswordItem ¶
type OnePasswordItem struct {
UUID *string `json:"uuid"`
Details OnePasswordItemDetails `json:"details"`
Overview OnePasswordItemOverview `json:"overview"`
}
OnePasswordItem is item adapter for provider OnePasswordItem.
type OnePasswordItemDetails ¶
type OnePasswordItemDetails struct {
NotesPlain *string `json:"notesPlain"`
}
OnePasswordItemDetails is item adapter for provider Item.
type OnePasswordItemOverview ¶
type OnePasswordItemOverview struct {
Title *string `json:"title"`
}
OnePasswordItemOverview is item adapter for provider OnePasswordItem.
Click to show internal directories.
Click to hide internal directories.