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: 0

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