fs

package
v0.3.21 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSCredentialStore

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

FSCredentialStore stores credentials as a JSON file on the filesystem

func NewFSCredentialStore

func NewFSCredentialStore(path string, appName string) (*FSCredentialStore, error)

NewFSCredentialStore creates a new FS-based credential store. If path is empty, defaults to ~/.config/<appName>/credentials.json

func (*FSCredentialStore) GetCredential

func (s *FSCredentialStore) GetCredential(serverURL string) (*client.ServerCredential, error)

GetCredential retrieves a credential for a server URL

func (*FSCredentialStore) ListServers

func (s *FSCredentialStore) ListServers() ([]string, error)

ListServers returns all server URLs with stored credentials

func (*FSCredentialStore) Path

func (s *FSCredentialStore) Path() string

Path returns the path to the credentials file

func (*FSCredentialStore) RemoveCredential

func (s *FSCredentialStore) RemoveCredential(serverURL string) error

RemoveCredential removes a credential for a server URL

func (*FSCredentialStore) Save

func (s *FSCredentialStore) Save() error

Save persists credentials to disk

func (*FSCredentialStore) SetCredential

func (s *FSCredentialStore) SetCredential(serverURL string, cred *client.ServerCredential) error

SetCredential stores a credential for a server URL

Jump to

Keyboard shortcuts

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