goplg

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GITHUB_API_TOKEN                string = fmt.Sprintf("%v", utils.GetGithubToken())
	GITHUB_USERNAME                 string = fmt.Sprintf("%v", utils.GetGithubUsername())
	SOURCEGRAPH_GRAPHQL_API_BASEURL string = utils.GetSourceGraphGQLApi()
	GITHUB_GRAPHQL_API_BASEURL      string = utils.GetGitHubGQLApi()
)

Functions

This section is empty.

Types

type GoMod added in v1.0.2

type GoMod struct {
	Module  string
	Require []string
	Replace []string
}

func NewGoMod added in v1.0.4

func NewGoMod() *GoMod

type GoPlugin

type GoPlugin struct {
	GitHubApiToken string
	GitHubUsername string
	HttpClient     *http.Client
	Parser         *Parser
	DatabaseClient *gorm.DB
	GitHubClient   *http.Client
	MaxRoutines    int
	LibraryCache   map[string]int
	GoMods         map[string]*GoMod
	DependencyMap  map[string][]string
}

Plugin is tested with Go Version 1.19.4. Last Update: 15.1.2023.

func NewGoPlugin

func NewGoPlugin(DatabaseClient *gorm.DB) *GoPlugin

func (*GoPlugin) GenerateRepositoryData added in v1.0.0

func (g *GoPlugin) GenerateRepositoryData(c int) []models.Repository

Entrypoint for the Handler.

type Parser

type Parser struct {
}

func NewParser

func NewParser() *Parser

func (*Parser) ParseRepository added in v0.0.13

func (p *Parser) ParseRepository(url string) (string, string)

func (*Parser) ParseSourceGraphResponse

func (p *Parser) ParseSourceGraphResponse(data string) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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