display

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleNoEmails

func HandleNoEmails(isOrg bool, username string, repoCount int) error

HandleNoEmails handles the case when no email information is found

func OutputEventList

func OutputEventList(list []string, filename, header, emoji string) error

OutputEventList formats and displays repository event information

func Results

func Results(emails map[string]*models.EmailDetails, showDetails bool, checkSecrets bool,
	lookupEmail string, knownUsername string, user *gh.User, showTargetOnly bool, isOrg bool, cfg *github.Config)

Results shows all the collected information about emails and commits

func SortedKeys

func SortedKeys(m map[string]struct{}) []string

SortedKeys converts a map to a sorted slice of keys

func UserInfo

func UserInfo(user *gh.User, isOrg bool)

UserInfo displays user profile information in a responsive 2-column layout

Types

type ColorPrinter

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

handles colored output with different styles

func (*ColorPrinter) PrintEmail

func (cp *ColorPrinter) PrintEmail(email string, names []string, commitCount int, isTarget bool)

displays email information with appropriate coloring

func (*ColorPrinter) PrintSimilarAccount

func (cp *ColorPrinter) PrintSimilarAccount(email string, names []string, commitCount int)

PrintSimilarAccount displays similar account information

type CommitDisplayer

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

CommitDisplayer handles commit display logic

func NewCommitDisplayer

func NewCommitDisplayer(ctx *Context) *CommitDisplayer

NewCommitDisplayer creates a new commit displayer

func (*CommitDisplayer) DisplayForEntry

func (cd *CommitDisplayer) DisplayForEntry(entry EmailEntry, isTargetUser bool)

DisplayForEntry displays commits for an email entry

type Context

type Context struct {
	Emails          map[string]*models.EmailDetails
	ShowDetails     bool
	CheckSecrets    bool
	LookupEmail     string
	KnownUsername   string
	User            *gh.User
	ShowTargetOnly  bool
	IsOrg           bool
	Cfg             *github.Config
	UserIdentifiers map[string]bool
	TargetNames     map[string]bool
}

Context holds all the data needed for formatting and displaying results

type DisplayOptions

type DisplayOptions struct {
	ShowDetails     bool
	CheckSecrets    bool
	ShowInteresting bool
	ShowTargetOnly  bool
}

groups display-related configuration

type EmailEntry

type EmailEntry struct {
	Email   string
	Details *models.EmailDetails
}

EmailEntry represents a single email with its details for sorting

type EmailProcessResult

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

EmailProcessResult holds the results of email processing

type SecretDisplayer

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

SecretDisplayer handles secret and pattern display

func NewSecretDisplayer

func NewSecretDisplayer() *SecretDisplayer

NewSecretDisplayer creates a new secret displayer

type UserMatcher

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

handles user identification logic

func NewUserMatcher

func NewUserMatcher(username, lookupEmail string, user *gh.User) *UserMatcher

creates a new user matcher

func (*UserMatcher) HasMatchingNames

func (m *UserMatcher) HasMatchingNames(names []string) bool

checks if names match target names

func (*UserMatcher) IsTargetUser

func (m *UserMatcher) IsTargetUser(email string, details *models.EmailDetails) bool

checks if an email belongs to the target user

Jump to

Keyboard shortcuts

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