 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type GitTokenStore
- func (s *GitTokenStore) AuthDir() string
- func (s *GitTokenStore) ConfigPath() string
- func (s *GitTokenStore) Delete(_ context.Context, id string) error
- func (s *GitTokenStore) EnsureRepository() error
- func (s *GitTokenStore) List(_ context.Context) ([]*cliproxyauth.Auth, error)
- func (s *GitTokenStore) PersistAuthFiles(_ context.Context, message string, paths ...string) error
- func (s *GitTokenStore) PersistConfig(_ context.Context) error
- func (s *GitTokenStore) Save(_ context.Context, auth *cliproxyauth.Auth) (string, error)
- func (s *GitTokenStore) SetBaseDir(dir string)
 
- type ObjectStoreConfig
- type ObjectTokenStore
- func (s *ObjectTokenStore) AuthDir() string
- func (s *ObjectTokenStore) Bootstrap(ctx context.Context, exampleConfigPath string) error
- func (s *ObjectTokenStore) ConfigPath() string
- func (s *ObjectTokenStore) Delete(ctx context.Context, id string) error
- func (s *ObjectTokenStore) List(_ context.Context) ([]*cliproxyauth.Auth, error)
- func (s *ObjectTokenStore) PersistAuthFiles(ctx context.Context, _ string, paths ...string) error
- func (s *ObjectTokenStore) PersistConfig(ctx context.Context) error
- func (s *ObjectTokenStore) Save(ctx context.Context, auth *cliproxyauth.Auth) (string, error)
- func (s *ObjectTokenStore) SetBaseDir(string)
 
- type PostgresStore
- func (s *PostgresStore) AuthDir() string
- func (s *PostgresStore) Bootstrap(ctx context.Context, exampleConfigPath string) error
- func (s *PostgresStore) Close() error
- func (s *PostgresStore) ConfigPath() string
- func (s *PostgresStore) Delete(ctx context.Context, id string) error
- func (s *PostgresStore) EnsureSchema(ctx context.Context) error
- func (s *PostgresStore) List(ctx context.Context) ([]*cliproxyauth.Auth, error)
- func (s *PostgresStore) PersistAuthFiles(ctx context.Context, _ string, paths ...string) error
- func (s *PostgresStore) PersistConfig(ctx context.Context) error
- func (s *PostgresStore) Save(ctx context.Context, auth *cliproxyauth.Auth) (string, error)
- func (s *PostgresStore) SetBaseDir(string)
- func (s *PostgresStore) WorkDir() string
 
- type PostgresStoreConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitTokenStore ¶
type GitTokenStore struct {
	// contains filtered or unexported fields
}
    GitTokenStore persists token records and auth metadata using git as the backing storage.
func NewGitTokenStore ¶
func NewGitTokenStore(remote, username, password string) *GitTokenStore
NewGitTokenStore creates a token store that saves credentials to disk through the TokenStorage implementation embedded in the token record.
func (*GitTokenStore) AuthDir ¶
func (s *GitTokenStore) AuthDir() string
AuthDir returns the directory used for auth persistence.
func (*GitTokenStore) ConfigPath ¶
func (s *GitTokenStore) ConfigPath() string
ConfigPath returns the managed config file path.
func (*GitTokenStore) Delete ¶
func (s *GitTokenStore) Delete(_ context.Context, id string) error
Delete removes the auth file.
func (*GitTokenStore) EnsureRepository ¶
func (s *GitTokenStore) EnsureRepository() error
EnsureRepository prepares the local git working tree by cloning or opening the repository.
func (*GitTokenStore) List ¶
func (s *GitTokenStore) List(_ context.Context) ([]*cliproxyauth.Auth, error)
List enumerates all auth JSON files under the configured directory.
func (*GitTokenStore) PersistAuthFiles ¶ added in v6.2.7
PersistAuthFiles commits and pushes the provided paths to the remote repository. It no-ops when the store is not fully configured or when there are no paths.
func (*GitTokenStore) PersistConfig ¶ added in v6.2.7
func (s *GitTokenStore) PersistConfig(_ context.Context) error
PersistConfig commits and pushes configuration changes to git.
func (*GitTokenStore) Save ¶
func (s *GitTokenStore) Save(_ context.Context, auth *cliproxyauth.Auth) (string, error)
Save persists token storage and metadata to the resolved auth file path.
func (*GitTokenStore) SetBaseDir ¶
func (s *GitTokenStore) SetBaseDir(dir string)
SetBaseDir updates the default directory used for auth JSON persistence when no explicit path is provided.
type ObjectStoreConfig ¶ added in v6.2.12
type ObjectStoreConfig struct {
	Endpoint  string
	Bucket    string
	AccessKey string
	SecretKey string
	Region    string
	Prefix    string
	LocalRoot string
	UseSSL    bool
	PathStyle bool
}
    ObjectStoreConfig captures configuration for the object storage-backed token store.
type ObjectTokenStore ¶ added in v6.2.12
type ObjectTokenStore struct {
	// contains filtered or unexported fields
}
    ObjectTokenStore persists configuration and authentication metadata using an S3-compatible object storage backend. Files are mirrored to a local workspace so existing file-based flows continue to operate.
