golang

package
v0.98.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const GOARCH = "GOARCH"

Variables

This section is empty.

Functions

func NewGoModuleBinaryCataloger

func NewGoModuleBinaryCataloger(opts CatalogerConfig) pkg.Cataloger

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

func NewGoModuleFileCataloger

func NewGoModuleFileCataloger(opts CatalogerConfig) pkg.Cataloger

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

Types

type CatalogerConfig

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"`
}

func DefaultCatalogerConfig

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

func (g CatalogerConfig) WithLocalModCacheDir(input string) CatalogerConfig

func (CatalogerConfig) WithNoProxy

func (g CatalogerConfig) WithNoProxy(input string) CatalogerConfig

func (CatalogerConfig) WithProxy

func (g CatalogerConfig) WithProxy(input string) CatalogerConfig

func (CatalogerConfig) WithSearchLocalModCacheLicenses

func (g CatalogerConfig) WithSearchLocalModCacheLicenses(input bool) CatalogerConfig

func (CatalogerConfig) WithSearchRemoteLicenses

func (g CatalogerConfig) WithSearchRemoteLicenses(input bool) CatalogerConfig

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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