api_results

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveFormat

type ArchiveFormat string
const (
	// Tarball specifies an archive in gzipped tar format.
	Tarball ArchiveFormat = "tarball"

	// Zipball specifies an archive in zip format.
	Zipball ArchiveFormat = "zipball"
)

type AsyncRepoResults

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

type CodeScanResults

type CodeScanResults struct {
	RepoName   string            `json:"repoName"`
	RepoURL    string            `json:"repoUrl"`
	NumMatches int               `json:"numMatches"`
	Tokens     []*TokenReference `json:"tokenRefs"`
}

type GHLanguage

type GHLanguage struct {
	Language  string `json:"language"`
	NumericId int64
}

func ToGHLanguageSlice

func ToGHLanguageSlice(langs map[string]int) []GHLanguage

type GHRepo

type GHRepo struct {
	Name              string       `json:"name"`
	FullName          string       `json:"fullName"`
	Description       string       `json:"description"`
	Languages         []GHLanguage `json:"languages"`
	Owner             string       `json:"owner"`
	Url               string       `json:"url"`
	Team              string       `json:"team"`
	DefaultBranch     string       `json:"defaultBranch"`
	LastModified      time.Time    `json:"lastModified"`
	DependencyVersion string       `json:"dependencyVersion"`
	APIUrl            string       `json:"apiUrl"`
}

func (*GHRepo) GetRepoArchive

func (repo *GHRepo) GetRepoArchive(token string, archiveFmt ArchiveFormat, directory string) (string, error)

type GHRepoResults

type GHRepoResults struct {
	Repos GHRepos `json:"repos"`
	Count int     `json:"count"`
}

type GHRepoWriteResult

type GHRepoWriteResult struct {
	Repository   string    `dynamodbav:"repository" json:"repository"`
	ScmSite      string    `dynamodbav:"scm_site" json:"scm_site"`
	Team         string    `dynamodbav:"team" json:"team"`
	Url          string    `dynamodbav:"url" json:"url"`
	Version      string    `dynamodbav:"version" json:"version"`
	LastModified time.Time `dynamodbav:"lastModified" json:"lastModified"`
}

type GHRepoWriteResults

type GHRepoWriteResults []GHRepoWriteResult

func (GHRepoWriteResults) SaveRepoResultsToFile

func (ghRepoResults GHRepoWriteResults) SaveRepoResultsToFile(fileName string) error

type GHRepos

type GHRepos []GHRepo

func (*GHRepos) ToWriteResults

func (repos *GHRepos) ToWriteResults() GHRepoWriteResults

type RepoScanResult

type RepoScanResult struct {
	RepoName          string `json:"repoName"`
	DependencyVersion string `json:"dependencyVersion"`
	Directory         string `json:"directory"`
}

type RepoScanResults

type RepoScanResults []RepoScanResult

func (RepoScanResults) RemoveDuplicates

func (scanResults RepoScanResults) RemoveDuplicates() RepoScanResults

func (RepoScanResults) ToRepoData

func (scanResults RepoScanResults) ToRepoData(
	owner string,
	teamsToIgnore config.TeamsToIgnore,
	getRepoData func(sr RepoScanResult, owner string, teamsToIgnore config.TeamsToIgnore) (*GHRepo, error)) (*GHRepoResults, error)

func (RepoScanResults) ToRepoDataAsync

func (scanResults RepoScanResults) ToRepoDataAsync(
	owner string,
	teamsToIgnore config.TeamsToIgnore,
	getRepoData func(sr RepoScanResult, owner string, teamsToIgnore config.TeamsToIgnore) (*GHRepo, error)) (*GHRepoResults, error)

type ScanResults

type ScanResults struct {
	RepoScanResults RepoScanResults `json:"results"`
	Count           int             `json:"count"`
}

func (*ScanResults) SaveScanResults

func (scanResults *ScanResults) SaveScanResults(fileName string) error

type TeamsResponse

type TeamsResponse struct {
	Teams []github.Team
}

func (*TeamsResponse) GetTeamsString

func (teamsResponse *TeamsResponse) GetTeamsString(teamsToIgnore config.TeamsToIgnore) string

func (*TeamsResponse) Write

func (resp *TeamsResponse) Write(data []byte) (n int, err error)

Implementing IO Writer in order to fill out TeamsResponse

type TokenReference

type TokenReference struct {
	Token string
	Path  string `json:"path"`
	Link  string `json:"link"`
}

func ToTokenRefs

func ToTokenRefs(codeSearchResults *github.CodeSearchResult, token string) []*TokenReference

Jump to

Keyboard shortcuts

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