func NewObjectTokenStore ¶ added in v6.2.12
func NewObjectTokenStore(cfg ObjectStoreConfig) (*ObjectTokenStore, error)
NewObjectTokenStore initializes an object storage backed token store.
func (*ObjectTokenStore) AuthDir ¶ added in v6.2.12
func (s *ObjectTokenStore) AuthDir() string
AuthDir returns the local directory containing mirrored auth files.
func (*ObjectTokenStore) Bootstrap ¶ added in v6.2.12
func (s *ObjectTokenStore) Bootstrap(ctx context.Context, exampleConfigPath string) error
Bootstrap ensures the target bucket exists and synchronizes data from the object storage backend.
func (*ObjectTokenStore) ConfigPath ¶ added in v6.2.12
func (s *ObjectTokenStore) ConfigPath() string
ConfigPath returns the managed configuration file path inside the spool directory.
func (*ObjectTokenStore) Delete ¶ added in v6.2.12
func (s *ObjectTokenStore) Delete(ctx context.Context, id string) error
Delete removes an auth file locally and remotely.
func (*ObjectTokenStore) List ¶ added in v6.2.12
func (s *ObjectTokenStore) List(_ context.Context) ([]*cliproxyauth.Auth, error)
List enumerates auth JSON files from the mirrored workspace.
func (*ObjectTokenStore) PersistAuthFiles ¶ added in v6.2.12
PersistAuthFiles uploads the provided auth files to the object storage backend.
func (*ObjectTokenStore) PersistConfig ¶ added in v6.2.12
func (s *ObjectTokenStore) PersistConfig(ctx context.Context) error
PersistConfig uploads the local configuration file to the object storage backend.
func (*ObjectTokenStore) Save ¶ added in v6.2.12
func (s *ObjectTokenStore) Save(ctx context.Context, auth *cliproxyauth.Auth) (string, error)
Save persists authentication metadata to disk and uploads it to the object storage backend.
func (*ObjectTokenStore) SetBaseDir ¶ added in v6.2.12
func (s *ObjectTokenStore) SetBaseDir(string)
SetBaseDir implements the optional interface used by authenticators; it is a no-op because the object store controls its own workspace.
type PostgresStore ¶ added in v6.2.7
type PostgresStore struct {
	// contains filtered or unexported fields
}
    PostgresStore persists configuration and authentication metadata using PostgreSQL as backend while mirroring data to a local workspace so existing file-based workflows continue to operate.
func NewPostgresStore ¶ added in v6.2.7
func NewPostgresStore(ctx context.Context, cfg PostgresStoreConfig) (*PostgresStore, error)
NewPostgresStore establishes a connection to PostgreSQL and prepares the local workspace.
func (*PostgresStore) AuthDir ¶ added in v6.2.7
func (s *PostgresStore) AuthDir() string
AuthDir returns the local directory containing mirrored auth files.
func (*PostgresStore) Bootstrap ¶ added in v6.2.7
func (s *PostgresStore) Bootstrap(ctx context.Context, exampleConfigPath string) error
Bootstrap synchronizes configuration and auth records between PostgreSQL and the local workspace.
func (*PostgresStore) Close ¶ added in v6.2.7
func (s *PostgresStore) Close() error
Close releases the underlying database connection.
func (*PostgresStore) ConfigPath ¶ added in v6.2.7
func (s *PostgresStore) ConfigPath() string
ConfigPath returns the managed configuration file path inside the spool directory.
func (*PostgresStore) Delete ¶ added in v6.2.7
func (s *PostgresStore) Delete(ctx context.Context, id string) error
Delete removes an auth file and the corresponding database record.
func (*PostgresStore) EnsureSchema ¶ added in v6.2.7
func (s *PostgresStore) EnsureSchema(ctx context.Context) error
EnsureSchema creates the required tables (and schema when provided).
func (*PostgresStore) List ¶ added in v6.2.7
func (s *PostgresStore) List(ctx context.Context) ([]*cliproxyauth.Auth, error)
List enumerates all auth records stored in PostgreSQL.
func (*PostgresStore) PersistAuthFiles ¶ added in v6.2.7
PersistAuthFiles stores the provided auth file changes in PostgreSQL.
func (*PostgresStore) PersistConfig ¶ added in v6.2.7
func (s *PostgresStore) PersistConfig(ctx context.Context) error
PersistConfig mirrors the local configuration file to PostgreSQL.
func (*PostgresStore) Save ¶ added in v6.2.7
func (s *PostgresStore) Save(ctx context.Context, auth *cliproxyauth.Auth) (string, error)
Save persists authentication metadata to disk and PostgreSQL.
func (*PostgresStore) SetBaseDir ¶ added in v6.2.7
func (s *PostgresStore) SetBaseDir(string)
SetBaseDir implements the optional interface used by authenticators; it is a no-op because the Postgres-backed store controls its own workspace.
func (*PostgresStore) WorkDir ¶ added in v6.2.7
func (s *PostgresStore) WorkDir() string
WorkDir exposes the root spool directory used for mirroring.