Upload images to your PDS and get instant CDN URLs via images.blue
at main 31 lines 809 B view raw
1package auth 2 3import ( 4 "github.com/zalando/go-keyring" 5) 6 7// Keyring defines the interface for keyring operations. 8// This allows mocking the system keyring for testing. 9type Keyring interface { 10 Get(service, key string) (string, error) 11 Set(service, key, value string) error 12 Delete(service, key string) error 13} 14 15// RealKeyring implements Keyring using the system keyring. 16type RealKeyring struct{} 17 18func (r *RealKeyring) Get(service, key string) (string, error) { 19 return keyring.Get(service, key) 20} 21 22func (r *RealKeyring) Set(service, key, value string) error { 23 return keyring.Set(service, key, value) 24} 25 26func (r *RealKeyring) Delete(service, key string) error { 27 return keyring.Delete(service, key) 28} 29 30// DefaultKeyring is the default keyring implementation. 31var DefaultKeyring Keyring = &RealKeyring{}