credhelpers

package
v1.40.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

A `pass` based credential helper. Passwords are stored as arguments to pass of the form: "$PASS_FOLDER/base64-url(serverURL)/username". We base64-url encode the serverURL, because under the hood pass uses files and folders, so /s will get translated into additional folders.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	ServerURL string
	Username  string
	Secret    string
}

type Pass

type Pass struct{}

Pass handles secrets using Linux secret-service as a store.

func (Pass) Add

func (h Pass) Add(creds *Credentials) error

Add adds new credentials to the keychain.

func (Pass) Delete

func (h Pass) Delete(serverURL string) error

Delete removes credentials from the store.

func (Pass) Get

func (h Pass) Get(url string) (string, error)

Get returns the username and secret to use for a given registry server URL.

func (Pass) GetName

func (Pass) GetName() string

GetName gets friendly name of service

func (Pass) List

func (h Pass) List(prefix string) ([]string, error)

List returns the stored URLs for a given credentials label

Jump to

Keyboard shortcuts

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