models

package
v0.0.0-...-b203053 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileMatch

type FileMatch struct {
	File       string
	LineNumber int
	Token      string
}

type FileMatches

type FileMatches []FileMatch

func (FileMatches) ToFileResults

func (matches FileMatches) ToFileResults(repoUrl string, branch string) FileResults

Converts a slice of FileMath to a slice of FileResults

The purpose is to combine repository information to make direct links to the location of the token instance in GitHub

type FileResult

type FileResult struct {
	Path string `dynamodbav:"path"`
	Link string `dynamodbav:"link"`
}

type FileResults

type FileResults []FileResult

type FragmentStr

type FragmentStr string

func (FragmentStr) GetDepVersion

func (fragment FragmentStr) GetDepVersion(currDep string) (string, bool)

type TokenMatchesMap

type TokenMatchesMap map[string]FileMatches

Map of token values to token matches found in a file.

func (TokenMatchesMap) ToTokenResults

func (matchMap TokenMatchesMap) ToTokenResults(repoName, url, defaultBranch string) TokenResults

Constructs a slice of TokenResult from a TokenMatchesMap

Combine repository information and FileMatch information to prepare repository specific token search data for writing to its destination

type TokenResult

type TokenResult struct {
	Token    string      `dynamodbav:"component" json:"token"`
	RepoName string      `dynamodbav:"repo" json:"repo"`
	Files    FileResults `dynamodbav:"files" json:"files"`
}

func NewTokenResult

func NewTokenResult(token, repoName string, results FileResults) TokenResult

type TokenResults

type TokenResults []TokenResult

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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