identity

package
v0.3.115 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package identity resolves live git-host identities and refreshes config caches.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialSource

type CredentialSource string

CredentialSource identifies which configured credential was used.

const (
	// SourceGit means the profile's git credentials provide the posting identity.
	SourceGit CredentialSource = "git"
	// SourceReviewer means reviewer_credentials provide the posting identity.
	SourceReviewer CredentialSource = "reviewer_credentials"
)

type ProfileResult

type ProfileResult struct {
	Profile               string
	CredentialSource      CredentialSource
	Host                  string
	Identity              gitprovider.Identity
	PreviousIdentityCache string
	IdentityCacheUpdated  bool
}

ProfileResult describes one refreshed profile identity.

func Refresh

func Refresh(ctx context.Context, cfg config.File, profileName string, resolver Resolver) (config.File, []ProfileResult, bool, error)

Refresh refreshes the selected profile identity cache.

func RefreshAll

func RefreshAll(ctx context.Context, cfg config.File, resolver Resolver) (config.File, []ProfileResult, bool, error)

RefreshAll refreshes every configured profile identity cache.

type Resolver

type Resolver interface {
	ResolveIdentity(ctx context.Context, git config.GitConfig) (gitprovider.Identity, error)
}

Resolver resolves one live git-host identity.

Jump to

Keyboard shortcuts

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