Help us shape the future of Go! Take the 2026 Go Developer Survey

accounts

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 14 Imported by: 0

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

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) Accounts

func (s *Store) Accounts(ctx context.Context) ([]Account, error)

func (*Store) Add

func (s *Store) Add(ctx context.Context, provider, name string, credential *auth.Credential) (Account, error)

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, provider string) error

func (*Store) ForProvider

func (s *Store) ForProvider(_ context.Context, provider string) (auth.CredentialStore, error)

ForProvider pins account identity across read/refresh/write. Switching the active account cannot redirect an in-flight OAuth refresh into another one.

func (*Store) List

func (s *Store) List(ctx context.Context) ([]auth.CredentialInfo, error)

func (*Store) Modify

func (s *Store) Modify(ctx context.Context, provider string, fn auth.ModifyFunc) (*auth.Credential, error)

func (*Store) Read

func (s *Store) Read(ctx context.Context, provider string) (*auth.Credential, error)

func (*Store) Remove

func (s *Store) Remove(ctx context.Context, provider, id string) error

func (*Store) Rename

func (s *Store) Rename(ctx context.Context, provider, id, name string) error

func (*Store) Select

func (s *Store) Select(ctx context.Context, provider, id string) error

func (*Store) View

func (s *Store) View(provider, id string) auth.CredentialStore

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL