Documentation
¶
Overview ¶
Package store provides token storage implementations.
Index ¶
- func DefaultDir() (string, error)
- type FileTokenStore
- func (s *FileTokenStore) Delete(ctx context.Context, key string) error
- func (s *FileTokenStore) List(ctx context.Context) ([]string, error)
- func (s *FileTokenStore) Load(ctx context.Context, key string) (*claude.Token, error)
- func (s *FileTokenStore) Save(ctx context.Context, key string, token *claude.Token) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDir ¶
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.
Click to show internal directories.
Click to hide internal directories.