fs

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package fs provides a file system-based credential store for oneauth client.

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