credentials

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCredentialsExist = Error{
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Name       string  `msgpack:"name"`
	UserName   string  `msgpack:"username"`
	Host       string  `msgpack:"host"`
	Port       int     `msgpack:"port"`
	Password   *string `msgpack:"password,omitempty"`
	Key        []byte  `msgpack:"key,omitempty"`
	Passphrase []byte  `msgpack:"passphrase,omitempty"`
}

type Error

type Error struct {
	// contains filtered or unexported fields
}

func NewCredentialExistsError

func NewCredentialExistsError(alias string) Error

func (Error) Error

func (e Error) Error() string

func (Error) Is

func (e Error) Is(target error) bool

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config) (*Manager, error)

func (*Manager) Del

func (m *Manager) Del(name string) error

func (*Manager) Done

func (m *Manager) Done() error

func (*Manager) Drop

func (m *Manager) Drop() error

func (*Manager) Get

func (m *Manager) Get(name string) (*Credentials, error)

func (*Manager) List

func (m *Manager) List() ([]*Credentials, error)

func (*Manager) Set

func (m *Manager) Set(cred *Credentials, force bool) error

Jump to

Keyboard shortcuts

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