config

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ThirdPartyDir       string                 `json:"thirdPartyDir"`
	PleasePath          string                 `json:"pleasePath"`
	KnownTargets        map[string]string      `json:"knownTargets"`
	LibKinds            map[string]*KindConfig `json:"libKinds"`
	TestKinds           map[string]*KindConfig `json:"testKinds"`
	BinKinds            map[string]*KindConfig `json:"binKinds"`
	Stop                bool                   `json:"stop"`
	EnsureSubincludes   *bool                  `json:"ensureSubincludes"`
	ExcludeBuiltinKinds []string               `json:"excludeBuiltinKinds"`
	// contains filtered or unexported fields
}

Config represents a puku.json file discovered in the repo. These are loaded for each directory, and form a chain of configs all the way up to the root config. Configs at a deeper level in the file tree override values from configs at a shallower level. The shallower config file is stored in (*Config).base` and the methods on this struct will recurse into this base config where appropriate.

func ReadConfig

func ReadConfig(dir string) (*Config, error)

ReadConfig builds up the config for a given path

func (*Config) GetKind

func (c *Config) GetKind(kind string) *kinds.Kind

func (*Config) GetKnownTarget

func (c *Config) GetKnownTarget(importPath string) string

func (*Config) GetPlzPath

func (c *Config) GetPlzPath() string

func (*Config) GetStop

func (c *Config) GetStop() bool

func (*Config) GetThirdPartyDir

func (c *Config) GetThirdPartyDir() string

func (*Config) ShouldEnsureSubincludes

func (c *Config) ShouldEnsureSubincludes() bool

type KindConfig

type KindConfig struct {
	// NonGoSources indicates that this rule operates on non-go sources and we shouldn't attempt to parse them to
	// generate the deps list. This is the case for rules like proto_library that still output a go package, but we
	// shouldn't try to update their deps based on their sources.
	NonGoSources      bool     `json:"nonGoSources"`
	ProvidedDeps      []string `json:"providedDeps"`
	DefaultVisibility []string `json:"defaultVisibility"`
	SrcsArg           string   `json:"srcsArg"`
}

KindConfig represents the configuration for a custom kind. See kinds.Kind for more information on how kinds work.

Jump to

Keyboard shortcuts

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