golang

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 46 Imported by: 3

Documentation

Overview

Package golang provides a concrete Cataloger implementation relating to packages within the Go language ecosystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGoModuleBinaryCataloger added in v0.25.0

func NewGoModuleBinaryCataloger(opts CatalogerConfig) pkg.Cataloger

NewGoModuleBinaryCataloger returns a new cataloger object that searches within binaries built by the go compiler.

func NewGoModuleFileCataloger added in v0.95.0

func NewGoModuleFileCataloger(opts CatalogerConfig) pkg.Cataloger

NewGoModuleFileCataloger returns a new cataloger object that searches within go.mod files.

Types

type CatalogerConfig added in v0.98.0

type CatalogerConfig struct {
	SearchLocalModCacheLicenses bool                    `yaml:"search-local-mod-cache-licenses" json:"search-local-mod-cache-licenses" mapstructure:"search-local-mod-cache-licenses"`
	LocalModCacheDir            string                  `yaml:"local-mod-cache-dir" json:"local-mod-cache-dir" mapstructure:"local-mod-cache-dir"`
	SearchRemoteLicenses        bool                    `yaml:"search-remote-licenses" json:"search-remote-licenses" mapstructure:"search-remote-licenses"`
	Proxies                     []string                `yaml:"proxies,omitempty" json:"proxies,omitempty" mapstructure:"proxies"`
	NoProxy                     []string                `yaml:"no-proxy,omitempty" json:"no-proxy,omitempty" mapstructure:"no-proxy"`
	MainModuleVersion           MainModuleVersionConfig `yaml:"main-module-version" json:"main-module-version" mapstructure:"main-module-version"`
}

func DefaultCatalogerConfig added in v0.98.0

func DefaultCatalogerConfig() CatalogerConfig

DefaultCatalogerConfig create a CatalogerConfig with default options, which includes: - setting the default remote proxy if none is provided - setting the default no proxy if none is provided - setting the default local module cache dir if none is provided

func (CatalogerConfig) WithLocalModCacheDir added in v0.98.0

func (g CatalogerConfig) WithLocalModCacheDir(input string) CatalogerConfig

func (CatalogerConfig) WithMainModuleVersion added in v0.105.0

func (g CatalogerConfig) WithMainModuleVersion(input MainModuleVersionConfig) CatalogerConfig

func (CatalogerConfig) WithNoProxy added in v0.98.0

func (g CatalogerConfig) WithNoProxy(input string) CatalogerConfig

func (CatalogerConfig) WithProxy added in v0.98.0

func (g CatalogerConfig) WithProxy(input string) CatalogerConfig

func (CatalogerConfig) WithSearchLocalModCacheLicenses added in v0.98.0

func (g CatalogerConfig) WithSearchLocalModCacheLicenses(input bool) CatalogerConfig

func (CatalogerConfig) WithSearchRemoteLicenses added in v0.98.0

func (g CatalogerConfig) WithSearchRemoteLicenses(input bool) CatalogerConfig

type MainModuleVersionConfig added in v0.105.0

type MainModuleVersionConfig struct {
	FromLDFlags       bool `yaml:"from-ld-flags" json:"from-ld-flags" mapstructure:"from-ld-flags"`
	FromContents      bool `yaml:"from-contents" json:"from-contents" mapstructure:"from-contents"`
	FromBuildSettings bool `yaml:"from-build-settings" json:"from-build-settings" mapstructure:"from-build-settings"`
}

func DefaultMainModuleVersionConfig added in v0.105.0

func DefaultMainModuleVersionConfig() MainModuleVersionConfig

func (MainModuleVersionConfig) WithFromBuildSettings added in v0.105.0

func (g MainModuleVersionConfig) WithFromBuildSettings(input bool) MainModuleVersionConfig

func (MainModuleVersionConfig) WithFromContents added in v0.105.0

func (g MainModuleVersionConfig) WithFromContents(input bool) MainModuleVersionConfig

func (MainModuleVersionConfig) WithFromLDFlags added in v0.105.0

func (g MainModuleVersionConfig) WithFromLDFlags(input bool) MainModuleVersionConfig

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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