ffa

package
v0.0.0-...-36bbef9 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient(ctx context.Context, accessToken string) *github.Client

CreateClient authenticates and creates a client to use

func ExtractAllCommandsFromDockerfile

func ExtractAllCommandsFromDockerfile(data string) ([]dockerfile.Command, error)

ExtractAllCommandsFromDockerfile

func ExtractRunCommandsFromDockerfile

func ExtractRunCommandsFromDockerfile(data string) ([]dockerfile.Command, error)

ExtractRunCommandsFromDockerfile

func GetRepoList

func GetRepoList(jsonFilePath string) ([]string, error)

GetRepoList creates a list of repos from a json array file

func LoadDockerfiles

func LoadDockerfiles(ctx context.Context, client *github.Client, repoInfo *Repo)

LoadDockerfiles loads all files matching dockerfile in their path

func LoadLanguages

func LoadLanguages(ctx context.Context, client *github.Client, repoInfo *Repo) error

LoadLanguages loads all the languages in the repository

func TranslateDockerfile

func TranslateDockerfile(data string) ([]string, error)

func TranslateShellScript

func TranslateShellScript(data string) ([]string, error)

Types

type Language

type Language struct {
	Name       string  `json:"name"`
	Percentage float32 `json:"percentage"`
}

Language holds information about a language used by a GitHub repository

type Repo

type Repo struct {
	URL         string     `json:"url"`
	Owner       string     `json:"owner"`
	Repo        string     `json:"repo"`
	Languages   []Language `json:"languages"`
	Dockerfiles []string   `json:"dockerfiles"`
	Images      []string   `json:"images"`
}

Repos holds information about a GitHub repository

func LoadRepoCache

func LoadRepoCache(filePath string) ([]Repo, error)

LoadRepoCache will load a list of Repo objects from a json file.

func NewRepo

func NewRepo(ctx context.Context, client *github.Client, url string) Repo

NewRepo creates the repo object given a URL

Jump to

Keyboard shortcuts

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