package auth import ( "github.com/zalando/go-keyring" ) // Keyring defines the interface for keyring operations. // This allows mocking the system keyring for testing. type Keyring interface { Get(service, key string) (string, error) Set(service, key, value string) error Delete(service, key string) error } // RealKeyring implements Keyring using the system keyring. type RealKeyring struct{} func (r *RealKeyring) Get(service, key string) (string, error) { return keyring.Get(service, key) } func (r *RealKeyring) Set(service, key, value string) error { return keyring.Set(service, key, value) } func (r *RealKeyring) Delete(service, key string) error { return keyring.Delete(service, key) } // DefaultKeyring is the default keyring implementation. var DefaultKeyring Keyring = &RealKeyring{}