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

geminicli

package
v6.9.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsVirtual

func IsVirtual(runtime any) bool

IsVirtual reports whether the runtime payload represents a virtual credential.

Types

type SharedCredential

type SharedCredential struct {
	// contains filtered or unexported fields
}

SharedCredential keeps canonical OAuth metadata for a multi-project Gemini CLI login.

func NewSharedCredential

func NewSharedCredential(primaryID, email string, metadata map[string]any, projectIDs []string) *SharedCredential

NewSharedCredential builds a shared credential container for the given primary entry.

func ResolveSharedCredential

func ResolveSharedCredential(runtime any) *SharedCredential

ResolveSharedCredential returns the shared credential backing the provided runtime payload.

func (*SharedCredential) Email

func (s *SharedCredential) Email() string

Email returns the associated account email.

func (*SharedCredential) MergeMetadata

func (s *SharedCredential) MergeMetadata(values map[string]any) map[string]any

MergeMetadata merges the provided fields into the shared metadata and returns an updated copy.

func (*SharedCredential) MetadataSnapshot

func (s *SharedCredential) MetadataSnapshot() map[string]any

MetadataSnapshot returns a deep copy of the stored OAuth metadata.

func (*SharedCredential) PrimaryID

func (s *SharedCredential) PrimaryID() string

PrimaryID returns the owning credential identifier.

func (*SharedCredential) ProjectIDs

func (s *SharedCredential) ProjectIDs() []string

ProjectIDs returns a snapshot of the configured project identifiers.

func (*SharedCredential) SetProjectIDs

func (s *SharedCredential) SetProjectIDs(ids []string)

SetProjectIDs updates the stored project identifiers.

type VirtualCredential

type VirtualCredential struct {
	ProjectID string
	Parent    *SharedCredential
}

VirtualCredential tracks a per-project virtual auth entry that reuses a primary credential.

func NewVirtualCredential

func NewVirtualCredential(projectID string, parent *SharedCredential) *VirtualCredential

NewVirtualCredential creates a virtual credential descriptor bound to the shared parent.

Jump to

Keyboard shortcuts

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