Documentation
¶
Index ¶
- type Secret
- type Store
- func (s *Store) Delete(key string) error
- func (s *Store) ExportKeys() []Secret
- func (s *Store) Get(key string) (string, error)
- func (s *Store) GetByProvider(provider string) (map[string]string, error)
- func (s *Store) GetMetadata(key string) (map[string]string, error)
- func (s *Store) Has(key string) bool
- func (s *Store) ImportFromEnv() error
- func (s *Store) List() []string
- func (s *Store) ListByProvider(provider string) []string
- func (s *Store) Rename(oldKey, newKey string) error
- func (s *Store) Set(key, provider, value string, metadata map[string]string) error
- func (s *Store) UpdateMetadata(key string, metadata map[string]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Secret ¶
type Secret struct {
Key string `json:"key"` // 密钥名称
Provider string `json:"provider"` // 提供商 (openai, anthropic, etc.)
Value string `json:"value"` // 加密后的值
Metadata map[string]string `json:"metadata"` // 额外元数据
}
Secret 密钥条目
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store 密钥存储
func (*Store) GetByProvider ¶
GetByProvider 根据提供商获取所有密钥
func (*Store) GetMetadata ¶
GetMetadata 获取密钥元数据
func (*Store) ListByProvider ¶
ListByProvider 列出提供商下的密钥
Click to show internal directories.
Click to hide internal directories.