store

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package store provides token storage implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDir

func DefaultDir() (string, error)

DefaultDir returns the default credentials directory (~/.llmcli/credentials).

Types

type FileTokenStore

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

FileTokenStore persists tokens to JSON files in a directory.

func NewFileTokenStore

func NewFileTokenStore(dir string) (*FileTokenStore, error)

NewFileTokenStore creates a store that saves tokens to dir. Creates the directory if it doesn't exist.

func (*FileTokenStore) Delete

func (s *FileTokenStore) Delete(ctx context.Context, key string) error

Delete removes a stored token.

func (*FileTokenStore) List

func (s *FileTokenStore) List(ctx context.Context) ([]string, error)

List returns all stored token keys.

func (*FileTokenStore) Load

func (s *FileTokenStore) Load(ctx context.Context, key string) (*claude.Token, error)

Load retrieves a stored token by key.

func (*FileTokenStore) Save

func (s *FileTokenStore) Save(ctx context.Context, key string, token *claude.Token) error

Save persists a token with the given key.

Jump to

Keyboard shortcuts

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