credential

package
v0.0.0-...-8bd17e6 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package credential stores management credentials outside the CLI config file.

Index

Constants

View Source
const ServiceName = "cliproxyapi-cli"

Variables

View Source
var ErrNotFound = errors.New("credential not found")

Functions

func Account

func Account(baseURL string) string

Account derives a non-identifying keyring account from a normalized base URL.

Types

type OSStore

type OSStore struct{}

OSStore persists credentials in the current user's operating-system keyring.

func (OSStore) Delete

func (OSStore) Delete(account string) error

func (OSStore) Get

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

func (OSStore) Set

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

type Store

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

Store is the minimal credential persistence boundary used by commands.

func NewOSStore

func NewOSStore() Store

Jump to

Keyboard shortcuts

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