Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPublicKeyNotFound = errors.Wrap(stderr.New("public key not found"), http.StatusUnauthorized)
ErrPublicKeyNotFound is returned by AuthorizedKeysStorage.GetPublicKey if authorized key is not found
Functions ¶
This section is empty.
Types ¶
type AuthorizedKeysStorage ¶
type AuthorizedKeysStorage interface { GetPublicKey(ctx context.Context, keyHash string) (crypto.PublicKey, error) ListPublicKeys(ctx context.Context) ([]string, error) }
AuthorizedKeysStorage represents an authorized public keys storage
func Must ¶
func Must(s AuthorizedKeysStorage, err error) AuthorizedKeysStorage
Must panics in case of error
func StaticAuthorizedKeys ¶
func StaticAuthorizedKeys(pub ...crypto.PublicKey) (AuthorizedKeysStorage, error)
StaticAuthorizedKeys returns an AuthorizedKeysStorage that uses the given public keys
func StaticAuthorizedKeysFromString ¶
func StaticAuthorizedKeysFromString(pub ...string) (AuthorizedKeysStorage, error)
StaticAuthorizedKeysFromString returns an AuthorizedKeysStorage that uses the given public keys
Click to show internal directories.
Click to hide internal directories.