credstore

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package credstore keeps tokens in the OS keychain: the macOS Keychain, the Windows Credential Manager or the Secret Service on Linux.

Index

Constants

View Source
const Service = "checkend"

Service is the keychain service name of all Checkend tokens. The account is the instance URL.

Variables

View Source
var ErrNotFound = errors.New("not found in the keychain")

ErrNotFound is returned when the keychain has no token for the account.

Functions

This section is empty.

Types

type Keyring

type Keyring interface {
	Get(account string) (string, error)
	Set(account, secret string) error
	Delete(account string) error
}

Keyring is the OS keychain. Tests use Memory.

type Memory

type Memory struct {
	Secrets map[string]string
	Broken  bool
	// contains filtered or unexported fields
}

Memory is a keychain in memory, for tests. With Broken set, every call fails, as on a Linux server without a Secret Service.

func (*Memory) Delete

func (m *Memory) Delete(account string) error

func (*Memory) Get

func (m *Memory) Get(account string) (string, error)

func (*Memory) Set

func (m *Memory) Set(account, secret string) error

type System

type System struct{}

System is the keychain of the operating system.

func (System) Delete

func (System) Delete(account string) error

func (System) Get

func (System) Get(account string) (string, error)

func (System) Set

func (System) Set(account, secret string) error

Jump to

Keyboard shortcuts

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