Documentation
¶
Index ¶
Constants ¶
const ( // BitwardenDefaultPrefix default prefix for BitwardenItem. BitwardenDefaultPrefix = "SSHKeys__" // BitwardenCommand base command for Bitwarden. BitwardenCommand = "bw" )
const ( // OnePasswordDefaultPrefix default prefix for OnePasswordItem. //nolint:gosec // not security issue. OnePasswordDefaultPrefix = "SSHKeys__" // OnePasswordCommand base command for OnePassword. OnePasswordCommand = "op" )
const (
// S3ProviderName is provider name for s3.
S3ProviderName = "s3"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitwarden ¶
Bitwarden for connection.
func (Bitwarden) Get ¶
func (b Bitwarden) Get(options GetOptions) (*Item, error)
Get gets Item from Bitwarden with given item name.
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 GetOptions ¶ added in v0.12.0
GetOptions is options for Get method.
type Interface ¶ added in v0.8.0
type Interface interface {
GetName() string
Add(item *Item) error
Get(options GetOptions) (*Item, error)
List(options ListOptions) ([]*Item, error)
}
Interface is an interface for all providers.
type Item ¶
type Item struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Values []Field `json:"value"`
Bucket *string
}
Item is a secure item of provider.
func (Item) EncodeValues ¶
EncodeValues encodes Values.
func (Item) MarshalValues ¶ added in v0.12.0
MarshalValues encodes the Values to JSON bytes.
type ItemAlreadyExistsError ¶ added in v0.9.0
type ItemAlreadyExistsError struct {
Name string
}
ItemAlreadyExistsError occurs when given item is not found in the provder.
func (ItemAlreadyExistsError) Error ¶ added in v0.9.0
func (e ItemAlreadyExistsError) Error() string
type ListOptions ¶ added in v0.12.0
type ListOptions struct {
Bucket *string
}
ListOptions is options for List method.
type OnePassword ¶
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(options GetOptions) (*Item, error)
Get gets Item from OnePassword with given item name.
func (OnePassword) GetName ¶ added in v0.8.0
func (o OnePassword) GetName() string
GetName returns name of the provider.
func (OnePassword) List ¶
func (o OnePassword) List(_ ListOptions) ([]*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.