Documentation
¶
Overview ¶
Package accounts adds named credentials without changing the provider-keyed compatibility store. Paths and stores are supplied by the embedding assembly.
Index ¶
- Constants
- type Account
- type Store
- func (s *Store) Accounts(ctx context.Context) ([]Account, error)
- func (s *Store) Add(ctx context.Context, provider, name string, credential *auth.Credential) (Account, error)
- func (s *Store) Delete(ctx context.Context, provider string) error
- func (s *Store) ForProvider(_ context.Context, provider string) (auth.CredentialStore, error)
- func (s *Store) List(ctx context.Context) ([]auth.CredentialInfo, error)
- func (s *Store) Modify(ctx context.Context, provider string, fn auth.ModifyFunc) (*auth.Credential, error)
- func (s *Store) Read(ctx context.Context, provider string) (*auth.Credential, error)
- func (s *Store) Remove(ctx context.Context, provider, id string) error
- func (s *Store) Rename(ctx context.Context, provider, id, name string) error
- func (s *Store) Select(ctx context.Context, provider, id string) error
- func (s *Store) View(provider, id string) auth.CredentialStore
Constants ¶
View Source
const DefaultID = "default"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
ID, Provider, Name string
Type auth.CredentialType
Active bool
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(path string, base auth.CredentialStore) *Store
NewStore performs no I/O; an unused capability creates no files.
func (*Store) ForProvider ¶
ForProvider pins account identity across read/refresh/write. Switching the active account cannot redirect an in-flight OAuth refresh into another one.
func (*Store) Modify ¶
func (s *Store) Modify(ctx context.Context, provider string, fn auth.ModifyFunc) (*auth.Credential, error)
Click to show internal directories.
Click to hide internal directories.