pypi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MulanPSL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name() string

func ParseMetadataContent

func ParseMetadataContent(reader io.Reader, sourcePath string) ([]model.Package, error)

func PkgType

func PkgType() model.PkgType

Types

type Collector

type Collector struct {
	collector.BaseCollector
}

func NewCollector

func NewCollector() *Collector

type PipLockDependency

type PipLockDependency struct {
	Version string `json:"version"`
}

type PipLockInfo

type PipLockInfo struct {
	Default map[string]PipLockDependency `json:"default"`
}

type PipLockParser

type PipLockParser struct{}

PipLockParser is a parser for Pipfile.lock file see: https://pipenv.pypa.io/en/latest/pipfile/

func NewPipLockParser

func NewPipLockParser() *PipLockParser

func (*PipLockParser) Matcher

func (m *PipLockParser) Matcher() collector.FileMatcher

func (*PipLockParser) Parse

func (m *PipLockParser) Parse(filePath string) ([]model.Package, error)

type PipenvGraphParser

type PipenvGraphParser struct{}

PipenvGraphParser is a parser for output of executing 'pipenv graph' command see: https://pypi.org/project/pipenv/#show-a-dependency-graph

func NewPipenvGraphParser

func NewPipenvGraphParser() *PipenvGraphParser

NewPipenvGraphParser returns a new PipenvGraphParser

func (*PipenvGraphParser) Matcher

func (*PipenvGraphParser) Parse

func (m *PipenvGraphParser) Parse(filePath string) ([]model.Package, error)

func (*PipenvGraphParser) Type

func (m *PipenvGraphParser) Type() model.PkgType

type PkgMetadataParser

type PkgMetadataParser struct{}

PkgMetadataParser is a parser for python package metadata file

func NewPkgMetadataParser

func NewPkgMetadataParser() *PkgMetadataParser

func (*PkgMetadataParser) Matcher

func (*PkgMetadataParser) Parse

func (m *PkgMetadataParser) Parse(filePath string) ([]model.Package, error)

type PoetryLockData

type PoetryLockData struct {
	PoetryPackages []struct {
		Name         string                 `toml:"name"`
		Version      string                 `toml:"version"`
		Dependencies map[string]interface{} `toml:"dependencies"`
	} `toml:"package"`
}

type PoetryLockParser

type PoetryLockParser struct{}

PoetryLockParser is a parser for poetry.lock file see: https://python-poetry.org/docs/basic-usage/#installing-dependencies

func NewPoetryLockParser

func NewPoetryLockParser() *PoetryLockParser

func (*PoetryLockParser) Matcher

func (m *PoetryLockParser) Matcher() collector.FileMatcher

func (*PoetryLockParser) Parse

func (m *PoetryLockParser) Parse(filePath string) ([]model.Package, error)

type PythonPkgMetadataInfo

type PythonPkgMetadataInfo struct {
	Name    string `mapstruct:"Name"`
	Version string `mapstruct:"Version"`
	License string `mapstruct:"License"`
}

type RequirementsParser

type RequirementsParser struct{}

RequirementsParser is a parser for requirements.txt file see: https://pip.pypa.io/en/stable/reference/requirements-file-format/

func NewRequirementsParser

func NewRequirementsParser() *RequirementsParser

func (*RequirementsParser) Matcher

func (*RequirementsParser) Parse

func (m *RequirementsParser) Parse(filePath string) ([]model.Package, error)

type SetUpParser

type SetUpParser struct{}

SetUpParser is a parser for setup.py file see: https://docs.python.org/3/distutils/setupscript.html

func NewSetUpParser

func NewSetUpParser() *SetUpParser

func (*SetUpParser) Matcher

func (m *SetUpParser) Matcher() collector.FileMatcher

func (*SetUpParser) Parse

func (m *SetUpParser) Parse(filePath string) ([]model.Package, error)

Jump to

Keyboard shortcuts

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